internal static extern IntPtr CreateFile( string filename, [MarshalAs(UnmanagedType.U4)] FileAccess desiredAccess, [MarshalAs(UnmanagedType.U4)] FileShare shareMode, IntPtr securityAttributes, [MarshalAs(UnmanagedType.U4)] FileMode creationDisposition, [MarshalAs(UnmanagedType.U4)] FILE_ATTRIBUTES flags, IntPtr template);
private static extern SafeFileHandle CreateFile( string lpFileName, Winnt.ACCESS_MASK dwDesiredAccess, SHARE_MODE dwShareMode, IntPtr lpSecurityAttributes, CREATION_DISPOSITION dwCreationDisposition, FILE_ATTRIBUTES dwFlagsAndAttributes, IntPtr hTemplateFile );
public static extern IntPtr CreateFile(string name, GENERIC DesiredAccess, FILE_SHARE ShareMode, int SecurityAttributes, FILE_DISPOSITION CreationDisposition, FILE_ATTRIBUTES FlagsAndAttributes, int hTemplateFile);