Re: Retrieving BSTR * from a DLL

2008-07-10 Thread mzdude
On Jul 10, 6:15 am, Andrew MacIntyre <[EMAIL PROTECTED]> wrote: > This likely indicates that the DLL is using the C calling convention > and not the stdcall calling convention.  Use CDLL rather than WinDLL > to load the DLL. using cdll got me over the calling hurdle. However, I'm not seeing the r

Re: Retrieving BSTR * from a DLL

2008-07-10 Thread Andrew MacIntyre
mzdude wrote: I need to interface with a windows DLL that has the following signature extern "C" void Foo( BSTR in, BSTR *out ) Code so far from ctypes import * import comtypes LPBSTR = POINTER(comtypes.BSTR) hdl = windll.MyDll.Foo hdl.rettype = None hdl.argtypes = [comtypes.BSTR, LPBSTR] i

Retrieving BSTR * from a DLL

2008-07-09 Thread mzdude
I need to interface with a windows DLL that has the following signature extern "C" void Foo( BSTR in, BSTR *out ) Code so far >>> from ctypes import * >>> import comtypes >>> LPBSTR = POINTER(comtypes.BSTR) >>> >>> hdl = windll.MyDll.Foo >>> hdl.rettype = None >>> hdl.argtypes = [comtypes.BSTR,