Hi, I am trying to use RAPI to write to a file in a Pocket PC. Using the code:
[DllImport("rapi.dll", CharSet=CharSet.Unicode)] private static extern int CeCreateFile( string lpFileName, uint dwDesiredAccess, uint dwShareMode, uint lpSecurityAttributes, uint dwCreationDisposition, uint dwFlagsAndAttributes, uint hTemplateFile); I am able to write to a file that I just created and whose handle I have. However when I need to get the handle first and when I try to do it through CeFindFirstFile I get all kinds of errors errors. I declared CeFindFirstFile as: [DllImport("rapi.dll", CharSet=CharSet.Unicode)] private static extern int CeFindFirstFile( string lpFileName, ref RemoteCETypeLibrary.CE_FIND_DATA typFindData); Has anyone been successful in using this function? Thanks, -- Gerard You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.