Click or drag to resize

NativeFileIO Class

Provides wrappers for Win32 file API. This makes it possible to open everything that CreateFile() can open and get a FileStream based .NET wrapper around the file handle.
Inheritance Hierarchy
SystemObject
  Arsenal.ImageMounter.IONativeFileIO

Namespace:  Arsenal.ImageMounter.IO
Assembly:  Arsenal.ImageMounter (in Arsenal.ImageMounter.dll) Version: 1.0.0.0 (3.4.140.0)
Syntax
public sealed class NativeFileIO

The NativeFileIO type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAddFilter(UInt32, String)
Public methodStatic memberAddFilter(Guid, String, Boolean)
Public methodStatic memberAddProcessPaths(Boolean, String)
Adds a semicolon separated list of paths to the PATH environment variable of current process. Any paths already in present PATH variable are not added again.
Public methodStatic memberAddProcessPaths(Boolean, String)
Adds a list of paths to the PATH environment variable of current process. Any paths already in present PATH variable are not added again.
Public methodStatic memberAllowExtendedDASDIO
Public methodStatic memberCompressFile
Public methodStatic memberConvertManagedFileAccess
Public methodStatic memberCreateDirectoryJunction(SafeFileHandle, String)
Creates a directory junction
Public methodStatic memberCreateDirectoryJunction(String, String)
Creates a directory junction
Public methodStatic memberCreateHardLink
Public methodStatic memberCreateRootPnPDevice
Public methodStatic memberCreateWaitHandle
Public methodStatic memberDeleteVolumeMountPoint
Public methodStatic memberDeviceIoControl
Sends an IOCTL control request to a device driver, or an FSCTL control request to a filesystem driver.
Public methodStatic memberDismountVolumeFilesystem
Locks and dismounts filesystem on a volume. Upon successful return, further access to the device can only be done through the handle passed to this function until handle is closed or lock is released.
Public methodStatic memberDriverPackageInstall
Public methodStatic memberDriverPackagePreinstall
Public methodStatic memberDriverPackageUninstall
Public methodStatic memberEnableFileSecurityBypassPrivileges
Public methodStatic memberEnablePrivileges
Public methodStatic memberEnumerateChildDevices
Public methodStatic memberEnumerateDeviceInstancesForService
Public methodStatic memberEnumerateDiskVolumes(String)
Public methodStatic memberEnumerateDiskVolumes(UInt32)
Public methodStatic memberEnumerateDiskVolumesMountPoints(String)
Public methodStatic memberEnumerateDiskVolumesMountPoints(UInt32)
Public methodStatic memberEnumerateHandleTableHandleInformation
Public methodStatic memberEnumerateProcessesHoldingFileHandle
Public methodStatic memberEnumerateRegisteredFilters
Public methodStatic memberEnumerateVolumeMountPoints
Public methodStatic memberEnumerateVolumeNamesForDeviceObject
Public methodStatic memberEnumerateWin32DevicePaths
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodStatic memberFindFirstFreeDriveLetter
Public methodStatic memberFindFirstFreeDriveLetter(Char)
Public methodStatic memberFlushBuffers
Public methodStatic memberGenRandomGuid
Public methodStatic memberGenRandomInt32
Public methodStatic memberGenRandomInt64
Public methodStatic memberGenRandomUInt32
Public methodStatic memberGenRandomUInt64
Public methodStatic memberGetDeviceNameByScsiAddressAndSize Obsolete.
Returns a disk device object name for a specified SCSI address.
Public methodStatic memberGetDeviceRegistryProperty
Public methodStatic memberGetDevicesScsiAddresses
Public methodStatic memberGetDevInst
Public methodStatic memberGetDiskGeometry
Retrieves disk geometry.
Public methodStatic memberGetDiskOffline
Public methodStatic memberGetDiskReadOnly
Public methodStatic memberGetDiskSize
Public methodStatic memberGetDriveLayoutEx
Public methodStatic memberGetExceptionForNtStatus
Public methodStatic memberGetExeFileHeader(Byte)
Public methodStatic memberGetExeFileHeader(Stream)
Public methodStatic memberGetExeFileHeader(String)
Public methodStatic memberGetFileSize(SafeFileHandle)
Public methodStatic memberGetFileSize(String)
Public methodStatic memberGetFileVersion(Byte)
Public methodStatic memberGetFileVersion(Stream)
Public methodStatic memberGetFileVersion(String)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodStatic memberGetModuleFullPath
Public methodStatic memberGetMountPointBasedPath
Public methodStatic memberGetNtPath
Public methodStatic memberGetOSVersion
Public methodStatic memberGetPartitionInformation
Public methodStatic memberGetPartitionInformationEx
Public methodStatic memberGetPhysicalDeviceObjectName
Public methodStatic memberGetPhysicalDrivePathForNtDevice
Retrieves PhysicalDrive or CdRom path for NT raw device path
Public methodStatic memberGetProcAddress(IntPtr, String, Type)
Public methodStatic memberGetProcAddress(String, String, Type)
Public methodStatic memberGetRegisteredFilters
Public methodStatic memberGetScsiAddress(SafeFileHandle)
Retrieves SCSI address.
Public methodStatic memberGetScsiAddress(String)
Retrieves SCSI address.
Public methodStatic memberGetScsiAddressAndLength
Public methodStatic memberGetScsiAddressForNtDevice
Retrieves status of write overlay for mounted device.
Public methodStatic memberGetStorageDeviceNumber
Retrieves storage device number.
Public methodStatic memberGetSystemHandleTable
Returns current system handle table.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberGetVolumeDiskExtents
Public methodStatic memberGetVolumeNameForVolumeMountPoint
Public methodStatic memberGetVolumeSizeInformation
Public methodStatic memberGrowPartition
Public methodStatic memberInitializeDisk
Public methodStatic memberInstallFromInfSection
Public methodStatic memberIsDiskWritable
Public methodStatic memberMoveFile
Public methodStatic memberNtCreateFile
Calls NT API NtCreateFile() function and encapsulates returned handle in a SafeFileHandle object.
Public methodStatic memberNtDllTry
Encapsulates call to an ntdll.dll API function that returns an NTSTATUS value indicating success or error status. If result is zero or positive, this function just passes through that value as return value. If result is negative indicating an error, it converts error code to a Win32 error code and throws a managed exception for that error code.
Public methodStatic memberNtOpenEvent
Calls NT API NtOpenEvent() function to open an event object using NT path and encapsulates returned handle in a SafeWaitHandle object.
Public methodStatic memberOpenBackupHandle
Calls Win32 API CreateFile() function to create a backup handle for a file or directory and encapsulates returned handle in a SafeFileHandle object. This handle can later be used in calls to Win32 Backup API functions or similar.
Public methodStatic memberOpenDiskByScsiAddress
Opens a disk device with a specified SCSI address and returns both name and an open handle.
Public methodStatic memberOpenFileHandle(String, FileAccess, FileShare, FileMode, Boolean)
Calls Win32 API CreateFile() function and encapsulates returned handle in a SafeFileHandle object.
Public methodStatic memberOpenFileHandle(String, FileAccess, FileShare, FileMode, FileOptions)
Calls Win32 API CreateFile() function and encapsulates returned handle in a SafeFileHandle object.
Public methodStatic memberOpenFileHandle(String, FileAccess, FileShare, FileMode, UInt32)
Calls Win32 API CreateFile() function and encapsulates returned handle in a SafeFileHandle object.
Public methodStatic memberOpenFileStream(String, FileMode, FileAccess, FileShare)
Calls Win32 API CreateFile() function and encapsulates returned handle.
Public methodStatic memberOpenFileStream(String, FileMode, FileAccess, FileShare, Boolean)
Calls Win32 API CreateFile() function and encapsulates returned handle.
Public methodStatic memberOpenFileStream(String, FileMode, FileAccess, FileShare, Int32)
Calls Win32 API CreateFile() function and encapsulates returned handle.
Public methodStatic memberOpenFileStream(String, FileMode, FileAccess, FileShare, Int32, Boolean)
Calls Win32 API CreateFile() function and encapsulates returned handle.
Public methodStatic memberParseDoubleTerminatedString(Array, Int32)
Public methodStatic memberParseDoubleTerminatedString(Char, Int32)
Public methodStatic memberQueryDirectoryJunction(SafeFileHandle)
Get directory junction target path
Public methodStatic memberQueryDirectoryJunction(String)
Returns directory junction target path
Public methodStatic memberQueryDosDevice
Public methodStatic memberQueryDosDevice(String)
Public methodStatic memberReadNullTerminatedString
Public methodStatic memberRemoveFilter(Guid, String)
Public methodStatic memberRemoveFilter(UInt32, String)
Public methodStatic memberRemovePnPDevice
Public methodStatic memberRestartDevice
Public methodStatic memberRunDLLInstallHinfSection
Public methodStatic memberScanForHardwareChanges
Public methodStatic memberScanForHardwareChanges(String)
Public methodStatic memberSetDiskOffline
Public methodStatic memberSetDiskReadOnly
Public methodStatic memberSetDriveLayoutEx
Public methodStatic memberSetEvent
Public methodStatic memberSetFileSparseFlag
Public methodStatic memberSetInheritable
Public methodStatic memberSetProtectFromClose
Public methodStatic memberSetRegisteredFilters(Guid, String)
Public methodStatic memberSetRegisteredFilters(UInt32, String)
Public methodStatic memberSetupCopyOEMInf
Public methodStatic memberSetVolumeMountPoint
Public methodStatic memberSetVolumeOffline
Public methodStatic memberTestFileOpen
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodStatic memberUncompressFile
Public methodStatic memberUpdateDiskProperties
Re-enumerates partitions on all disk drives currently connected to the system. No exceptions are thrown on error, but any exceptions from underlying API calls are logged to trace log.
Public methodStatic memberUpdateDiskProperties(String)
Re-enumerates partitions on a disk device with a specified device path. No exceptions are thrown on error, but any exceptions from underlying API calls are logged to trace log.
Public methodStatic memberUpdateDiskProperties(NativeFileIOSCSI_ADDRESS)
Re-enumerates partitions on a disk device with a specified SCSI address. No exceptions are thrown on error, but any exceptions from underlying API calls are logged to trace log.
Public methodStatic memberUpdateDiskProperties(SafeFileHandle, Boolean)
Public methodStatic memberUpdateDriverForPnPDevices
Public methodStatic memberVolumeUsesDisk
Public methodStatic memberWin32Try(Boolean)
Encapsulates call to a Win32 API function that returns a BOOL value indicating success or failure and where an error value is available through a call to GetLastError() in case of failure. If value True is passed to this method it does nothing. If False is passed, it calls GetLastError(), converts error code to a HRESULT value and throws a managed exception for that HRESULT.
Public methodStatic memberWin32TryT(T)
Encapsulates call to a Win32 API function that returns a value where failure is indicated as a NULL return and GetLastError() returns an error code. If non-zero value is passed to this method it just returns that value. If zero value is passed, it calls GetLastError() and throws a managed exception for that error code.
Top
Fields
See Also