32 char drive[] =
"?:\\";
33 char existing_drive_letter = 0;
38 ok(logical_drives != 0,
"GetLogicalDrives error %ld\n",
GetLastError());
44 "not a valid drive %c: type %u\n",
drive[0],
type);
46 if (!(logical_drives & 1))
48 "GetDriveTypeA should return DRIVE_NO_ROOT_DIR for inexistent drive %c: but not %u\n",
51 existing_drive_letter =
drive[0];
56 if (!existing_drive_letter) {
57 skip(
"No drives found, skipping drive spec format tests.\n");
61 drive[0] = existing_drive_letter;
86 WCHAR existing_drive_letter = 0;
91 ok(logical_drives != 0,
"GetLogicalDrives error %ld\n",
GetLastError());
97 "not a valid drive %c: type %u\n",
drive[0],
type);
99 if (!(logical_drives & 1))
101 "GetDriveTypeW should return DRIVE_NO_ROOT_DIR for inexistent drive %c: but not %u\n",
104 existing_drive_letter =
drive[0];
106 logical_drives >>= 1;
109 if (!existing_drive_letter) {
110 skip(
"No drives found, skipping drive spec format tests.\n");
114 drive[0] = existing_drive_letter;
141 char volume_guid_path[50];
142 char drive[] =
"?:\\";
143 DWORD logical_drives;
150 "GetDiskFreeSpaceA(\"\"): ret=%d GetLastError=%ld\n",
175 ok(logical_drives != 0,
"GetLogicalDrives error %ld\n",
GetLastError());
186 if (!(logical_drives & 1))
188 "GetDiskFreeSpaceA(%s): ret=%d GetLastError=%ld\n",
200 ok( total_clusters <= 65535,
201 "total clusters is %ld > 65535\n", total_clusters);
202 else if (pGetDiskFreeSpaceExA) {
215 ok( bytes_per_sector == 0 ||
217 "GetDiskFreeSpaceA should report at least as much bytes on disk %s as GetDiskFreeSpaceExA\n",
drive);
221 logical_drives >>= 1;
229 WCHAR volume_guid_path[50];
231 DWORD logical_drives;
232 static const WCHAR empty_pathW[] = { 0 };
233 static const WCHAR root_pathW[] = {
'\\', 0 };
234 static const WCHAR unix_style_root_pathW[] = {
'/', 0 };
235 static const WCHAR c_drive_pathW[] = {
'C',
':',
'\\', 0 };
240 win_skip(
"GetDiskFreeSpaceW is not available\n");
247 "GetDiskFreeSpaceW(\"\"): ret=%d GetLastError=%ld\n",
266 ok(logical_drives != 0,
"GetLogicalDrives error %ld\n",
GetLastError());
275 if (!(logical_drives & 1))
277 "GetDiskFreeSpaceW(%c): ret=%d GetLastError=%ld\n",
284 logical_drives >>= 1;
#define ERROR_CALL_NOT_IMPLEMENTED
#define GetProcAddress(x, y)
#define ERROR_INVALID_NAME
UINT WINAPI GetDriveTypeA(IN LPCSTR lpRootPathName)
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
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)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetVersion(void)
DWORD WINAPI DECLSPEC_HOTPATCH GetLogicalDrives(void)
GLuint GLuint GLsizei GLenum type
static int sectors_per_cluster
BOOL WINAPI GetVolumeNameForVolumeMountPointA(IN LPCSTR lpszVolumeMountPoint, IN LPSTR lpszVolumeName, IN DWORD cchBufferLength)
BOOL WINAPI GetVolumeNameForVolumeMountPointW(IN LPCWSTR VolumeMountPoint, OUT LPWSTR VolumeName, IN DWORD VolumeNameLength)
static void test_GetDiskFreeSpaceW(void)
static void test_GetDriveTypeA(void)
static void test_GetDriveTypeW(void)
static void test_GetDiskFreeSpaceA(void)
static HINSTANCE hkernel32
#define _WIN32_WINNT_VISTA
#define DRIVE_NO_ROOT_DIR
DWORD WINAPI GetLastError(void)
#define ERROR_PATH_NOT_FOUND
#define ERROR_INVALID_DRIVE