Using windll with complex data types

Neil Hodgson nhodgson at bigpond.net.au
Sun Nov 3 01:01:56 EST 2002


Ben C:

> API short int __stdcall GetVersion( VERSION *lpVersion );
> ...
> # If I Feed This Into The Builtin Struct Function
> struct.unpack( 'l', '\x03\x00\x02\x00' )

   Which is likely to mean version 2.0.3 as version numbers often encode
their parts in separate bytes.

> # I End Up With A Nonsense Number
> (131075,)

   == 0x20003

   Neil





More information about the Python-list mailing list