Click or drag to resize

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

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,
	bool Overlapped
)

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.
Overlapped
Type: SystemBoolean
Specifies whether to request overlapped I/O.

Return Value

Type: SafeFileHandle
See Also