Click or drag to resize

NativeFileIOOpenFileHandle Method (String, FileAccess, FileShare, FileMode, FileOptions)

Calls Win32 API CreateFile() function and encapsulates returned handle in a SafeFileHandle object.

Namespace:  Arsenal.ImageMounter.IO
Assembly:  Arsenal.ImageMounter (in Arsenal.ImageMounter.dll) Version: 1.0.0.0 (3.4.140.0)
Syntax
public static SafeFileHandle OpenFileHandle(
	string FileName,
	FileAccess DesiredAccess,
	FileShare ShareMode,
	FileMode CreationDisposition,
	FileOptions Options
)

Parameters

FileName
Type: SystemString
Name of file to open.
DesiredAccess
Type: System.IOFileAccess
File access to request.
ShareMode
Type: System.IOFileShare
Share mode to request.
CreationDisposition
Type: System.IOFileMode
Open/creation mode.
Options
Type: System.IOFileOptions
Specifies whether to request overlapped I/O.

Return Value

Type: SafeFileHandle
See Also