32 char drive[] =
"?:\\";
33 char existing_drive_letter = 0;
38 ok(logical_drives != 0,
"GetLogicalDrives error %d\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 %d\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 drive[] =
"?:\\";
142 DWORD logical_drives;
149 "GetDiskFreeSpaceA(\"\"): ret=%d GetLastError=%d\n",
159 ok(logical_drives != 0,
"GetLogicalDrives error %d\n",
GetLastError());
170 if (!(logical_drives & 1))
172 "GetDiskFreeSpaceA(%s): ret=%d GetLastError=%d\n",
184 ok( total_clusters <= 65535,
185 "total clusters is %d > 65535\n", total_clusters);
186 else if (pGetDiskFreeSpaceExA) {
199 ok( bytes_per_sector == 0 ||
201 "GetDiskFreeSpaceA should report at least as much bytes on disk %s as GetDiskFreeSpaceExA\n",
drive);
205 logical_drives >>= 1;
214 DWORD logical_drives;
215 static const WCHAR empty_pathW[] = { 0 };
216 static const WCHAR root_pathW[] = {
'\\', 0 };
217 static const WCHAR unix_style_root_pathW[] = {
'/', 0 };
222 win_skip(
"GetDiskFreeSpaceW is not available\n");
229 "GetDiskFreeSpaceW(\"\"): ret=%d GetLastError=%d\n",
239 ok(logical_drives != 0,
"GetLogicalDrives error %d\n",
GetLastError());
248 if (!(logical_drives & 1))
250 "GetDiskFreeSpaceW(%c): ret=%d GetLastError=%d\n",
257 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)
GLuint GLuint GLsizei GLenum type
static int sectors_per_cluster
static void test_GetDiskFreeSpaceW(void)
static void test_GetDriveTypeA(void)
static void test_GetDriveTypeW(void)
static void test_GetDiskFreeSpaceA(void)
static HINSTANCE hkernel32
DWORD WINAPI GetVersion()
#define DRIVE_NO_ROOT_DIR
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetLogicalDrives(void)
#define ERROR_PATH_NOT_FOUND
#define ERROR_INVALID_DRIVE