VC++ types to ctypes

lux luca.tavoletti at gmail.com
Mon Jun 12 17:25:09 CEST 2006


Hi to all,
i need to traslate this struct in python using ctypes

struct Soptions
{
char          chVolumeLabel[128];
__int32      nSessionToImport;
BS_BOOL bJolietFileSystem;
BS_BOOL bBootable;
TCHAR      chBootImage[_MAX_PATH];
BS_BOOL bFinalize;
BS_BOOL bTestBurn;
BS_BOOL bPerformOPC;
BS_BOOL bVerifyAfterBurn;
__int32      nCacheSize;
BS_BOOL bUnderrunProtection;
BS_BOOL bEjectAfterBurn;
__int32      nCopies;
}

I try to convert:

char xxx[128] -> c_char*128
__int32          -> c_int
BS_BOOL     -> c_byte

TCHAR      chBootImage[_MAX_PATH]; -> ???

But not work...
how to solve it?

Thank's, Luca




More information about the Python-list mailing list