Need help calling a proprietary C DLL from Python
craigm3604 at gmail.com
Thu Mar 20 19:38:51 CET 2008
On Mar 20, 2:29 pm, sturlamolden <sturlamol... at yahoo.no> wrote:
> On 20 Mar, 19:09, Craig <craigm3... at gmail.com> wrote:
> The culprit i here:
> > Before - X = 0, CacheSize = 0, OpenMode = 3, vHandle = 0
> This binds these names to Python ints, but byref expects C types.
> Also observe that CacheSize and OpenMode should be c_short.
I changed CacheSize and OpenMode to c_short, and commented out that
line producing the "Before" message, and the output is the same.
Further "tinkering" revealed that it is the byref on the fName and pw
that are causing the error.
The entire problem appears to be around the production of a BSTR and
the passing of pointers (byref) to the BSTR.
More information about the Python-list