Problem passing LPVOID
Andreas Schumann
Andreas.Schumann at schupag.ch
Thu Apr 10 06:06:08 EDT 2003
Hi
I'm writing my first extension to Python to use a Windows dll. Now I'm
having a problem to pass a parameter of typ LPVOID from Python to the dll.
Example:
The dll function is defined in the header file as follows:
DWORD dll_function (LPVOID data);
data can be a pointer to anything (int, string, etc.). I.e. in Python I
should be able to use this function passing any type of data, e.g.:
res = dll_function(12)
res = dll_function('aaa')
How do I have to use PyArg_ParseTuple to get data to be passed to the dll
function? Do I have to use "O&" and write my own converter function?
Thanks
Andy Schumann
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 6024 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030410/ea0d8daa/attachment.bin>
More information about the Python-list
mailing list