Пример #1
0
 public static extern SafeFileHandle CreateFile(
     [MarshalAs(UnmanagedType.LPWStr)] string lpFileName,
     [MarshalAs(UnmanagedType.U4)] FileSystemDesiredAccess dwDesiredAccess,
     [MarshalAs(UnmanagedType.U4)] FileShare dwShareMode,
     [MarshalAs(UnmanagedType.LPStruct)] SecurityAttributes lpSecurityAttributes,
     [MarshalAs(UnmanagedType.U4)] FileMode dwCreationDisposition,
     [MarshalAs(UnmanagedType.U4)] FileSystemDesiredAccess dwFlagsAndAttributes,
     IntPtr hTemplateFile);
Пример #2
0
 public static extern SafeFileHandle CreateFileTransacted(
     [MarshalAs(UnmanagedType.LPWStr)] string lpFileName,
     [MarshalAs(UnmanagedType.U4)] FileSystemDesiredAccess dwDesiredAccess,
     [MarshalAs(UnmanagedType.U4)] FileShare dwShareMode,
     [MarshalAs(UnmanagedType.LPStruct)] SecurityAttributes lpSecurityAttributes,
     [MarshalAs(UnmanagedType.U4)] FileMode dwCreationDisposition,
     [MarshalAs(UnmanagedType.U4)] FileSystemDesiredAccess dwFlagsAndAttributes,
     IntPtr hTemplateFile,
     SafeHandle hTransaction,
     IntPtr pusMiniVersion,
     IntPtr pExtendedParameter);