public static extern IntPtr CreateFile(string lpFileName, GENERIC dwDesiredAccess, FILE_SHARE dwShareMode, [In] ref SECURITY_ATTRIBUTES lpSecurityAttributes, FileMode dwCreationDisposition, uint 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);
public static extern IntPtr CreateFile(string lpFileName, GENERIC dwDesiredAccess, FILE_SHARE dwShareMode, IntPtr lpSecurityAttributes, FileMode dwCreationDisposition, FileFlagsAndAttributes dwFlagsAndAttributes, IntPtr hTemplateFile);