[PythonCE] remote-console
Thomas Heller
theller at ctypes.org
Fri Feb 23 09:32:14 CET 2007
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
More information about the PythonCE
mailing list