I have some old code that I use to query files and directories on a
Pocket PC using the RAPI CeFindFirstFile/CeFindNextFile functions.
But, the code no longer works with Windows Mobile 5.0 devices.

The first call to CeFindFirstFile() returns CE_FIND_DATA.
dwFileAttributes = 0x14 (which is FILE_ATTRIBUTE_SYSTEM |
FILE_ATTRIBUTE_DIRECTORY) and CE_FIND_DATA.cFileName = "". The next
call to CeFindNextFile() returns false.

Anybody else having this problem?

Thanks!

Re: CeFindFirstFile, RAPI, and Windows Mobile 5 by gf

gf
Sat Oct 29 11:20:44 CDT 2005

More info...

This appears to be specific to the O2 XDA EXEC PDA running Windows
Mobile 5. Any CeFindFirstFIle() call will return cFileName = "" and
dwFileAttributes = 0x14. Further any CeFindNextFile() call will return
0 with CeGetLastError() of ERROR_NO_MORE_FILES. So, I can never parse
more than a single, no named, file on this device.

Here are the calls I'm making which return success with cFileName = ""
and dwFileAttributes = 0x14

CeFindFirstFile(L"\\*", &FindData);
CeFindFirstFile(L"\\Windows\\*", &FindData);
CeFindFirstFile(L"\\Temp\\*", &FindData);

Any ideas? Could there be some RAPI security setup going on here?
Strange.


Re: CeFindFirstFile, RAPI, and Windows Mobile 5 by Ahmed

Ahmed
Thu Jan 26 17:27:39 CST 2006

Strange, I have just tried it against SmartPhone device with RAPI security
Turned on and I enumerated more then 1 file. Can you post the code you use
for the enumeration?

--
> --
> Ahmed Smahi [MSFT]
> Test@online.microsoft.com
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
"gf" <gulliblefool@yahoo.com> wrote in message
news:1130602844.508029.65390@g44g2000cwa.googlegroups.com...
> More info...
>
> This appears to be specific to the O2 XDA EXEC PDA running Windows
> Mobile 5. Any CeFindFirstFIle() call will return cFileName = "" and
> dwFileAttributes = 0x14. Further any CeFindNextFile() call will return
> 0 with CeGetLastError() of ERROR_NO_MORE_FILES. So, I can never parse
> more than a single, no named, file on this device.
>
> Here are the calls I'm making which return success with cFileName = ""
> and dwFileAttributes = 0x14
>
> CeFindFirstFile(L"\\*", &FindData);
> CeFindFirstFile(L"\\Windows\\*", &FindData);
> CeFindFirstFile(L"\\Temp\\*", &FindData);
>
> Any ideas? Could there be some RAPI security setup going on here?
> Strange.
>