private static extern SafeFileHandle CreateFile( [MarshalAs(UnmanagedType.LPTStr)] string fileName, [MarshalAs(UnmanagedType.U4)] CreateFileAccessTypes fileAccess, [MarshalAs(UnmanagedType.U4)] CreateFileShares fileShare, IntPtr securityAttributes, [MarshalAs(UnmanagedType.U4)] CreateFileDisposition creationDisposition, [MarshalAs(UnmanagedType.U4)] CreateFileAttributes flags, IntPtr templateFile);
public static extern IntPtr CreateFile( [MarshalAs(UnmanagedType.LPWStr)] String lpFileName, FileAccess dwDesiredAccess, ShareMode dwShareMode, IntPtr lpSecurityAttributes, CreationDisposition dwCreationDisposition, CreateFileAttributes dwFlagsAndAttributes, IntPtr hTemplateFile );
public static extern IntPtr CreateFile( [MarshalAs(UnmanagedType.LPWStr)] String lpFileName, FileAccess dwDesiredAccess, ShareMode dwShareMode, IntPtr lpSecurityAttributes, CreationDisposition dwCreationDisposition, CreateFileAttributes dwFlagsAndAttributes, IntPtr hTemplateFile );