53 sizeof(
Volume->FileSystem));
55 DPRINT1(
"InferFileSystem() failed, Status 0x%08lx\n",
Status);
123 LabelInfo.VolumeLabel, LabelInfo.VolumeLabelLength);
127 DPRINT1(
"NtQueryVolumeInformationFile() failed, Status 0x%08lx\n",
Status);
170 DPRINT1(
"ERROR: Cannot open volume %S for dismounting! (Status 0x%lx)\n",
183 DPRINT1(
"WARNING: Failed to lock volume (Status 0x%lx)\n", LockStatus);
196 DPRINT1(
"Failed to unmount volume (Status 0x%lx)\n",
Status);
209 DPRINT1(
"Failed to unlock volume (Status 0x%lx)\n", LockStatus);
#define PARTITION_FAT32_XINT13
_Inout_ PVCB _In_ BOOLEAN Force
NTSTATUS pOpenDevice(_In_ PCWSTR DevicePath, _Out_ PHANDLE DeviceHandle)
Open an existing device given by its NT-style path, which is assumed to be for a disk device or a par...
NTSTATUS pOpenDeviceEx(_In_ PCWSTR DevicePath, _Out_ PHANDLE DeviceHandle, _In_ ACCESS_MASK DesiredAccess, _In_ ULONG ShareAccess)
Open an existing device given by its NT-style path, which is assumed to be for a disk device or a par...
#define NT_SUCCESS(StatCode)
_Must_inspect_result_ _Out_ PHANDLE VolumeHandle
@ FileFsVolumeInformation
NTSTATUS InferFileSystem(IN PCWSTR PartitionPath OPTIONAL, IN HANDLE PartitionHandle OPTIONAL, IN OUT PWSTR FileSystemName, IN SIZE_T FileSystemNameSize)
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define FSCTL_LOCK_VOLUME
#define FSCTL_UNLOCK_VOLUME
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
#define FSCTL_DISMOUNT_VOLUME
NTSYSAPI NTSTATUS NTAPI NtFsControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
NTSTRSAFEAPI RtlStringCbCopyNW(_Out_writes_bytes_(cbDest) NTSTRSAFE_PWSTR pszDest, _In_ size_t cbDest, _In_reads_bytes_(cbToCopy) STRSAFE_LPCWSTR pszSrc, _In_ size_t cbToCopy)
struct _FILE_FS_VOLUME_INFORMATION FILE_FS_VOLUME_INFORMATION
NTSTATUS NTAPI NtQueryVolumeInformationFile(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, PVOID FsInformation, ULONG Length, FS_INFORMATION_CLASS FsInformationClass)
#define STATUS_ACCESS_DENIED
NTSTATUS DismountVolume(_Inout_ PVOLINFO Volume, _In_ BOOLEAN Force)
Attempts to dismount the designated volume.
NTSTATUS MountVolume(_Inout_ PVOLINFO Volume, _In_opt_ UCHAR MbrPartitionType)
#define IsUnformatted(VolInfo)