Re: How to correctly pass “pointer-to-pointer” into DLL via ctypes?

2012-10-27 Thread zlchen . ken
On Thursday, November 18, 2010 8:03:57 PM UTC+8, Grigory Petrov wrote: > Hello. > > I have a DLL that allocates memory and returns it. Function in DLL is like > this: > > void Foo( unsigned char** ppMem, int* pSize ) > { >   * pSize = 4; >   * ppMem = malloc( * pSize ); >   for( int i = 0; i < *

Re: How to correctly pass “pointer-to-pointer ” into DLL via ctypes?

2010-11-19 Thread Diez B. Roggisch
Grigory Petrov writes: > Hello. > > I have a DLL that allocates memory and returns it. Function in DLL is like > this: > > void Foo( unsigned char** ppMem, int* pSize ) > { >   * pSize = 4; >   * ppMem = malloc( * pSize ); >   for( int i = 0; i < * pSize; i ++ ) (* pMem)[ i ] = i; > } > > Also,