Using CTypes Module

Max Ischenko max at malva.com.uaREMOVE.IT
Mon Feb 3 06:32:32 EST 2003


 Brandon Philips wrote:

>>>> from ctypes import windll, cdll
>>>> cdll.ninebutton.writePacket(1,3)
> Traceback (most recent call last):
>  File "<stdin>", line 1, in ?
>  File "C:\Python22\Lib\site-packages\ctypes.py", line 126, in __getattr__
>    func = _DynFunction(name, self, FUNCFLAG_CDECL)
> ValueError: function 'writePacket' not found
>>>>

> ninebutton.dll is my dll and writePacket(int, int) is my function.  What did
> I do wrong?

What dir(ninebutton) prints?

Seems like you 've successfully loaded your dll but failed to bind a
function.

-- 
Mommy, what happens to your files when you die?




More information about the Python-list mailing list