Beispiel #1
0
 public TempFile(Kernel32.FileAccess dwDesiredAccess, FileShare dwShareMode, FileMode dwCreationDisposition = FileMode.OpenOrCreate, FileFlagsAndAttributes dwFlagsAndAttributes = FileFlagsAndAttributes.FILE_ATTRIBUTE_NORMAL) : this()
 {
     hFile = CreateFile(FullName, dwDesiredAccess, dwShareMode, null, dwCreationDisposition, dwFlagsAndAttributes, IntPtr.Zero);
 }
Beispiel #2
0
 /// <summary>Initializes a new instance of the <see cref="TempFile"/> class and retrieves a handle to the file.</summary>
 /// <param name="dwDesiredAccess">The desired access.</param>
 /// <param name="dwShareMode">The share mode.</param>
 /// <param name="dwCreationDisposition">The creation disposition.</param>
 /// <param name="dwFlagsAndAttributes">The flags and attributes.</param>
 public TempFile(Kernel32.FileAccess dwDesiredAccess, FileShare dwShareMode, FileMode dwCreationDisposition = FileMode.OpenOrCreate,
                 FileFlagsAndAttributes dwFlagsAndAttributes = FileFlagsAndAttributes.FILE_ATTRIBUTE_NORMAL) : this(string.Empty) =>
Beispiel #3
0
 public static SafeFileHandle Create(string path, Kernel32.FileAccess access, FileShare shareMode, IntPtr securityAttributes, CreationDisposition disposition, FileAttributes flagsAndAttributes, IntPtr templateFile)
 {
     return(NativeMethods.CreateFile(path, access, shareMode, securityAttributes, disposition, flagsAndAttributes, templateFile));
 }