I need to call C# method from JMP script. Please guide<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />I am looking forward to call c# method from JMP.I tried using LoadDll function. but it is not working. Please guide on this. below is code
dll = Load DLL("C:/Chap23/SampleJMPCall.dll");
dll << DeclareFunction(
"WriteFile",
Alias( "Test" ),
Arg( UnicodeString, "str" ),
Returns( Int32 )
);
result = dll << Test("Here is a message from JMP.");
Show(result);
dll << UnLoadDLL;
Re: I need to call C# method from JMP script. Please guideFor problems like this, your best bet is to run "dumpbin -exports dll-name" on the DLL you are trying to call functions in and make sure that the function exists and is named what you think it is named (the name is not decorated, etc.). dumpbin.exe is part of Visual C++. There may be other tools that can list a dll's exports, I don't know.
HTH,
Eric
Re: I need to call C# method from JMP script. Please guideI have also started getting the error same while declaring function.
In the following script, error marked by /*###*/
dll_obj << DeclareFunction(
"WriteFile",
Convention( STDCALL ),
Alias( "Test" ),
Arg( UnicodeString, "str" ),
Returns( Int32 )
) /*###*/
any idea on this. Earlier i was getting the error -- Error initializing function "WriteFile". The specified procedure could not be found..
Please suggest.
Re: I need to call C# method from JMP script. Please guideUnfortunately, the DLL calling interface in JMP does not support calling functions in managed code (assemblies). It can only call native code functions exported by native code DLLs.
Re: I need to call C# method from JMP script. Please guidei'm having the same issue... can anyone help steer us in the right direction?
load DLL works fine (no error written to log), but i get an error when trying to declare.
the function name in the DLL i'm trying to declare call is "lookUp()":
dll_obj << DeclareFunction(
"lookUp",
Convention( STDCALL ),
Alias("LU"),
Arg(AnsiString, "NW"),
Returns( Int32 ),
);
I get the following error:
Error initializing function "lookUp". The specified procedure could not be found.
in access or evaluation of 'DeclareFunction' , Bad Argument( "lookUp" ), DeclareFunction(
"lookUp",
Convention( STDCALL ),
Alias( "LU" ),
Arg( AnsiString, "NW" ),
Returns( Int32 )
)
In the following script, error marked by /*###*/
dll_obj << DeclareFunction(
"lookUp",
Convention( STDCALL ),
Alias( "LU" ),
Arg( AnsiString, "NW" ),
Returns( Int32 )
) /*###*/
any help is GREATLY appreciated! thanks in advance