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.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to