.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to display help in AutoCAD 2015 32bit

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
631 Views, 1 Reply

Unable to display help in AutoCAD 2015 32bit

Hi

 

I am using the acedSetFnHelp function from the "accore.dll" to call out to my own help file from a VB.NET application (loaded using netload). The call is declared as follows:

 

<DllImport("accore.dll", CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Auto, EntryPoint:="acedSetFunHelp")> _

Private Function acedSetFunHelp(ByVal functionName As String, ByVal helpFile As String, ByVal helpTopic As String, ByVal cmd As Integer) As Integer

 

End Function

 

This call works fine for AutoCAD 2012,2013,2014 both 32bit and 64bit and also works for AutoCAD 2015 64bit.

However I cannot get it to work when the application is running under AutoCAD 2015 32bit. The call simply fails and I am unable to get any form of error message to find out why it is failing. In fact it stops the application from loading.  I have tried putting a try..catch around the call to acedSetFunHelp but this does not help (the try..catch does not even

 

The call to the function acedSetFunHelp always passes the value 0 (zero) as the cmd parameter.

 

Has the call to the acedSetFunHelp function changed in the 2015 release and is it different between the 32bit and 64bit versions?

 

Thanks in advance for any help you can give on this matter.

 

Regards

 

Ian

1 REPLY 1
Message 2 of 2
moogalm
in reply to: Anonymous

Dear Ian,

 

Please try using C++ undecorated function names in entrypoint in you dllimport, as these entrypoints are different for both x64 and X86.

 

For example :

/*x64*/
/* [DllImport("accore.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode, EntryPoint = "?acedSetFunHelp@@YAHPEB_W00H@Z", ExactSpelling = true)]
private static extern int acedSetFunHelp(string functionName, string helpFile,string helpTopic,int cmd);*/

/*x86*/
[DllImport("accore.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode, EntryPoint = "?acedSetFunHelp@@YAHPB_W00H@Z", ExactSpelling = true)]
private static extern int acedSetFunHelp(string functionName, string helpFile,string helpTopic,int cmd);
         
[CommandMethod("HelpTest")]
static public void Cmd1()
{
    string exfun = "c:MYCOMMAND";
         
    int rc = -1;
    string helpfile= "arxref.chm";
    rc = acedSetFunHelp(exfun, helpfile, "", 0);
}

Here “MYCOMMAND” is custom command registered using
ARX, sample command function I used to test
.

static void ASDkMyGroupMyCommand ()
{
ads_real result;
if(acedGetReal(L"Now Click F1 to get Help displayed",&result) == RTNORM)
{
acutPrintf(L"HelpDisplayed");
 
}
}
ACED_ARXCOMMAND_ENTRY_AUTO(CArxTestOne2015App, ASDkMyGroup, MyCommand, MyCommandLocal, ACRX_CMD_MODAL, NULL)

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report