Re: remote-console

Thomas Heller <[email protected]>
Newsgroups gmane.comp.python.windows-ce
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.