Tom
Tom

Reputation: 591

ctypes calling function with windows datatypes arguments

Could someone help me how should I call the following function using ctypes python library:

DWORD myfunc(LPCSTR a,BYTE b, LPBYTE c, LPDWORD d, LPCBYTE *e,DWORD LEN)

How should I declare and initialize the arguments of the mentioned functions? Could someone provide an example?

Upvotes: 2

Views: 279

Answers (1)

fmark
fmark

Reputation: 58577

Try:

from ctypes.wintypes import *

It has most of the types you want.

Upvotes: 3

Related Questions