#include <corecrt_internal.h>
#include <direct.h>
Go to the source code of this file.
◆ _getdiskfree()
Definition at line 19 of file drivfree.cpp.
23{
26
28
29 wchar_t drive_name_buffer[4] = { '_', ':', '\\', '\0' };
30
33 : drive_name_buffer;
34
36 {
37 drive_name_buffer[0] =
static_cast<wchar_t>(
drive_number) +
static_cast<wchar_t>(
L'A' - 1);
38 }
39
40 static_assert(
sizeof(
result->sectors_per_cluster) ==
sizeof(
DWORD),
"Unexpected sizeof long");
41
47 {
50
51 return os_error;
52 }
53
54 return 0;
55}
int __cdecl __acrt_errno_from_os_error(unsigned long)
#define _VALIDATE_RETURN(expr, errorcode, retexpr)
#define ERROR_INVALID_PARAMETER
BOOL WINAPI GetDiskFreeSpaceW(IN LPCWSTR lpRootPathName, OUT LPDWORD lpSectorsPerCluster, OUT LPDWORD lpBytesPerSector, OUT LPDWORD lpNumberOfFreeClusters, OUT LPDWORD lpTotalNumberOfClusters)
DWORD WINAPI GetLastError(void)