[Tutor] python ctypes dll issue
mammar
mammar at gmail.com
Sun May 8 21:49:27 CEST 2011
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?
Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110509/91729043/attachment.html>
More information about the Tutor
mailing list