On Monday, 29 October 2012 at 14:01:09 UTC, Daniel Murphy wrote:
"Artie" <[email protected]> wrote in message
news:[email protected]...
BTW, it's said in the ABI reference that `unsigned long` must
be substituted with `uint`. And it seems to work fine for the
data I used in the example.
unsigned int and unsigned long are the same size in 32 bit
C/C++, but are
mangled differently when using C++ name mangling. unsigned
long may not be
32 bits on all platforms, so to portably match the size used by
the native
C/C++ compiler you should use the c_ulong aliases.
The problem with name mangling is avoided in this case as
you're not using
C++ name mangling, you're using stdcall name mangling, which
only keeps
track of argument sizes, not their types.
That makes sense. I was unaware of such details. Thanks a lot.