Jan Ischebeck schrieb: > Hi Thomas, > > Your script works well for me on Ubuntu Feisty. > > The only issue I have is, that it doesn't detect the "//Program Files/" > folder correctly for non-US Pocket PCs. (E.g. German WinCE uses > "//Programme/"). > > I've tried to get this directory via CeGetSpecialFolder, but was not > successful. Below my additions to rapi.py to make use CeGetSpecialFolder.
The magic constant is CSIDL_PROGRAM_FILES = 0x26. I have adapted your patch somewhat and committed it to the repository. Can you please check if it works for you? > > Jan > > ##################################################################### > # getSpecialFolderPath > > rapi.CeGetSpecialFolderPath.errcheck = errcheck > rapi.CeGetSpecialFolderPath.argtypes = (ctypes.c_int, DWORD, > ctypes.c_void_p); > > def GetSpecialFolderPath(folderid): > length=128 > buf = ctypes.create_string_buffer('\000' * length) > rapi.CeGetSpecialFolderPath(folderid, length, buf) > value = ctypes.string_at(buf, length).decode('utf-16') > return value[0:value.index('\x00')] Thanks for tha patch, Thomas _______________________________________________ PythonCE mailing list PythonCE@python.org http://mail.python.org/mailman/listinfo/pythonce