26#define MAX_DOS_DRIVES 26
45 if (dwDriveMap & (1<<
drive))
55 if (dwDriveMap & (1<<
drive))
84 if (dwDriveMap & (1<<
drive))
92 if (dwDriveMap & (1<<
drive))
118 &ProcessDeviceMapInfo.
Query,
119 sizeof(ProcessDeviceMapInfo.
Query),
129 if (ProcessDeviceMapInfo.
Query.DriveMap == 0)
134 return ProcessDeviceMapInfo.
Query.DriveMap;
151 RootPath = lpRootPathName;
152 if (RootPath ==
NULL)
158 if (RootPathU ==
NULL)
164 lpBytesPerSector, lpNumberOfFreeClusters,
165 lpTotalNumberOfClusters);
189 RootPath = lpRootPathName;
190 if (lpRootPathName ==
NULL)
212 if (lpBytesPerSector !=
NULL)
214 *lpBytesPerSector = 0;
249 if (lpSectorsPerCluster !=
NULL)
254 if (lpBytesPerSector !=
NULL)
259 if (lpNumberOfFreeClusters !=
NULL)
282 if (lpTotalNumberOfClusters !=
NULL)
301 *lpTotalNumberOfClusters = TotalClusters;
321 RootPath = lpDirectoryName;
322 if (RootPath ==
NULL)
328 if (RootPathU ==
NULL)
334 lpTotalNumberOfBytes, lpTotalNumberOfFreeBytes);
351 DWORD BytesPerAllocationUnit;
357 RootPath = lpDirectoryName;
358 if (lpDirectoryName ==
NULL)
395 if (lpTotalNumberOfFreeBytes !=
NULL)
413 if (lpFreeBytesAvailableToCaller !=
NULL)
418 if (lpTotalNumberOfBytes !=
NULL)
445 if (lpFreeBytesAvailableToCaller !=
NULL)
450 if (lpTotalNumberOfBytes !=
NULL)
455 if (lpTotalNumberOfFreeBytes !=
NULL)
472 if (lpRootPathName !=
NULL)
477 if (RootPathUStr ==
NULL)
482 RootPathU = RootPathUStr->
Buffer;
511 if (lpRootPathName ==
NULL)
523 if (lpRootPathName == (
PVOID)-1)
528 RootPath = lpRootPathName;
530 if (
wcslen(lpRootPathName) == 2)
535 if (DriveLetter >=
L'A' && DriveLetter <=
L'Z' && lpRootPathName[1] ==
L':')
553 if (DriveLetter >=
L'A' && DriveLetter <=
L'Z' && RootPath[1] ==
L':' &&
563 sizeof(DeviceMap.
Query),
572 Index = DriveLetter -
L'A';
574 if (((1 <<
Index) & DeviceMap.
Query.DriveMap) != 0)
593 if (lpRootPathName ==
NULL)
#define FILE_DIRECTORY_FILE
#define FILE_NON_DIRECTORY_FILE
#define FILE_OPEN_FOR_FREE_SPACE_QUERY
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
#define NT_SUCCESS(StatCode)
UINT WINAPI GetDriveTypeA(IN LPCSTR lpRootPathName)
BOOL WINAPI GetDiskFreeSpaceExW(IN LPCWSTR lpDirectoryName OPTIONAL, OUT PULARGE_INTEGER lpFreeBytesAvailableToCaller, OUT PULARGE_INTEGER lpTotalNumberOfBytes, OUT PULARGE_INTEGER lpTotalNumberOfFreeBytes)
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
BOOL WINAPI GetDiskFreeSpaceExA(IN LPCSTR lpDirectoryName OPTIONAL, OUT PULARGE_INTEGER lpFreeBytesAvailableToCaller, OUT PULARGE_INTEGER lpTotalNumberOfBytes, OUT PULARGE_INTEGER lpTotalNumberOfFreeBytes)
DWORD WINAPI GetLogicalDriveStringsW(IN DWORD nBufferLength, IN LPWSTR lpBuffer)
DWORD WINAPI GetLogicalDriveStringsA(IN DWORD nBufferLength, IN LPSTR lpBuffer)
BOOL WINAPI GetDiskFreeSpaceW(IN LPCWSTR lpRootPathName, OUT LPDWORD lpSectorsPerCluster, OUT LPDWORD lpBytesPerSector, OUT LPDWORD lpNumberOfFreeClusters, OUT LPDWORD lpTotalNumberOfClusters)
BOOL WINAPI GetDiskFreeSpaceA(IN LPCSTR lpRootPathName, OUT LPDWORD lpSectorsPerCluster, OUT LPDWORD lpBytesPerSector, OUT LPDWORD lpNumberOfFreeClusters, OUT LPDWORD lpTotalNumberOfClusters)
BOOL IsThisARootDirectory(IN HANDLE VolumeHandle, IN PUNICODE_STRING NtPathName)
PUNICODE_STRING WINAPI Basep8BitStringToStaticUnicodeString(IN LPCSTR String)
NTSTATUS FreeClusters(PNTFS_VCB Vcb, PNTFS_ATTR_CONTEXT AttrContext, ULONG AttrOffset, PFILE_RECORD_HEADER FileRecord, ULONG ClustersToFree)
struct _FileName FileName
_Must_inspect_result_ _Inout_opt_ PUNICODE_STRING VolumeName
#define FILE_SYNCHRONOUS_IO_NONALERT
@ FileFsDeviceInformation
GLuint GLuint GLsizei count
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define OBJ_CASE_INSENSITIVE
BOOL BasepGetVolumeNameFromReparsePoint(IN LPCWSTR lpszMountPoint, OUT LPWSTR lpszVolumeName, IN DWORD cchBufferLength, OUT LPBOOL IsAMountPoint)
#define ERROR_FILE_NOT_FOUND
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI ULONG NTAPI RtlGetCurrentDirectory_U(_In_ ULONG MaximumLength, _Out_bytecap_(MaximumLength) PWSTR Buffer)
NTSYSAPI BOOLEAN NTAPI RtlDosPathNameToNtPathName_U(_In_opt_z_ PCWSTR DosPathName, _Out_ PUNICODE_STRING NtPathName, _Out_opt_ PCWSTR *NtFileNamePart, _Out_opt_ PRTL_RELATIVE_NAME_U DirectoryInfo)
WCHAR NTAPI RtlUpcaseUnicodeChar(_In_ WCHAR Source)
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)
#define FILE_REMOTE_DEVICE
#define FILE_READ_ATTRIBUTES
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define NtCurrentProcess()
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
#define FILE_FLOPPY_DISKETTE
#define FILE_REMOVABLE_MEDIA
#define FileFsFullSizeInformation
NTSTATUS NTAPI NtQueryInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_ PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
#define FILE_DEVICE_DISK_FILE_SYSTEM
#define FILE_DEVICE_CD_ROM
#define FILE_DEVICE_CD_ROM_FILE_SYSTEM
#define FILE_DEVICE_NETWORK_FILE_SYSTEM
#define FILE_DEVICE_NETWORK
#define FILE_DEVICE_VIRTUAL_DISK
DWORD BaseSetLastNTError(IN NTSTATUS Status)
NTSTATUS NTAPI NtQueryVolumeInformationFile(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, PVOID FsInformation, ULONG Length, FS_INFORMATION_CLASS FsInformationClass)
PULONG MinorVersion OPTIONAL
#define RtlZeroMemory(Destination, Length)
#define STATUS_FILE_IS_A_DIRECTORY
_In_ WDFCOLLECTION _In_ ULONG Index
#define DRIVE_NO_ROOT_DIR
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetLogicalDrives(void)
_In_ LPCSTR _In_opt_ LPCSTR _In_ DWORD nBufferLength
#define ERROR_PATH_NOT_FOUND