18{
24 ULONG ulSize, ulClusterSize = 0;
30
32 wcscat(VolumeNameBuffer,
L"\\");
33
35
38 0,
41
46 0,
49 {
51 {
54 }
56 {
61 }
62
64 }
65
69 ulSize);
70 if (pAttributeInfo ==
NULL)
71 {
73 goto done;
74 }
75
78 pAttributeInfo,
79 ulSize,
82 {
84 goto done;
85 }
86
89 &FullSizeInfo,
93 {
95 }
96 else
97 {
100 &SizeInfo,
104 {
106 }
107 }
108
109
112
116
117done:
118 if (pAttributeInfo)
119 RtlFreeHeap(RtlGetProcessHeap(), 0, pAttributeInfo);
120
122
124}
void ConResPrintf(FILE *fp, UINT nID,...)
#define FILE_DIRECTORY_FILE
#define IDS_FILESYSTEMS_CURRENT
#define IDS_ERROR_NO_MEDIUM
#define IDS_FILESYSTEMS_CLUSTERSIZE
#define IDS_FILESYSTEMS_TYPE
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
_Must_inspect_result_ _Inout_opt_ PUNICODE_STRING VolumeName
_Must_inspect_result_ _Out_ PHANDLE VolumeHandle
#define FILE_SYNCHRONOUS_IO_NONALERT
struct _FILE_FS_ATTRIBUTE_INFORMATION FILE_FS_ATTRIBUTE_INFORMATION
@ FileFsAttributeInformation
#define FILE_OPEN_FOR_BACKUP_INTENT
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
#define FileFsFullSizeInformation
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
NTSTATUS NTAPI NtQueryVolumeInformationFile(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, PVOID FsInformation, ULONG Length, FS_INFORMATION_CLASS FsInformationClass)
WCHAR DeviceName[MAX_PATH]
#define STATUS_UNRECOGNIZED_VOLUME
#define STATUS_NO_MEDIA_IN_DEVICE
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO