08-17-2010 02:53 AM
Hi I succesfully generated a .NET Controller for an assembly written in C#.
The assembly isn't in the Global assembly cache, therefore I added the assembly with the function
CDotNetRegisterAssemblyPath in the automatically generated dotnetassemblyname.c Initialize function.
If I only call my the Initilize_...() and the Close_...() function in my main function everything is ok.
As soon as I add the entry function of the library (I got the docu) it compiles well, but during runtime I get:
NON-FATAL RUN-TIME ERROR: "c:\...\TestPrograms\test\DotNetAdapter.c", line 1410, col 3, thread id 0x00000B38: Function CDotNetInvokeGenericStaticMember: (return value == -6571 [0xffffe655]).
I know this is due to a wrong calling of the underlying function according to return values, but what to change to bring it back into business?
Here is my code:
void main(int argc, char **argv); void main(int argc, char **argv) { static CDotNetHandle exception = 0; // Exception handles für die DotNet Bibliothek // Muss aufgerufen werden bevor etwas aus der .NET Assembly aufgerufen werden kann Initialize_RmIntAdapter (); // startet und initialisiert die Bibliothek RmIntAdapter_RmIntAdapterCtrl_Start (&exception); // Schließt die Library wieder Close_RmIntAdapter (); exit(1); }
I hope someone knows what to do now, I would appreciate it.
08-17-2010 09:30 AM