calldll & PyArg_ParseTuple strings
Scott McClellan
801d at my-deja.com
Sat Jul 3 16:12:29 EDT 1999
More information about the Python-list mailing list
Sat Jul 3 16:12:29 EDT 1999
- Previous message (by thread): Save your printing money
- Next message (by thread): calldll & PyArg_ParseTuple strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello, I'm attempting to use Sam Rushing's calldll module to call a C function in a dll, with the following prototype: long __declspec(dllexport)func(long *x, long *y, long *z) I expect the function to give certain values back in x, y, and z, but so far have been unable to make that happen. Let's say that I have three long integers in Python that I initialize as follows: x=y=z=0L My question is, in the following call from Python, call_foreign_function(pFunc, 'lll', 'l', (<?>,<?>,<?>)) what should the tuple (<?>,<?>,<?>) contain? If I pass (x,y,z), the Python interpreter (Idle in my case) crashes, and this is understandable, since it results in the contents of x, y, and z being used as addresses to write to. I've tried (id(x),id(y),id(z)), since id() is supposed to return the address of a Python object - Python didn't crash as before, but nothing was copied into x, y, and z, either. Can anyone point me in the right direction? Thanks, Scott McClellan Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.
- Previous message (by thread): Save your printing money
- Next message (by thread): calldll & PyArg_ParseTuple strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list