"mammar" <[email protected]> wrote in message news:[email protected]...
Hi All,I have created a DLL with the following function exported in it int myFunction(char *id, char *name); Below is the python code to load the dll and call myFunction from ctypes import * # Load DLL into memory mydll= windll.LoadLibrary("my.dll") id = create_string_buffer("030725002") name = create_string_buffer("mammar") print mydll.myFunction(id, name) But when i run the above code i am getting error dialog box with following info Debug Assertion Failed! Program: C:\Python27\pythonw.exe file: fread.c line: 93 Expression: (buffer != NULL) Whats the problem? Any idea?
"windll" requires the function called to be __stdcall calling convention. The default is normally __cdecl. Try "cdll" instead.
-Mark _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
