IntPtr CreateFile( string lpFileName, ACCESS dwDesiredAccess, FILE_SHARE dwShareMode, int Res, FILE_ACTION dwCreationDispostion, FILE_ATTRIBUTE dwFlagsAndAttributes, int Res2);
/// <summary>Open the wav file</summary> /// <param name="file">file name</param> /// <param name="access">access level</param> /// <param name="share">share method</param> /// <param name="method">open method</param> /// <returns>handle of file</returns> private IntPtr FileOpen(string file, FILE_ACCESS access, FILE_SHARE share, FILE_METHOD method) { return(CreateFile(file, (uint)access, (uint)share, IntPtr.Zero, (uint)method, 0, IntPtr.Zero)); }
public static extern IntPtr CreateFile( [In] [MarshalAs(UnmanagedType.LPTStr)] string lpFileName, uint dwDesiredAccess, FILE_SHARE dwShareMode, [In] IntPtr lpSecurityAttributes, uint dwCreationDisposition, FILE_CREATE dwFlagsAndAttributes, [In] IntPtr hTemplateFile);
public static extern IntPtr CreateFile(string name, GENERIC DesiredAccess, FILE_SHARE ShareMode, int SecurityAttributes, FILE_DISPOSITION CreationDisposition, FILE_ATTRIBUTES FlagsAndAttributes, int hTemplateFile);
public static extern IntPtr CreateFile(string lpFileName, uint dwDesiredAccess, FILE_SHARE dwShareMode, [In] ref SECURITY_ATTRIBUTES lpSecurityAttributes, FileMode dwCreationDisposition, uint dwFlagsAndAttributes, IntPtr hTemplateFile);
public static extern IntPtr CreateFile(string lpFileName, STANDARD_RIGHTS dwDesiredAccess, FILE_SHARE dwShareMode, IntPtr lpSecurityAttributes, FileMode dwCreationDisposition, FILE_ATTRIBUTE dwFlagsAndAttributes, IntPtr hTemplateFile);
public static extern IntPtr CreateFile(string lpFileName, ACCESS_MASK dwDesiredAccess, FILE_SHARE dwShareMode, IntPtr lpSecurityAttributes, FileMode dwCreationDisposition, uint dwFlagsAndAttributes, IntPtr hTemplateFile);
public static extern IntPtr CreateFile(string lpFileName, GENERIC dwDesiredAccess, FILE_SHARE dwShareMode, IntPtr lpSecurityAttributes, FileMode dwCreationDisposition, SECURITY dwFlagsAndAttributes, IntPtr hTemplateFile);