23#define WIN32_NO_STATUS
61static BOOL (
WINAPI *pCreateSymbolicLinkA)(
const char *,
const char *,
DWORD);
68 char drivestr[] =
"a:";
69 char *
p, *
buffer, buffer2[2000];
77 "QueryDosDeviceA(no buffer): returned %lu, le=%lu\n",
ret,
GetLastError());
83 "QueryDosDeviceA failed to return list, last error %lu\n",
GetLastError());
92 "QueryDosDeviceA failed to return current mapping for %s, last error %lu\n",
p,
GetLastError());
98 for (;drivestr[0] <=
'z'; drivestr[0]++) {
102 "QueryDosDeviceA failed to return current mapping for %s, last error %lu\n", drivestr,
GetLastError());
108 ok(found,
"expected at least one devicename to contain HARDDISK or RAMDISK\n");
127 for (drivestr[0] =
'a'; drivestr[0] <=
'z'; drivestr[0]++) {
131 if (drivestr[0] >
'z') {
132 skip(
"can't test creating a dos drive, none available\n");
137 sprintf(buf3,
"%s/", root_path);
138 for (
char *
p = buf3; *
p;
p++) {
139 if (*
p ==
'\\') *
p =
'/';
151 sprintf(buf3,
"\\??\\%s\\", root_path);
152 for (
char *
p = buf3; *
p;
p++) {
170 ok(!
ret,
"expected failure\n");
177 ok(!
ret,
"expected failure\n");
211 ok(!
ret,
"expected failure\n");
218 ok(!
ret,
"expected failure\n");
228 if (!pFindFirstVolumeA) {
229 win_skip(
"FindFirstVolumeA not found\n");
252 pFindVolumeClose(
handle );
265 ok(reti <
MAX_PATH,
"temp path should fit into MAX_PATH\n");
268 ok(
ret ==
FALSE,
"GetVolumeNameForVolumeMountPointA succeeded\n");
275 ok(
ret ==
FALSE,
"GetVolumeNameForVolumeMountPointA succeeded\n");
278 ok(
ret ==
FALSE,
"GetVolumeNameForVolumeMountPointA succeeded\n");
282 ok(
ret ==
TRUE,
"GetVolumeNameForVolumeMountPointA failed\n");
284 "GetVolumeNameForVolumeMountPointA failed to return valid string <%s>\n",
290 "GetVolumeNameForVolumeMountPointA failed, wrong error returned, was %ld, should be ERROR_FILENAME_EXCED_RANGE\n",
299 "GetVolumeNameForVolumeMountPointA failed on %s, last=%ld\n",
313 "GetVolumeNameForVolumeMountPointA failed on %s, last=%ld\n",
320 "GetVolumeNameForVolumeMountPointA failed on %s, last=%ld\n",
332 ok(
ret ==
FALSE,
"GetVolumeNameForVolumeMountPointW succeeded\n");
339 ok(
ret ==
FALSE,
"GetVolumeNameForVolumeMountPointW succeeded\n");
342 ok(
ret ==
FALSE,
"GetVolumeNameForVolumeMountPointW succeeded\n");
346 ok(
ret ==
TRUE,
"GetVolumeNameForVolumeMountPointW failed\n");
354 ok( pGetLogicalDriveStringsA !=
NULL,
"GetLogicalDriveStringsA not available\n");
355 if(!pGetLogicalDriveStringsA) {
359 size = pGetLogicalDriveStringsA(0,
NULL);
365 size2 = pGetLogicalDriveStringsA(2,
buf);
366 ok(size2 ==
size,
"size2 = %d\n", size2);
367 ok(!*
buf,
"buf changed\n");
369 size2 = pGetLogicalDriveStringsA(
size,
buf);
370 ok(size2 ==
size-1,
"size2 = %d\n", size2);
373 ok((
'A' <= *
ptr && *
ptr <=
'Z'),
"device name '%c' is not uppercase\n", *
ptr);
374 ok(
ptr[1] ==
':',
"ptr[1] = %c, expected ':'\n",
ptr[1]);
375 ok(
ptr[2] ==
'\\',
"ptr[2] = %c expected '\\'\n",
ptr[2]);
376 ok(!
ptr[3],
"ptr[3] = %c expected nullbyte\n",
ptr[3]);
378 ok(!*
ptr,
"buf[size2] is not nullbyte\n");
388 ok( pGetLogicalDriveStringsW !=
NULL,
"GetLogicalDriveStringsW not available\n");
389 if(!pGetLogicalDriveStringsW) {
394 size = pGetLogicalDriveStringsW(0,
NULL);
396 win_skip(
"GetLogicalDriveStringsW not implemented\n");
404 size2 = pGetLogicalDriveStringsW(2,
buf);
405 ok(size2 ==
size,
"size2 = %d\n", size2);
406 ok(!*
buf,
"buf changed\n");
408 size2 = pGetLogicalDriveStringsW(
size,
buf);
409 ok(size2 ==
size-1,
"size2 = %d\n", size2);
412 ok(
'A' <= *
ptr && *
ptr <=
'Z',
"device name '%c' is not uppercase\n", *
ptr);
413 ok(
ptr[1] ==
':',
"ptr[1] = %c, expected ':'\n",
ptr[1]);
414 ok(
ptr[2] ==
'\\',
"ptr[2] = %c expected '\\'\n",
ptr[2]);
415 ok(!
ptr[3],
"ptr[3] = %c expected nullbyte\n",
ptr[3]);
417 ok(!*
ptr,
"buf[size2] is not nullbyte\n");
426 char Root_Colon[]=
"C:";
427 char Root_Slash[]=
"C:\\";
428 char Root_UNC[]=
"\\\\?\\C:\\";
430 DWORD vol_name_size=
MAX_PATH+1, vol_serial_num=-1, max_comp_len=0, fs_flags=0, fs_name_len=
MAX_PATH+1;
437 ok(
result <
sizeof(windowsdir),
"windowsdir is abnormally long!\n");
439 Root_Colon[0] = windowsdir[0];
440 Root_Slash[0] = windowsdir[0];
441 Root_UNC[4] = windowsdir[0];
451 NULL,
NULL, fs_name_buf, fs_name_len);
459 NULL,
NULL, fs_name_buf, fs_name_len);
461 "GetVolumeInformationA did%s fail, last error %lu\n",
ret ?
" not":
"",
GetLastError());
468 skip(
"Please re-run from another device than %c:\n", windowsdir[0]);
471 char Root_Env[]=
"=C:";
472 Root_Env[1] = windowsdir[0];
477 ok(
ret,
"SetEnvironmentVariable %s failed\n", Root_Env);
487 NULL,
NULL, fs_name_buf, fs_name_len);
489 "GetVolumeInformationA did%s fail, last error %lu\n",
ret ?
" not":
"",
GetLastError());
493 NULL,
NULL, fs_name_buf, fs_name_len);
494 ok(
ret,
"GetVolumeInformationA with \\ failed, last error %lu\n",
GetLastError());
505 NULL,
NULL, fs_name_buf, fs_name_len);
507 "GetVolumeInformationA did%s fail, last error %lu\n",
ret ?
" not":
"",
GetLastError());
511 ok(
ret,
"SetEnvironmentVariable %s failed\n", Root_Env);
515 NULL,
NULL, fs_name_buf, fs_name_len);
526 NULL,
NULL, fs_name_buf, fs_name_len);
532 NULL,
NULL, fs_name_buf, fs_name_len);
533 ok(
ret,
"GetVolumeInformationA failed on null root dir, last error %lu\n",
GetLastError());
537 &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len);
538 ok(
ret,
"GetVolumeInformationA failed, root=%s, last error=%lu\n", Root_Slash,
GetLastError());
543 &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len);
544 ok(
ret,
"GetVolumeInformationA did%s fail, root=%s, last error=%lu\n",
ret ?
" not":
"", Root_UNC,
GetLastError());
550 &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len);
551 ok(
ret,
"GetVolumeInformationA did%s fail, root=%s, last error=%lu\n",
ret ?
" not":
"", Root_UNC,
GetLastError());
554 if (windowsdir[
strlen(windowsdir)-1] !=
'\\')
strcat(windowsdir,
"\\");
557 &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len);
559 "GetVolumeInformationA did%s fail, root=%s, last error=%lu\n",
ret ?
" not":
"", windowsdir,
GetLastError());
561 if (windowsdir[
strlen(windowsdir)-1] ==
'\\') windowsdir[
strlen(windowsdir)-1] = 0;
564 &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len);
566 "GetVolumeInformationA did%s fail, root=%s, last error=%lu\n",
ret ?
" not":
"", windowsdir,
GetLastError());
570 ok(
ret ==
TRUE,
"GetVolumeNameForVolumeMountPointA failed\n");
574 &vol_serial_num, &max_comp_len, &fs_flags, fs_name_buf, fs_name_len);
587 char path[] =
"c:\\";
593 ok(
ret <
sizeof(windowsdir),
"windowsdir is abnormally long!\n");
595 path[0] = windowsdir[0];
599 ok(
ret ==
TRUE,
"GetVolumeNameForVolumeMountPointA failed\n");
600 ok(
strlen(Volume_1) == 49,
"GetVolumeNameForVolumeMountPointA returned wrong length name %s\n", Volume_1);
603 hFind = pFindFirstVolumeA( Volume_2,
MAX_PATH );
610 ok(
strlen(Volume_2) == 49,
"Find[First/Next]Volume returned wrong length name %s\n", Volume_1);
611 if (
memcmp(Volume_1, Volume_2, 49) == 0)
616 }
while (pFindNextVolumeA( hFind, Volume_2,
MAX_PATH ));
617 ok(found,
"volume name %s not found by Find[First/Next]Volume\n", Volume_1);
618 pFindVolumeClose( hFind );
639 win_skip(
"IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS not supported\n");
644 ok(
size == 32,
"expected 32, got %lu\n",
size);
675 ok(
error == 0xdeadbeef,
"expect err %#x, got err %#lx\n", 0xdeadbeef,
error);
685 ok(
error == 0xdeadbeef,
"expect err %#x, got err %#lx\n", 0xdeadbeef,
error);
699 win_skip(
"StorageDeviceSeekPenaltyProperty is not supported.\n" );
707 ok(
error == 0xdeadbeef,
"expect err %#x, got err %#lx\n", 0xdeadbeef,
error);
709 ok(
header.Version ==
sizeof(seek_pen),
"got header.Version %ld\n",
header.Version);
710 ok(
header.Size ==
sizeof(seek_pen),
"got header.Size %ld\n",
header.Size);
712 memset(&seek_pen, 0xcc,
sizeof(seek_pen));
717 "got ret %d, error %#lx\n",
ret,
error);
720 ok(
size ==
sizeof(seek_pen),
"got size %ld\n",
size);
722 ok(seek_pen.
Size ==
sizeof(seek_pen),
"got %ld\n", seek_pen.
Size);
764 "C:\\",
"C:\\",
sizeof(volume_path),
768 "c:\\",
"C:\\",
sizeof(volume_path),
772 "\\\\$$$",
"C:\\", 1,
776 "C:\\windows\\system32",
"C:\\",
sizeof(volume_path),
780 "C:\\windows\\system32\\AnInvalidFolder",
"C:\\",
sizeof(volume_path),
784 "\\\\?\\C:\\AnInvalidFolder",
"\\\\?\\C:\\",
sizeof(volume_path),
788 "\\\\?\\InvalidDrive:\\AnInvalidFolder",
"\\\\?\\InvalidDrive:\\" ,
793 "\\\\?\\Volume{00000000-00-0000-0000-000000000000}\\AnInvalidFolder",
794 "\\\\?\\Volume{00000000-00-0000-0000-000000000000}\\" ,
799 "\\\\ReallyBogus\\InvalidDrive:\\AnInvalidFolder",
800 "\\\\ReallyBogus\\InvalidDrive:\\" ,
sizeof(volume_path),
832 "C:\\windows\\system32\\AnInvalidFolder",
"C:", 3,
836 "\\\\?\\C:\\AnInvalidFolder",
"\\\\?\\C:", 3,
840 "\\\\?\\C:\\AnInvalidFolder",
"\\\\?\\C:", 6,
844 "\\\\?\\C:\\AnInvalidFolder",
"\\\\?\\C:", 7,
848 "\\\\?\\c:\\AnInvalidFolder",
"\\\\?\\c:", 7,
860 "?:ABC:DEF:\\AnInvalidFolder",
"?:\\" ,
sizeof(volume_path),
864 "s:omefile",
"S:\\" ,
sizeof(volume_path),
868 "C:/windows/system32",
"C:\\",
sizeof(volume_path),
873 static const char *relative_tests[] =
875 "InvalidDrive:\\AnInvalidFolder",
880 static const char *global_prefix_tests[] =
884 "\\??\\C:\\NonExistent",
885 "\\??\\M:\\NonExistent",
903 test_paths[8].file_name =
_strdup(patched);
907 test_paths[9].file_name =
_strdup(patched);
911 for (
char *
p = patched; *
p;
p++)
912 if (*
p ==
'\\') *
p =
'/';
913 test_paths[30].file_name =
_strdup(patched);
919 char *output = (test_paths[
i].path_name !=
NULL ? volume_path :
NULL);
923 if (test_paths[
i].
path_len <
sizeof(volume_path))
924 volume_path[ test_paths[
i].
path_len ] = 0x11;
930 "GetVolumePathName test %d %s unexpectedly.\n",
937 "GetVolumePathName test %d unexpectedly returned path %s (expected %s).\n",
944 ok(
success,
"GetVolumePathName test %d unexpectedly returned error 0x%lx (expected 0x%lx).\n",
948 if (test_paths[
i].
path_len <
sizeof(volume_path))
950 "GetVolumePathName test %d corrupted byte after end of buffer.\n",
i);
954 ok(
ret,
"Failed to obtain the current working directory, error %lu.\n",
GetLastError());
956 ok(
ret,
"Failed to obtain the current volume path, error %lu.\n",
GetLastError());
961 ok(
ret,
"GetVolumePathName(%s) failed unexpectedly, error %lu.\n",
963 ok(!
strcmp( volume_path, expect_path ),
"%s: expected %s, got %s.\n",
971 ok(
ret,
"GetVolumePathName(%s) failed unexpectedly, error %lu.\n",
973 ok(!
strcmp( volume_path, cwd ),
"%s: expected %s, got %s.\n",
982 ok(!
ret,
"Expected failure.\n");
987 ok(!
strcmp(volume_path, expect_path),
"Expected %s, got %s.\n",
992 ok(!
strcmp(volume_path, expect_path),
"Expected %s, got %s.\n",
1008 volume_path[1] = 0x11;
1010 ok(!
ret,
"GetVolumePathNameW test succeeded unexpectedly.\n");
1013 ok(volume_path[1] == 0x11,
"GetVolumePathW corrupted byte after end of buffer.\n");
1016 volume_path[2] = 0x11;
1018 ok(!
ret,
"GetVolumePathNameW test succeeded unexpectedly.\n");
1021 ok(volume_path[2] == 0x11,
"GetVolumePathW corrupted byte after end of buffer.\n");
1024 volume_path[3] = 0x11;
1026 ok(
ret ||
broken(!
ret) ,
"GetVolumePathNameW test failed unexpectedly.\n");
1028 "Got wrong path %s.\n",
debugstr_w(volume_path));
1029 ok(volume_path[3] == 0x11,
"GetVolumePathW corrupted byte after end of buffer.\n");
1032 volume_path[4] = 0x11;
1034 ok(
ret,
"GetVolumePathNameW test failed unexpectedly.\n");
1036 ok(volume_path[4] == 0x11,
"GetVolumePathW corrupted byte after end of buffer.\n");
1045 if (!pGetVolumePathNamesForVolumeNameA)
1047 win_skip(
"required functions not found\n");
1058 ok(!
ret,
"expected failure\n");
1062 ret = pGetVolumePathNamesForVolumeNameA(
"",
NULL, 0,
NULL );
1064 ok(!
ret,
"expected failure\n");
1070 ok(!
ret,
"expected failure\n");
1076 ok(!
ret,
"expected failure\n");
1083 ok(!
buffer[4],
"expected double null-terminated buffer\n");
1089 ok(!
ret,
"expected failure\n");
1096 ok(!
ret,
"expected failure\n");
1103 ok(!
ret,
"expected failure\n");
1110 ok(!
ret,
"expected failure\n");
1119 ok(!
buffer[4],
"expected double null-terminated buffer\n");
1125 static const WCHAR drive_c[] = {
'c',
':',
'\\',0};
1126 static const WCHAR volume_null[] = {
'\\',
'\\',
'?',
'\\',
'V',
'o',
'l',
'u',
'm',
'e',
1127 '{',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
1128 '-',
'0',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'}',
'\\',0};
1133 if (!pGetVolumePathNamesForVolumeNameW)
1135 win_skip(
"required functions not found\n");
1145 ok(!
ret,
"expected failure\n");
1151 ok(!
ret,
"expected failure\n");
1157 ok(!
ret,
"expected failure\n");
1172 ok(
len == 5,
"expected 5 got %lu\n",
len);
1173 ok(!
buffer[4],
"expected double null-terminated buffer\n");
1181 ok(!
ret,
"expected failure\n");
1190 ok(!
ret,
"expected failure\n");
1198 ok(!
ret,
"expected failure\n");
1219 dvdReadStructure.
Format = 0;
1234 ok( completeDvdLayerDescriptor.
Header.
Length == 0x0802,
"Length is 0x%04x instead of 0x0802\n", completeDvdLayerDescriptor.
Header.
Length);
1246 &completeDvdLayerDescriptor,
i, &nbBytes,
NULL);
1257 "IOCTL_DVD_READ_STRUCTURE should have failed\n");
1264 "IOCTL_DVD_READ_STRUCTURE should have failed\n");
1274 "IOCTL_DVD_READ_STRUCTURE should have failed\n");
1279 dvdReadStructure.
Format = 1;
1293 &dvdCopyrightDescriptor,
i, &nbBytes,
NULL);
1299 dvdReadStructure.
Format = 4;
1306 "IOCTL_DVD_READ_STRUCTURE (DvdManufacturerDescriptor) failed, last error = %lu\n",
GetLastError());
1311 ok( completeDvdManufacturerDescriptor.
Header.
Length == 0x0802,
"Length is 0x%04x instead of 0x0802\n", completeDvdManufacturerDescriptor.
Header.
Length);
1312 ok( completeDvdManufacturerDescriptor.
Header.
Reserved[0] == 0,
"Reserved[0] is %x instead of 0\n", completeDvdManufacturerDescriptor.
Header.
Reserved[0]);
1313 ok( completeDvdManufacturerDescriptor.
Header.
Reserved[1] == 0,
"Reserved[1] is %x instead of 0\n", completeDvdManufacturerDescriptor.
Header.
Reserved[1]);
1325 char drive_letter, drive_path[] =
"A:\\", drive_full_path[] =
"\\\\.\\A:";
1336 for(drive_letter=
'A'; drive_letter<=
'Z'; drive_letter++)
1338 if(!(bitmask & (1 << (drive_letter-
'A') )))
1341 drive_path[0] = drive_letter;
1344 trace(
"Skipping %c:, not a CDROM drive.\n", drive_letter);
1348 trace(
"Testing with %c:\n", drive_letter);
1350 drive_full_path[4] = drive_letter;
1370 FILE_ATTRIBUTE_TAG_INFO
info;
1396 ok(!
info.ReparseTag,
"got reparse tag %#lx\n",
info.ReparseTag);
1408 ok(!
info.ReparseTag,
"got reparse tag %#lx\n",
info.ReparseTag);
1418 skip(
"Not enough permissions to create a folder in the C: drive.\n");
1429 skip(
"Not enough permissions to create a mounted folder.\n");
1447 ok(
name->FileNameLength ==
wcslen(
L"\\winetest_mnt") *
sizeof(
WCHAR),
"got length %lu\n",
name->FileNameLength);
1461 ok(!
info.ReparseTag,
"got reparse tag %#lx\n",
info.ReparseTag);
1494 ok(
name->FileNameLength ==
wcslen(
L"\\windows") *
sizeof(
WCHAR),
"got length %lu\n",
name->FileNameLength);
1506 ok(!
ret,
"expected failure\n");
1510 ok(!
ret,
"expected failure\n");
1533 ok(!
ret,
"expected failure\n");
1541 ok(!
ret,
"expected failure\n");
1549 ok(!
ret,
"expected failure\n");
1553 ok(!
ret,
"expected failure\n");
1579 if (!
strcmp(
p,
"C:\\winetest_mnt\\" ))
1581 ok(
strcmp(
p,
"C:\\winetest_mnt\\winetest_mnt\\" ),
"GetVolumePathNamesForVolumeName() should not recurse\n");
1583 ok(got_path,
"mount point was not enumerated\n");
1587 if (pCreateSymbolicLinkA)
1589 ret = pCreateSymbolicLinkA(
"C:\\winetest_link",
"C:\\winetest_mnt\\", SYMBOLIC_LINK_FLAG_DIRECTORY );
1597 ok(!
ret,
"expected failure\n");
1617 ok(!
ret,
"expected failure\n");
1625 ok(!
ret,
"expected failure\n");
1641 sprintf(
buf,
"C:\\winetest_link\\winetest_mnt\\winetest_link\\%s\\",
sysroot + 3);
1653 file =
CreateFileA(
"C:\\winetest_link\\winetest_mnt\\winetest_link\\windows\\", 0,
1665 ok(
name->FileNameLength ==
wcslen(
L"\\windows") *
sizeof(
WCHAR),
"got length %lu\n",
name->FileNameLength);
1707 if (*
p ==
'\\') *
p =
'/';
1712#if defined(__REACTOS__) && DLL_EXPORT_VERSION >= 0x600
1714 if (
is_reactos() || !pGetVolumeInformationByHandleW)
1716 if (!pGetVolumeInformationByHandleW)
1719 win_skip(
"GetVolumeInformationByHandleW is not present.\n");
1735 ok(!
ret,
"expected failure\n");
1758 ok(!
ret,
"expected failure\n");
1774 ok(
ret ==
TRUE,
"GetVolumeNameForVolumeMountPointA failed\n");
1823 io.Status = 0xdeadf00d;
1824 io.Information = 0xdeadf00d;
1828 ok(
io.Status == 0xdeadf00d,
"got status %#lx\n",
io.Status);
1829 ok(
io.Information == 0xdeadf00d,
"got information %#Ix\n",
io.Information);
1833 io.Status = 0xdeadf00d;
1834 io.Information = 0xdeadf00d;
1838 ok(
io.Status == 0xdeadf00d,
"got status %#lx\n",
io.Status);
1839 ok(
io.Information == 0xdeadf00d,
"got information %#Ix\n",
io.Information);
1841 io.Status = 0xdeadf00d;
1842 io.Information = 0xdeadf00d;
1846 ok(
io.Status == 0xdeadf00d,
"got status %#lx\n",
io.Status);
1847 ok(
io.Information == 0xdeadf00d,
"got information %#Ix\n",
io.Information);
1849 io.Status = 0xdeadf00d;
1850 io.Information = 0xdeadf00d;
1851 memset(output, 0xcc,
sizeof(*output));
1855 ok(
io.Status == 0xdeadf00d,
"got status %#lx\n",
io.Status);
1856 ok(
io.Information == 0xdeadf00d,
"got information %#Ix\n",
io.Information);
1857 ok(output->
Size == 0xcccccccc,
"got size %lu\n", output->
Size);
1860 io.Status = 0xdeadf00d;
1861 io.Information = 0xdeadf00d;
1862 memset(output, 0xcc,
sizeof(*output));
1878 io.Status = 0xdeadf00d;
1879 io.Information = 0xdeadf00d;
1883 ok(!
io.Status,
"got status %#lx\n",
io.Status);
1884 ok(
io.Information == output->
Size,
"got size %lu, information %#Ix\n", output->
Size,
io.Information);
1902 pGetVolumePathNamesForVolumeNameA = (
void *)
GetProcAddress(
hdll,
"GetVolumePathNamesForVolumeNameA");
1903 pGetVolumePathNamesForVolumeNameW = (
void *)
GetProcAddress(
hdll,
"GetVolumePathNamesForVolumeNameW");
1905 pGetVolumeInformationByHandleW = (
void *)
GetProcAddress(
hdll,
"GetVolumeInformationByHandleW");
#define IOCTL_DVD_READ_STRUCTURE
#define ERROR_INSUFFICIENT_BUFFER
#define ERROR_INVALID_FUNCTION
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
static const WCHAR empty[]
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
#define ERROR_ACCESS_DENIED
#define ERROR_INVALID_NAME
DWORD WINAPI QueryDosDeviceA(LPCSTR lpDeviceName, LPSTR lpTargetPath, DWORD ucchMax)
BOOL WINAPI DefineDosDeviceA(DWORD dwFlags, LPCSTR lpDeviceName, LPCSTR lpTargetPath)
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableA(IN LPCSTR lpName, IN LPCSTR lpValue)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
UINT WINAPI GetDriveTypeA(IN LPCSTR lpRootPathName)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
BOOL WINAPI GetVolumeInformationA(IN LPCSTR lpRootPathName, IN LPSTR lpVolumeNameBuffer, IN DWORD nVolumeNameSize, OUT LPDWORD lpVolumeSerialNumber OPTIONAL, OUT LPDWORD lpMaximumComponentLength OPTIONAL, OUT LPDWORD lpFileSystemFlags OPTIONAL, OUT LPSTR lpFileSystemNameBuffer OPTIONAL, IN DWORD nFileSystemNameSize)
BOOL WINAPI GetVolumePathNameA(IN LPCSTR lpszFileName, IN LPSTR lpszVolumePathName, IN DWORD cchBufferLength)
BOOL WINAPI GetVolumePathNameW(IN LPCWSTR lpszFileName, IN LPWSTR lpszVolumePathName, IN DWORD cchBufferLength)
BOOL WINAPI GetVolumePathNamesForVolumeNameA(IN LPCSTR lpszVolumeName, IN LPSTR lpszVolumePathNames, IN DWORD cchBufferLength, OUT PDWORD lpcchReturnLength)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
UINT WINAPI GetWindowsDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
DWORD WINAPI DECLSPEC_HOTPATCH GetLogicalDrives(void)
#define DECLSPEC_ALIGN(x)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP char *__cdecl strstr(const char *, const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
_ACRTIMP int __cdecl strncmp(const char *, const char *, size_t)
struct _DVD_DESCRIPTOR_HEADER DVD_DESCRIPTOR_HEADER
struct _DVD_COPYRIGHT_DESCRIPTOR DVD_COPYRIGHT_DESCRIPTOR
@ FileAttributeTagInformation
@ FileFsAttributeInformation
@ FileFsVolumeInformation
static char * path_name(DOS_FILE *file)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static char volume_name[]
BOOL WINAPI GetVolumeNameForVolumeMountPointA(IN LPCSTR lpszVolumeMountPoint, IN LPSTR lpszVolumeName, IN DWORD cchBufferLength)
BOOL WINAPI DeleteVolumeMountPointA(IN LPCSTR lpszVolumeMountPoint)
BOOL WINAPI SetVolumeMountPointA(IN LPCSTR lpszVolumeMountPoint, IN LPCSTR lpszVolumeName)
BOOL WINAPI GetVolumeNameForVolumeMountPointW(IN LPCWSTR VolumeMountPoint, OUT LPWSTR VolumeName, IN DWORD VolumeNameLength)
#define FILE_FLAG_OPEN_REPARSE_POINT
#define FILE_FLAG_BACKUP_SEMANTICS
#define ERROR_FILE_NOT_FOUND
static const WCHAR label[]
static void test_GetLogicalDriveStringsA(void)
static void test_GetVolumeInformationByHandle(void)
static void test_disk_query_property(void)
static void test_dvd_read_structure(HANDLE handle)
static void test_GetVolumePathNameA(void)
static void test_GetVolumeInformationA(void)
static void test_query_dos_deviceA(void)
static void test_FindFirstVolume(void)
static void test_cdrom_ioctl(void)
static void test_mounted_folder(void)
static void test_enum_vols(void)
static void test_GetVolumePathNameW(void)
static void test_GetVolumePathNamesForVolumeNameW(void)
static void test_GetLogicalDriveStringsW(void)
static void test_mountmgr_query_points(void)
static void test_dos_devices(void)
static void test_GetVolumePathNamesForVolumeNameA(void)
static void test_GetVolumeNameForVolumeMountPointA(void)
static void test_GetVolumeNameForVolumeMountPointW(void)
static void test_disk_extents(void)
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK io
#define IOCTL_MOUNTMGR_QUERY_POINTS
#define MOUNTMGR_DOS_DEVICE_NAME
NTSYSAPI NTSTATUS NTAPI NtQueryInformationFile(IN HANDLE hFile, OUT PIO_STATUS_BLOCK pIoStatusBlock, OUT PVOID FileInformationBuffer, IN ULONG FileInformationBufferLength, IN FILE_INFORMATION_CLASS FileInfoClass)
NTSYSAPI NTSTATUS NTAPI NtDeviceIoControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
#define FILE_ATTRIBUTE_DIRECTORY
#define IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS
#define FILE_ATTRIBUTE_REPARSE_POINT
#define IOCTL_STORAGE_QUERY_PROPERTY
@ StorageDeviceSeekPenaltyProperty
#define offsetof(TYPE, MEMBER)
#define _WIN32_WINNT_VISTA
NTSTATUS NTAPI NtQueryVolumeInformationFile(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, PVOID FsInformation, ULONG Length, FS_INFORMATION_CLASS FsInformationClass)
#define STATUS_BUFFER_OVERFLOW
DVD_DESCRIPTOR_HEADER Header
DVD_LAYER_DESCRIPTOR Descriptor
DVD_MANUFACTURER_DESCRIPTOR Descriptor
DVD_DESCRIPTOR_HEADER Header
LARGE_INTEGER BlockByteOffset
DVD_STRUCTURE_FORMAT Format
BOOLEAN IncursSeekPenalty
ULONG NumberOfMountPoints
#define STATUS_INVALID_PARAMETER
#define INVALID_FILE_ATTRIBUTES
static const char * sysroot
#define success(from, fromstr, to, tostr)
DWORD WINAPI GetLastError(void)
#define DDD_RAW_TARGET_PATH
#define DDD_REMOVE_DEFINITION
#define ERROR_PATH_NOT_FOUND
#define ERROR_GEN_FAILURE
#define ERROR_NO_MORE_FILES
#define ERROR_DIR_NOT_ROOT
#define ERROR_FILENAME_EXCED_RANGE
#define ERROR_NOT_A_REPARSE_POINT
#define IO_REPARSE_TAG_MOUNT_POINT