use win32 COM in python

Peter Hansen peter at engcorp.com
Tue Aug 31 08:32:58 EDT 2004


Lin Jingxian wrote:
> thanks, Dave and Peter
> I can use pythoncom, but since there isn't pointer in python (is it?), I
> dont know how to call the : int read(unsigned char* buf, int length) method
> in python.what unsigned char* buf should be represented in python?thanks
> again.

I think Miki's answer is probably on target for doing that from
pythoncom.  That is, don't, but use the Dispatch interface instead.

 From ctypes, however, you can create special objects which ctypes can
use as pointer types.  For example, byref(sometype) is roughly
equivalent to "sometype * xxx" when using ctypes.

-Peter



More information about the Python-list mailing list