[DllImport("rapi.dll", CharSet=CharSet.Unicode)]
public static extern int CeCreateFile(
string lpFileName,
uint dwDesiredAccess,
int dwShareMode,
int lpSecurityAttributes,
int dwCreationDisposition,
int dwFlagsAndAttributes,
int hTemplateFile);
short FILE_ATTRIBUTE_NORMAL = 0x80;
short FILE_ATTRIBUTE_DIRECTORY = 0x10;
short FILE_ATTRIBUTE_TEMPORARY = 0x100;
uint GENERIC_READ = 0x80000000;
uint GENERIC_WRITE = 0x40000000;
short CREATE_NEW = 1;
short CREATE_ALWAYS = 2;
short OPEN_EXISTING = 3;
function info on msdn at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceactsy/html/cerefCeCreateFileRAPI.asp
Please add some!
CeCreateFile("\\test.txt", GENERIC_READ | GENERIC_WRITE, 0, 0, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, 0);
OpenNETCF allow to use all the possibilities of the Remote API, http://www.opennetcf.org/library/OpenNETCF.Desktop.Communication.html