I have the following code:
[DllImport("rapi.dll", CharSet = CharSet.Unicode)]
public static extern bool CeCreateDirectory(string lpPathName, IntPtr lpSecurityAttributes);
and in a function I've attempted, amongst other things, the following:
CeCreateDirectory( "\\fail\\", ptr )
CeCreateDirectory( "C:\\fail\\", ptr )
CeCreateDirectory( "\\fail", ptr )
CeCreateDirectory( "C:\\fail", ptr )
Every time the function returns false, I just want to create a directory on the device but not sure how.
Did you first call CeRapiInit (or CeRapiInitEx)? And why reinvent the wheel? All of this RAPI stuff is already wrapped and open-sourced in the OpenNETCF Desktop Communication library.