53"en larvig liten text dx \033 gx hej 84 hej 4484 ! \001\033 bla bl\na.. bla bla."
54"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3"
55"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3"
56"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3"
57"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3"
58"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3"
59"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3"
60"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3"
61"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3"
62"sdlkfjasdlkfj a dslkj adsklf \n \nasdklf askldfa sdlkf \nsadklf asdklf asdf ";
132 ok(
_hread( filehandle,
buffer, bytes_wanted ) == bytes_wanted,
"erratic _hread return value\n" );
133 for (
i = 0;
i < bytes_wanted;
i++)
174 ok( 0 == bytes_read,
"file read size error\n" );
191 bytes_written = bytes_written +
sizeof(
buffer );
201 ok( 0 != memory_object,
"LocalAlloc fails. (Could be out of memory.)\n" );
211 ok( bytes_written ==
_hread( filehandle,
contents, bytes_written),
"read length differ from write length\n" );
220 while (
i < bytes_written - 1);
261 pRtlInitAnsiString( &
str,
name );
264 ok( !
status,
"RtlAnsiStringToUnicodeString failed with %08x\n",
status );
267 ok(
ret,
"RtlDosPathNameToNtPathName_U failed\n" );
269 pRtlFreeUnicodeString( &
strW );
280 char slashname[] =
"testfi/";
330 "_hwrite shouldn't be able to write never the less\n" );
339 attr.RootDirectory = 0;
343 attr.SecurityQualityOfService =
NULL;
413 filehandle=
_lcreat (slashname, 0);
417 "creating file \"%s\" failed with error %d\n", slashname,
err);
425 slashname[
strlen(slashname)-1]=0;
426 ok (!
strcmp (slashname, search_results.cFileName),
427 "found unexpected name \"%s\"\n", search_results.cFileName);
429 "attributes of file \"%s\" are 0x%04x\n", search_results.cFileName,
430 search_results.dwFileAttributes);
438 ok (0,
"couldn't create volume label \"%s\"\n",
filename);
453 "expected \"%s\", got \"%s\"\n",
name, search_results.cFileName);
454 search_results.dwFileAttributes &= ~FILE_ATTRIBUTE_NOT_CONTENT_INDEXED;
455 search_results.dwFileAttributes &= ~FILE_ATTRIBUTE_COMPRESSED;
457 "attributes of file \"%s\" are 0x%04x\n", search_results.cFileName,
458 search_results.dwFileAttributes);
481 for (
i = 0;
i < 400;
i++)
489 ok( 1 == bytes_read,
"file read size error\n" );
494 ok( 1 == bytes_read,
"file read size error\n" );
496 ok(
_llseek( filehandle, 1000000,
FILE_END ) != -1,
"should be able to seek past file; poor, poor Windows programmers\n" );
572 for (bytes_wanted = 0; bytes_wanted <
strlen(
sillytext ); bytes_wanted++)
575 ok(
_lread( filehandle,
buffer, bytes_wanted ) == bytes_wanted,
"erratic _hread return value\n" );
576 for (
i = 0;
i < bytes_wanted;
i++)
617 ok( 0 == bytes_read,
"file read size error\n" );
634 bytes_written = bytes_written +
sizeof(
buffer );
644 ok( 0 != memory_object,
"LocalAlloc fails, could be out of memory\n" );
654 ok( bytes_written ==
_hread( filehandle,
contents, bytes_written),
"read length differ from write length\n" );
663 while (
i < bytes_written - 1);
679 static const char prefix[] =
"pfx";
697 "copying a file to itself didn't fail (ret=%d, err=%d)\n", retok,
GetLastError());
731 "copying from a read-locked file succeeded when it shouldn't have\n");
735 "copying from a file that doesn't exist failed in an unexpected way (ret=%d, err=%d)\n", retok,
GetLastError());
743 "copying from an r+w opened and r shared file failed (ret=%d, err=%d)\n", retok,
GetLastError());
751 "copying from a delete-locked file failed (ret=%d, err=%d)\n", retok,
GetLastError());
759 "copying to a write-locked file didn't fail (ret=%d, err=%d)\n", retok,
GetLastError());
767 "copying to a r+w opened and w shared file failed (ret=%d, err=%d)\n", retok,
GetLastError());
773 "failed to open destination file, error %d\n",
GetLastError());
778 "copying to a delete-locked shared file didn't fail (ret=%d, err=%d)\n", retok,
GetLastError());
787 "copying to a file opened the way Wine opens the source failed (ret=%d, err=%d)\n", retok,
GetLastError());
794 ok(
ret ==
sizeof(
prefix),
"destination file has wrong size %d\n",
ret);
808 ok(
ret ==
sizeof(
prefix),
"destination file has wrong size %d\n",
ret);
820 "CopyFileA with mapped dest file: expected ERROR_SHARING_VIOLATION, got %d\n",
GetLastError());
833 ok(!
ret,
"CopyFileA: expected failure\n");
836 "CopyFileA with mapped dest file: expected ERROR_USER_MAPPED_FILE, got %d\n",
GetLastError());
857 win_skip(
"GetTempPathW is not available\n");
884 static const WCHAR doesntexistW[] = {
'd',
'o',
'e',
's',
'n',
't',
'e',
'x',
'i',
's',
't',0};
887 COPYFILE2_EXTENDED_PARAMETERS
params;
896 skip(
"CopyFile2 is not available\n");
925 ok(
hr ==
S_OK,
"CopyFile2: error 0x%08x\n",
hr);
966 ok(
ret,
"CopyFile2: error 0x%08x\n",
hr);
1056 ok(
ret ==
sizeof(
prefix),
"destination file has wrong size %d\n",
ret);
1072 ok(
ret ==
sizeof(
prefix),
"destination file has wrong size %d\n",
ret);
1124 static const char prefix[] =
"pfx";
1143 ok(!retok,
"CopyFileExA unexpectedly succeeded\n");
1152 ok(!retok,
"CopyFileExA unexpectedly succeeded\n");
1159 ok(!
ret,
"DeleteFileA unexpectedly succeeded\n");
1178 }
while (++
x % 16 &&
x <
len);
1180 trace(
"%04x: %-48s- %s\n",
x,
hex, txt);
1189 static const char prefix[] =
"pfx";
1192 unsigned char buffer[512];
1194 static const char nt_drive[] =
"\\\\?\\A:";
1227 "CREATE_NEW should fail if file exists and last error value should be ERROR_FILE_EXISTS\n");
1264 "LastError should have been ERROR_INVALID_NAME or ERROR_FILE_NOT_FOUND but got %u\n",
GetLastError());
1268 ok(
ret <
sizeof(windowsdir),
"windowsdir is abnormally long!\n");
1316 skip(
"Do not have authority to access volumes. Test for %s skipped\n",
filename);
1325 "CreateFileA failed on %s, hFile %p, err=%u, should be %u\n",
1345 "CreateFileA did not work, last error %u on volume <%s>\n",
1354 "CreateFileA probably did not open temp directory %s correctly\n file information does not include FILE_ATTRIBUTE_DIRECTORY, actual=0x%08x\n",
1361 skip(
"Probable Win9x, got ERROR_PATH_NOT_FOUND w/ FILE_FLAG_BACKUP_SEMANTICS or %s\n",
temp_path);
1387 todo_wine ok(
ret,
"Failed to read volume, last error %u, %u, for %s\n",
1391 trace(
"buffer is\n");
1408 "CreateFileA should have returned ERROR_PATH_NOT_FOUND on %s, but got %u\n",
1423 "CreateFileA should have worked on %s, but got %u\n",
1444 skip(
"Probable Win9x, got ERROR_BAD_NETPATH (53)\n");
1446 skip(
"Do not have authority to access volumes. Tests skipped\n");
1451 if (pGetVolumeNameForVolumeMountPointA)
1459 ok(
strlen(Volume_1) == 49,
"GetVolumeNameForVolumeMountPointA returned wrong length name <%s>\n", Volume_1);
1472 "CreateFileA should not have opened %s, hFile %p\n",
1476 "CreateFileA should have returned ERROR_PATH_NOT_FOUND on %s, but got %u\n",
1493 "CreateFileA should have opened %s, but got %u\n",
1521 todo_wine ok(
ret,
"Failed to read volume, last error %u, %u, for %s\n",
1525 trace(
"buffer is\n");
1532 skip(
"Do not have authority to access volumes. Tests skipped\n");
1535 win_skip(
"GetVolumeNameForVolumeMountPointA not functioning\n");
1538 win_skip(
"GetVolumeNameForVolumeMountPointA not found\n");
1548 static const WCHAR bogus[] = {
'\\',
'\\',
'.',
'\\',
'B',
'O',
'G',
'U',
'S', 0 };
1554 win_skip(
"GetTempPathW is not available\n");
1567 "CREATE_NEW should fail if file exists and last error value should be ERROR_FILE_EXISTS\n");
1617 "CreateFileW on invalid VxD name returned ret=%p error=%d\n",
hFile,
GetLastError());
1620 ok(
ret ==
TRUE,
"couldn't create temporary directory\n");
1624 "expected CreateFile to succeed on existing directory, error: %d\n",
GetLastError());
1638 static const WCHAR bogus[] = {
'\\',
'\\',
'.',
'\\',
'B',
'O',
'G',
'U',
'S', 0 };
1643 win_skip(
"CreateFile2 is missing\n");
1655 exparams.
dwSize =
sizeof(exparams);
1663 "CREATE_NEW should fail if file exists and last error value should be ERROR_FILE_EXISTS\n");
1697 "CreateFile2 on invalid VxD name returned ret=%p error=%d\n",
hFile,
GetLastError());
1700 ok(
ret ==
TRUE,
"couldn't create temporary directory\n");
1705 "expected CreateFile2 to fail on existing directory, error: %d\n",
GetLastError());
1717 char windowsdrive[3];
1720 ok(
result <
sizeof(windowsdir),
"windowsdir is abnormally long!\n");
1724 if (
strlen(windowsdir) != 3)
1726 strcat(windowsdir,
"\\");
1729 windowsdrive[0] = windowsdir[0];
1730 windowsdrive[1] = windowsdir[1];
1731 windowsdrive[2] =
'\0';
1735 ok(((
out[0] == windowsdrive[0]) && (
out[1] ==
':')) && (
out[2] ==
'\\'),
1736 "GetTempFileNameA: first three characters should be %c:\\, string was actually %s\n",
1737 windowsdrive[0],
out);
1769 "DeleteFileA(\"nul\") returned ret=%d error=%d\n",
ret,
GetLastError());
1789 ok(!
ret,
"DeleteFile should fail\n");
1796 "Expected ERROR_ACCESS_DENIED, got error %d\n",
GetLastError());
1806 static const WCHAR dirW[] = {
'd',
'e',
'l',
'e',
't',
'e',
'f',
'i',
'l',
'e',0};
1807 static const WCHAR subdirW[] = {
'\\',
's',
'u',
'b',0};
1813 win_skip(
"DeleteFileW is not available\n");
1827 ok(0,
"MAX_PATH exceeded in constructing paths\n");
1834 ok(
ret ==
TRUE,
"couldn't create directory deletefile\n");
1836 ok(
ret ==
FALSE,
"DeleteFile should fail for empty directories\n");
1838 ok(
ret ==
TRUE,
"expected to remove directory deletefile\n");
1842 ok(
ret ==
TRUE,
"couldn't create directory deletefile\n");
1844 ok(
ret ==
TRUE,
"couldn't create directory deletefile\\sub\n");
1846 ok(
ret ==
FALSE,
"DeleteFile should fail for non-empty directories\n");
1848 ok(
ret ==
TRUE,
"expected to remove directory deletefile\\sub\n");
1850 ok(
ret ==
TRUE,
"expected to remove directory deletefile\n");
1853#define IsDotDir(x) ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0))))
1859 static const char prefix[] =
"pfx";
1896 ok(!
ret,
"MoveFileA: expected failure\n");
1899 "MoveFileA: expected ERROR_SHARING_VIOLATION, got %d\n",
GetLastError());
1914 ok(!
ret,
"MoveFileA: expected failure\n");
1917 "MoveFileA: expected ERROR_SHARING_VIOLATION, got %d\n",
GetLastError());
1930 ok(
ret ==
TRUE,
"CreateDirectoryA failed\n");
1937 ok(!
ret,
"MoveFileA: shouldn't move to wildcard file\n");
1940 "MoveFileA: with wildcards, unexpected error %d\n",
GetLastError());
1982 win_skip(
"GetTempPathW is not available\n");
2004#define PATTERN_OFFSET 0x10
2030 ok(done ==
sizeof(
buf),
"expected number of bytes written %u\n", done);
2032 memset(&ov, 0,
sizeof(ov));
2034 S(
U(ov)).OffsetHigh = 0;
2039 ok(done ==
sizeof(
pattern),
"expected number of bytes written %u\n", done);
2043 S(
U(ov)).Offset =
sizeof(
buf) * 2;
2044 S(
U(ov)).OffsetHigh = 0;
2047 ok(done ==
sizeof(
pattern),
"expected number of bytes written %u\n", done);
2060 memset(&ov, 0,
sizeof(ov));
2062 S(
U(ov)).OffsetHigh = 0;
2067 ok(done ==
sizeof(
pattern),
"expected number of bytes read %u\n", done);
2084 int limited_LockFile;
2085 int limited_UnLockFile;
2109 limited_UnLockFile = 0;
2112 limited_UnLockFile = 1;
2136 "LockFileEx 100,100 failed\n" );
2146 "LockFileEx exclusive 150,50 succeeded\n" );
2151 "UnlockFileEx 150,100 again succeeded\n" );
2157 "LockFileEx exclusive 300,100 failed\n" );
2159 "LockFileEx handle2 300,100 succeeded\n" );
2161 ok(
ret,
"LockFileEx 300,100 failed\n" );
2165 "LockFileEx handle2 300,100 failed\n" );
2174 ok( !
LockFile(
handle, 0, 0x20000000, 20, 0 ),
"LockFile 0x20000000,20 succeeded\n" );
2184 limited_LockFile = 0;
2187 limited_LockFile = 1;
2190 limited_UnLockFile ||
ok(
UnlockFile(
handle, ~0, ~0, 1, 0 ),
"Unlockfile ~0,1 failed\n" );
2194 if (!limited_LockFile)
ok( !
LockFile(
handle, 98, 0, 4, 0 ),
"LockFile 98,4 succeeded\n" );
2196 if (!limited_LockFile)
ok( !
LockFile(
handle, 100, 0, 10, 0 ),
"LockFile 100,10 failed\n" );
2215 DWORD lfanew =
sizeof(*dos);
2216 DWORD size = lfanew +
sizeof(*nt) +
sizeof(*sec);
2241#elif defined __x86_64__
2243#elif defined __powerpc__
2245#elif defined __arm__
2247#elif defined __aarch64__
2250# error You must specify the machine type
2273 memcpy( sec->
Name,
".rodata",
sizeof(
".rodata") );
2326#define M(x) {x, # x}
2335 static const struct mode sharing_modes[] =
2340 static const struct mode mapping_modes[] =
2356 for (
s1 = 0;
s1 <
sizeof(sharing_modes)/
sizeof(sharing_modes[0]);
s1++)
2368 for (
s2 = 0;
s2 <
sizeof(sharing_modes)/
sizeof(sharing_modes[0]);
s2++)
2378 "open failed for modes %s / %s / %s / %s\n",
2381 ok(
ret == 0,
"wrong error code %d\n",
ret );
2386 "open succeeded for modes %s / %s / %s / %s\n",
2390 "wrong error code %d\n",
ret );
2399 for (
a1 = 0;
a1 <
sizeof(mapping_modes)/
sizeof(mapping_modes[0]);
a1++)
2418 for (
s2 = 0;
s2 <
sizeof(sharing_modes)/
sizeof(sharing_modes[0]);
s2++)
2428 "open failed for modes map %s / %s / %s\n",
2431 "wrong error code %d\n",
ret );
2437 "open succeeded for modes map %s / %s / %s\n",
2439 ok(
ret == 0xdeadbeef ||
2441 "wrong error code %d\n",
ret );
2505 return windowsdir[0];
2515 {
"./test-dir",
TRUE },
2516 {
"./test-dir/",
FALSE },
2517 {
".\\test-dir",
TRUE },
2518 {
".\\test-dir\\",
FALSE },
2519 {
"/>test-dir",
FALSE },
2520 {
"<\"test->dir",
FALSE },
2521 {
"<test->dir",
FALSE },
2522 {
"><test->dir",
FALSE },
2523 {
">>test-dir",
FALSE },
2524 {
">test->dir",
FALSE },
2525 {
">test-dir",
FALSE },
2526 {
"\"test-dir\"",
FALSE },
2527 {
"\"test-file\"",
FALSE },
2528 {
"test-/>dir",
FALSE },
2529 {
"test-dir/",
FALSE },
2530 {
"test-dir//",
FALSE },
2531 {
"test-dir/:",
FALSE },
2532 {
"test-dir/<",
TRUE },
2533 {
"test-dir/>",
TRUE },
2534 {
"test-dir/\"",
TRUE },
2535 {
"test-dir/\\",
FALSE },
2536 {
"test-dir/|",
FALSE },
2537 {
"test-dir<",
TRUE },
2538 {
"test-dir</",
FALSE },
2539 {
"test-dir<<",
TRUE },
2540 {
"test-dir<<<><><>\"\"\"\"<<<>",
TRUE },
2541 {
"test-dir<>",
TRUE },
2542 {
"test-dir<\"",
TRUE },
2543 {
"test-dir>",
TRUE },
2544 {
"test-dir>/",
FALSE },
2545 {
"test-dir><",
TRUE },
2546 {
"test-dir>>",
TRUE },
2547 {
"test-dir>\"",
TRUE },
2548 {
"test-dir\"",
TRUE },
2549 {
"test-dir\"/",
FALSE },
2550 {
"test-dir\"<",
TRUE },
2551 {
"test-dir\">",
TRUE },
2552 {
"test-dir\"\"",
TRUE },
2553 {
"test-dir\"\"\"\"\"",
TRUE },
2554 {
"test-dir\\",
FALSE },
2555 {
"test-dir\\/",
FALSE },
2556 {
"test-dir\\<",
TRUE },
2557 {
"test-dir\\>",
TRUE },
2558 {
"test-dir\\\"",
TRUE },
2559 {
"test-dir\\\\",
FALSE },
2560 {
"test-file/",
FALSE },
2561 {
"test-file/<",
FALSE },
2562 {
"test-file/>",
FALSE },
2563 {
"test-file/\"",
FALSE },
2564 {
"test-file<",
TRUE },
2565 {
"test-file<<",
TRUE },
2566 {
"test-file<>",
TRUE },
2567 {
"test-file<\"",
TRUE },
2568 {
"test-file>",
TRUE },
2569 {
"test-file><",
TRUE },
2570 {
"test-file>>",
TRUE },
2571 {
"test-file>\"",
TRUE },
2572 {
"test-file\"",
TRUE },
2573 {
"test-file\"<",
TRUE },
2574 {
"test-file\">",
TRUE },
2575 {
"test-file\"\"",
TRUE },
2576 {
"test-file\\",
FALSE },
2577 {
"test-file\\<",
FALSE },
2578 {
"test-file\\>",
FALSE },
2579 {
"test-file\\\"",
FALSE },
2606 "FindFirstFile shouldn't return '%s' in drive root\n",
data.cFileName );
2609 "FindNextFile shouldn't return '%s' in drive root\n",
data.cFileName );
2617 ok( !
strcmp(
data.cFileName,
"." ),
"FindFirstFile should return '.' first\n" );
2619 ok( !
strcmp(
data.cFileName,
".." ),
"FindNextFile should return '..' as second entry\n" );
2622 "FindNextFile shouldn't return '%s'\n",
data.cFileName );
2654 strcat(buffer2,
"\\bar.txt");
2663 strcat(buffer2,
"\\*.*");
2672 strcat(buffer2,
"\\bar.txt");
2688 "wrong attributes %x\n",
data.dwFileAttributes );
2691 ok( 0 ==
data.nFileSizeHigh,
"wrong size %d\n",
data.nFileSizeHigh );
2692 ok( 0 ==
data.nFileSizeLow,
"wrong size %d\n",
data.nFileSizeLow );
2708 "wrong attributes %x\n",
data.dwFileAttributes );
2711 ok( 0 ==
data.nFileSizeHigh,
"wrong size %d\n",
data.nFileSizeHigh );
2712 ok( 0 ==
data.nFileSizeLow,
"wrong size %d\n",
data.nFileSizeLow );
2722 strcat(buffer2,
"nul\\*");
2740 strcat(buffer2,
"foo\\bar\\nul");
2749 strcat(buffer2,
"foo\\nul\\bar");
2785 char buffer[5] =
"C:\\*";
2805 if (!pFindFirstFileExA)
2807 win_skip(
"FindFirstFileExA() is missing\n");
2811 trace(
"Running FindFirstFileExA tests with level=%d, search_ops=%d, flags=%u\n",
2822 win_skip(
"FindFirstFileExA is not implemented\n");
2827 win_skip(
"FindFirstFileExA flag FIND_FIRST_EX_LARGE_FETCH not supported, skipping test\n");
2832 win_skip(
"FindFirstFileExA level FindExInfoBasic not supported, skipping test\n");
2836#define CHECK_NAME(fn) (strcmp((fn), "file1") == 0 || strcmp((fn), "file2") == 0 || strcmp((fn), "dir1") == 0)
2837#define CHECK_LEVEL(fn) (level != FindExInfoBasic || !(fn)[0])
2840 ok(
strcmp(search_results.cFileName,
".") == 0,
"First entry should be '.', is %s\n", search_results.cFileName);
2841 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
2844 ok(
strcmp(search_results.cFileName,
"..") == 0,
"Second entry should be '..' is %s\n", search_results.cFileName);
2845 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
2848 ok(
CHECK_NAME(search_results.cFileName),
"Invalid third entry - %s\n", search_results.cFileName);
2849 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
2855 skip(
"File system supports directory filtering\n");
2857 ok(
strcmp(search_results.cFileName,
"dir1") == 0,
"Third entry should be 'dir1' is %s\n", search_results.cFileName);
2858 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
2863 ok(
ret,
"Fetching fourth file failed\n");
2864 ok(
CHECK_NAME(search_results.cFileName),
"Invalid fourth entry - %s\n", search_results.cFileName);
2865 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
2868 ok(
CHECK_NAME(search_results.cFileName),
"Invalid fifth entry - %s\n", search_results.cFileName);
2869 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
2886 "Unexpected error %x, expected valid handle or ERROR_PATH_NOT_FOUND\n",
GetLastError());
2887 trace(
"FindFirstFileExA flag FIND_FIRST_EX_CASE_SENSITIVE is %signored\n",
2907 static const char* files[] = {
2908 "..a",
"..a.a",
".a",
".a..a",
".a.a",
".aaa",
2909 "a",
"a..a",
"a.a",
"a.a.a",
"aa",
"aaa",
"aaaa"
2911 static const struct {
2915 {0,
"*.*.*",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa'"},
2916 {0,
"*.*.",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa'"},
2917 {0,
".*.*",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa'"},
2918 {0,
"*.*",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa'"},
2919 {0,
".*",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa'"},
2920 {1,
"*.",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
2921 {0,
"*",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa'"},
2922 {1,
"*..*",
", '.', '..', '..a', '..a.a', '.a..a', 'a..a'"},
2923 {1,
"*..",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
2924 {1,
".*.",
", '.', '..', '.a', '.aaa'"},
2925 {0,
"..*",
", '.', '..', '..a', '..a.a'"},
2926 {0,
"**",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa'"},
2927 {0,
"**.",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa'"},
2928 {0,
"*. ",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa'"},
2929 {1,
"* .",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
2930 {0,
"* . ",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa'"},
2931 {0,
"*.. ",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa'"},
2932 {1,
"*. .",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
2933 {1,
"* ..",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
2934 {1,
" *..",
", '.aaa'"},
2935 {0,
"..* ",
", '.', '..', '..a', '..a.a'"},
2936 {1,
"?",
", '.', '..', 'a'"},
2937 {1,
"?.",
", '.', '..', 'a'"},
2938 {1,
"?. ",
", '.', '..', 'a'"},
2939 {1,
"??.",
", '.', '..', 'a', 'aa'"},
2940 {1,
"??. ",
", '.', '..', 'a', 'aa'"},
2941 {1,
"???.",
", '.', '..', 'a', 'aa', 'aaa'"},
2942 {1,
"?.??.",
", '.', '..', '.a', 'a', 'a.a'"}
2947 for (
i = 0;
i <
sizeof(files) /
sizeof(files[0]); ++
i)
2953 char incorrect[512];
2957 correct[0] = incorrect[0] = 0;
2974 strcat(incorrect, quoted);
2979 ok(missing[0] == 0 && incorrect[0] == 0,
2980 "FindFirstFile with '%s' found correctly %s, found incorrectly %s, and missed %s\n",
2982 correct[0] ? correct+2 :
"none",
2983 incorrect[0] ? incorrect+2 :
"none",
2984 missing[0] ? missing+2 :
"none");
2987 for (
i = 0;
i <
sizeof(files) /
sizeof(files[0]); ++
i)
3015 ok( hmap !=
NULL,
"mapping should work, I named it!\n" );
3022 ok( hmap !=
NULL,
"We should still be able to map!\n" );
3030 ok( hmap ==
NULL,
"mapped zero size file\n");
3069 ok(
type == type2,
"expected type %d for STD_OUTPUT_HANDLE got %d\n", type2,
type);
3088 S(
U(ovl)).Offset = 0;
3089 S(
U(ovl)).OffsetHigh = 0;
3094 strcat(szFile,
"\\win.ini");
3137 static const char prefix[] =
"pfx";
3151 if (pQueueUserAPC) {
3152 trace(
"Queueing an user APC\n");
3172 "bytes = %d\n",
bytes);
3210 ok( !
ret,
"WriteFile succeeded\n" );
3217 ok( !
ret,
"WriteFile succeeded\n" );
3227 ok( !
ret,
"WriteFile succeeded\n" );
3236 ok( !
ret,
"ReadFile succeeded\n" );
3246 ok( !
ret,
"ReadFile succeeded\n" );
3256 ok( !
ret,
"ReadFile succeeded\n" );
3267 ok( !
ret,
"ReadFile succeeded\n" );
3278 ok( !
ret,
"ReadFile succeeded\n" );
3299 static const char file[] =
"regedit.exe";
3300 static const char foo[] =
".\\foo-bar-foo.baz";
3301 static const char *foo_too_long =
".\\foo-bar-foo.baz+++++++++++++++"
3302 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
3303 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
3304 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
3305 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
3306 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++";
3314 if (!pGetSystemWindowsDirectoryA)
3322 if (
p >
buff &&
p[-1] !=
'\\') *
p++ =
'\\';
3324 memset(&ofs, 0xA5,
sizeof(ofs));
3331 ok( ofs.
cBytes ==
sizeof(ofs),
"OpenFile set ofs.cBytes to %d\n", ofs.
cBytes );
3334 "OpenFile returned '%s', but was expected to return '%s' or string filled with 0xA5\n",
3345 if (
p >
buff &&
p[-1] !=
'\\') *
p++ =
'\\';
3347 memset(&ofs, 0xA5,
sizeof(ofs));
3354 ok( ofs.
cBytes == 0xA5,
"OpenFile set ofs.cBytes to %d\n", ofs.
cBytes );
3357 "OpenFile returned '%s', but was expected to return '%s' or string filled with 0xA5\n",
3367 lstrcatA(buff_long, foo_too_long + 1);
3368 memset(&ofs, 0xA5,
sizeof(ofs));
3376 ok( ofs.
cBytes == 0xA5,
"OpenFile set ofs.cBytes to %d\n", ofs.
cBytes );
3378 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3380 "OpenFile returned '%s', but was expected to return string filled with 0xA5\n",
3388 trace(
"Buffer too small, requested length = %d, but MAX_PATH = %d. Skipping test.\n",
length,
MAX_PATH);
3392 if (
p >
buff &&
p[-1] !=
'\\') *
p++ =
'\\';
3395 memset(&ofs, 0xA5,
sizeof(ofs));
3404 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3406 ok( !
ret,
"_lclose() returns %d\n",
ret );
3410 memset(&ofs, 0xA5,
sizeof(ofs));
3420 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3422 "OpenFile returned '%s', but was expected to return '%s'\n", ofs.
szPathName,
buff );
3424 ok( !
ret,
"_lclose() returns %d\n",
ret );
3426 memset(&ofs, 0xA5,
sizeof(ofs));
3435 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3437 "OpenFile returned '%s', but was expected to return '%s'\n", ofs.
szPathName,
buff );
3439 ok( !
ret,
"_lclose() returns %d\n",
ret );
3441 memset(&ofs, 0xA5,
sizeof(ofs));
3450 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3452 "OpenFile returned '%s', but was expected to return '%s'\n", ofs.
szPathName,
buff );
3454 ok( !
ret,
"_lclose() returns %d\n",
ret );
3456 memset(&ofs, 0xA5,
sizeof(ofs));
3460 ok(
hFile == 1,
"OpenFile failed on finding our created file\n" );
3465 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3467 "OpenFile returned '%s', but was expected to return '%s'\n", ofs.
szPathName,
buff );
3469 memset(&ofs, 0xA5,
sizeof(ofs));
3473 ok(
hFile == 1,
"OpenFile failed on delete (%d)\n",
hFile );
3478 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3480 "OpenFile returned '%s', but was expected to return '%s'\n", ofs.
szPathName,
buff );
3499 memset( &ov, 0,
sizeof ov );
3522 ok(
r ==
FALSE,
"should return false\n");
3532 ok(
r ==
FALSE,
"should return false\n");
3542 ok(
r ==
FALSE,
"should return false\n");
3545 ok(
r ==
TRUE,
"should return TRUE\n" );
3557 ok(
r ==
FALSE,
"should return false\n");
3560 ok(
r ==
TRUE,
"close handle failed\n");
3572 ok( rc,
"SetCurrentDirectory failed, gle=%d\n",
GetLastError() );
3578 ok( rc,
"SetCurrentDirectory failed, gle=%d\n",
GetLastError() );
3589 return abs(t1 - t2) <= tolerance;
3595 HANDLE hReplacedFile, hReplacementFile, hBackupFile;
3596 static const char replacedData[] =
"file-to-replace";
3597 static const char replacementData[] =
"new-file";
3598 static const char backupData[] =
"backup-file";
3599 FILETIME ftReplaced, ftReplacement, ftBackup;
3600 static const char prefix[] =
"pfx";
3607 win_skip(
"ReplaceFileA() is missing\n");
3627 "failed to open replaced file\n");
3628 retok =
WriteFile(hReplacedFile, replacedData,
sizeof(replacedData), &
ret,
NULL );
3629 ok( retok &&
ret ==
sizeof(replacedData),
3632 "replaced file has wrong size\n");
3636 "failed to open replacement file\n");
3637 retok =
WriteFile(hReplacementFile, replacementData,
sizeof(replacementData), &
ret,
NULL );
3638 ok( retok &&
ret ==
sizeof(replacementData),
3641 "replacement file has wrong size\n");
3645 "failed to open backup file\n");
3646 retok =
WriteFile(hBackupFile, backupData,
sizeof(backupData), &
ret,
NULL );
3647 ok( retok &&
ret ==
sizeof(backupData),
3650 "backup file has wrong size\n");
3676 ret = pReplaceFileA(replaced, replacement,
backup, 0, 0, 0);
3681 "failed to open backup file\n");
3683 ok(
ret ==
sizeof(replacedData),
3684 "backup file has wrong size %d\n",
ret);
3692 ok(
ret ==
sizeof(replacementData),
3693 "replaced file has wrong size %d\n",
ret);
3697 "unexpected error, replacement file should not exist %d\n",
GetLastError());
3701 ok(
check_file_time(&ftBackup, &ftReplaced, 20000000),
"backup file has wrong filetime\n");
3707 "replaced file has wrong filetime %x%08x / %x%08x\n",
3713 skip(
"couldn't open replacement file, skipping tests\n");
3722 ret = pReplaceFileA(replaced, replacement,
NULL, 0, 0, 0);
3724 "ReplaceFileA: unexpected error %d\n",
GetLastError());
3735 ret = pReplaceFileA(replaced, replacement,
backup, 0, 0, 0);
3737 "ReplaceFileA: unexpected error %d\n",
GetLastError());
3739 removeBackup =
TRUE;
3746 "SetFileAttributesA: error setting to read only %d\n",
GetLastError());
3751 ret = pReplaceFileA(replaced, replacement,
backup, 0, 0, 0);
3757 "unexpected error, replacement file should still exist %d\n",
GetLastError());
3761 "SetFileAttributesA: error setting to normal %d\n",
GetLastError());
3771 ret = pReplaceFileA(replaced, replacement,
backup, 0, 0, 0);
3774 "ReplaceFileA: unexpected error %d\n",
GetLastError());
3780 ret = pReplaceFileA(replaced, replacement,
NULL, 0, 0, 0);
3783 "ReplaceFileA: unexpected error %d\n",
GetLastError());
3816 win_skip(
"ReplaceFileW() is missing\n");
3823 win_skip(
"GetTempPathW is not available\n");
3838 ret = pReplaceFileW(replaced, replacement,
backup, 0, 0, 0);
3843 ret = pReplaceFileW(replaced, replacement,
NULL, 0, 0, 0);
3851 ret = pReplaceFileW(replaced, replacement,
backup, 0, 0, 0);
3859 "SetFileAttributesW: error setting to read only %d\n",
GetLastError());
3861 ret = pReplaceFileW(replaced, replacement,
backup, 0, 0, 0);
3863 "ReplaceFileW: unexpected error %d\n",
GetLastError());
3866 "SetFileAttributesW: error setting to normal %d\n",
GetLastError());
3868 removeBackup =
TRUE;
3872 ret = pReplaceFileW(replaced, replacement,
backup, 0, 0, 0);
3875 ret = pReplaceFileW(replaced, replacement,
NULL, 0, 0, 0);
3878 "ReplaceFileW: unexpected error %d\n",
GetLastError());
3936 for (
i = 0;
i <= 5;
i++)
3941 if (
i == 0 ||
i == 5)
3967 for (
i = 0;
i <
sizeof(td)/
sizeof(td[0]);
i++)
3974 written = 0xdeadbeef;
3981 ok(!
ret,
"%d: WriteFile should fail\n",
i);
3992 ok(!
ret,
"%d: SetFileTime should fail\n",
i);
4028 DWORD ret2, written;
4030 FILE_ID_BOTH_DIR_INFO *bothDirInfo;
4031 FILE_BASIC_INFO *basicInfo;
4032 FILE_STANDARD_INFO *standardInfo;
4033 FILE_NAME_INFO *nameInfo;
4035 FILE_IO_PRIORITY_HINT_INFO priohintinfo;
4036 FILE_ALLOCATION_INFO allocinfo;
4037 FILE_DISPOSITION_INFO dispinfo;
4038 FILE_END_OF_FILE_INFO eofinfo;
4039 FILE_RENAME_INFO renameinfo;
4052 if (!pGetFileInformationByHandleEx)
4054 win_skip(
"GetFileInformationByHandleEx is missing.\n");
4059 ok(ret2,
"GetFileInformationByHandleEx: GetTempPathA failed, got error %u.\n",
GetLastError());
4063 ok(ret2,
"GetFileInformationByHandleEx: GetTempFileNameA failed, got error %u.\n",
GetLastError());
4066 "GetFileAttributesA failed to find the temp file, got error %u.\n",
GetLastError());
4073 for (
i = 0;
i <
sizeof(checks) /
sizeof(checks[0]);
i += 1)
4077 ok(!
ret &&
GetLastError() == checks[
i].errorCode,
"GetFileInformationByHandleEx: expected error %u, "
4087 ok(
ret,
"GetFileInformationByHandleEx: failed to query for FileIdBothDirectoryInfo, got error %u.\n",
GetLastError());
4090 bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)
buffer;
4093 ok(bothDirInfo->FileAttributes != 0xffffffff,
"GetFileInformationByHandleEx: returned invalid file attributes.\n");
4094 ok(bothDirInfo->FileId.u.LowPart != 0xffffffff,
"GetFileInformationByHandleEx: returned invalid file id.\n");
4095 ok(bothDirInfo->FileNameLength != 0xffffffff,
"GetFileInformationByHandleEx: returned invalid file name length.\n");
4096 if (!bothDirInfo->NextEntryOffset)
4098 bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)(((
char *)bothDirInfo) + bothDirInfo->NextEntryOffset);
4112 ok(
ret,
"GetFileInformationByHandleEx: failed to get FileBasicInfo, %u\n",
GetLastError());
4113 basicInfo = (FILE_BASIC_INFO *)
buffer;
4114 prevWrite = basicInfo->LastWriteTime;
4125 ok(
ret,
"GetFileInformationByHandleEx: Write failed\n");
4135 ok(
ret,
"GetFileInformationByHandleEx: failed to get FileBasicInfo, %u\n",
GetLastError());
4136 basicInfo = (FILE_BASIC_INFO *)
buffer;
4139 ok(basicInfo->LastWriteTime.QuadPart != prevWrite.
QuadPart,
4140 "GetFileInformationByHandleEx: last write time didn't change\n");
4145 ok(
ret,
"GetFileInformationByHandleEx: failed to get FileStandardInfo, %u\n",
GetLastError());
4146 standardInfo = (FILE_STANDARD_INFO *)
buffer;
4147 ok(standardInfo->NumberOfLinks == 1,
"GetFileInformationByHandleEx: Unexpected number of links\n");
4148 ok(standardInfo->DeletePending ==
FALSE,
"GetFileInformationByHandleEx: Unexpected pending delete\n");
4149 ok(standardInfo->Directory ==
FALSE,
"GetFileInformationByHandleEx: Incorrect directory flag\n");
4154 ok(
ret,
"GetFileInformationByHandleEx: failed to get FileNameInfo, %u\n",
GetLastError());
4155 nameInfo = (FILE_NAME_INFO *)
buffer;
4156 strPtr =
strchr(tempFileName,
'\\');
4157 ok(strPtr !=
NULL,
"GetFileInformationByHandleEx: Temp filename didn't contain backslash\n");
4158 ok(nameInfo->FileNameLength ==
strlen(strPtr) * 2,
4159 "GetFileInformationByHandleEx: Incorrect file name length\n");
4160 for (
i = 0;
i < nameInfo->FileNameLength/2;
i++)
4161 ok(strPtr[
i] == nameInfo->FileName[
i],
"Incorrect filename char %d: %c vs %c\n",
4162 i, strPtr[
i], nameInfo->FileName[
i]);
4166 ret = pGetFileInformationByHandleEx(
file, FileEndOfFileInfo, &eofinfo,
sizeof(eofinfo));
4170 ret = pGetFileInformationByHandleEx(
file, FileIoPriorityHintInfo, &priohintinfo,
sizeof(priohintinfo));
4174 ret = pGetFileInformationByHandleEx(
file, FileAllocationInfo, &allocinfo,
sizeof(allocinfo));
4178 ret = pGetFileInformationByHandleEx(
file, FileDispositionInfo, &dispinfo,
sizeof(dispinfo));
4182 ret = pGetFileInformationByHandleEx(
file, FileRenameInfo, &renameinfo,
sizeof(renameinfo));
4196 FILE_ID_BOTH_DIR_INFO *bothDirInfo;
4197 FILE_ID_DESCRIPTOR fileIdDescr;
4199 if (!pGetFileInformationByHandleEx || !pOpenFileById)
4201 win_skip(
"GetFileInformationByHandleEx or OpenFileById is missing.\n");
4206 ok(ret2,
"OpenFileById: GetTempPath failed, got error %u.\n",
GetLastError());
4210 ok(ret2,
"OpenFileById: GetTempFileNameA failed, got error %u.\n",
GetLastError());
4213 "OpenFileById: GetFileAttributesA failed to find the temp file, got error %u\n",
GetLastError());
4216 ok(ret2,
"OpenFileById: MultiByteToWideChar failed to convert tempFileName, got error %u.\n",
GetLastError());
4217 tempFileNameLen = ret2 - 1;
4233 bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)
buffer;
4235 ok(
ret,
"OpenFileById: failed to query for FileIdBothDirectoryInfo, got error %u.\n",
GetLastError());
4236 ok(bothDirInfo->FileNameLength ==
sizeof(
WCHAR) && bothDirInfo->FileName[0] ==
'.',
4237 "OpenFileById: failed to return the temp folder at the first entry, got error %u.\n",
GetLastError());
4240 fileIdDescr.dwSize =
sizeof(fileIdDescr);
4241 fileIdDescr.Type = FileIdType;
4242 U(fileIdDescr).FileId = bothDirInfo->FileId;
4253 ok(
ret,
"OpenFileById: failed to query for FileIdBothDirectoryInfo, got error %u.\n",
GetLastError());
4256 bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)
buffer;
4259 if (tempFileNameLen == bothDirInfo->FileNameLength /
sizeof(
WCHAR) &&
4260 memcmp(tempFileNameW, bothDirInfo->FileName, bothDirInfo->FileNameLength) == 0)
4265 if (!bothDirInfo->NextEntryOffset)
4267 bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)(((
char *)bothDirInfo) + bothDirInfo->NextEntryOffset);
4270 ok(found,
"OpenFileById: failed to find the temp file in the temp folder.\n");
4275 "OpenFileById: expected ERROR_INVALID_PARAMETER, got error %u.\n",
GetLastError());
4277 fileIdDescr.dwSize =
sizeof(fileIdDescr);
4278 fileIdDescr.Type = FileIdType;
4279 U(fileIdDescr).FileId = bothDirInfo->FileId;
4286 ok(
strcmp(tickCount,
buffer) == 0,
"OpenFileById: invalid contents of the temp file.\n");
4302 if (!pSetFileValidData)
4304 win_skip(
"SetFileValidData is missing\n");
4316 ok(!
ret,
"SetFileValidData succeeded\n");
4322 ok(!
ret,
"SetFileValidData succeeded\n");
4330 ok(!
ret,
"SetFileValidData succeeded\n");
4337 ok(!
ret,
"SetFileValidData succeeded\n");
4346 ok(!
ret,
"SetFileValidData succeeded\n");
4358 win_skip(
"cannot enable SE_MANAGE_VOLUME_NAME privilege\n");
4368 ok(!
ret,
"SetFileValidData succeeded\n");
4374 ok(!
ret,
"SetFileValidData succeeded\n");
4389 ok(!
ret,
"SetFileValidData succeeded\n");
4419 ok(!
ret,
"SetFileValidData succeeded\n");
4433 HANDLE hfile, hiocp1, hiocp2;
4443 ok(
ret <
MAX_PATH,
"temp path should fit into MAX_PATH\n" );
4454 ok( hiocp2 != 0,
"CreateIoCompletionPort failed err %u\n",
GetLastError() );
4460 memset( &ovl, 0,
sizeof(ovl) );
4461 memset( fse, 0,
sizeof(fse) );
4468 ok( povl == &ovl,
"wrong ovl %p\n", povl );
4470 memset( &ovl, 0,
sizeof(ovl) );
4471 memset( fse, 0,
sizeof(fse) );
4478 ok( povl == &ovl,
"wrong ovl %p\n", povl );
4500 return (obj_access & desired_access) == desired_access;
4522 unsigned char buf[16];
4529 for (
i = 0;
i <
sizeof(td)/
sizeof(td[0]);
i++)
4543 for (
j = 0;
j <
sizeof(td)/
sizeof(td[0]);
j++)
4568 if (td[
i].write_error)
4570 ok(!
ret,
"%d: WriteFile should fail\n",
i);
4587 if (td[
i].read_error)
4589 ok(!
ret,
"%d: ReadFile should fail\n",
i);
4596 if (td[
i].write_error)
4601 ok(
buf[0] == 0x5e &&
buf[1] == 0xa7,
"%d: expected 5ea7, got %02x%02x\n",
i,
buf[0],
buf[1]);
4611 static char prefix[] =
"GetFinalPathNameByHandleA";
4612 static char dos_prefix[] =
"\\\\?\\";
4615 char dos_path[
MAX_PATH +
sizeof(dos_prefix)];
4620 if (!pGetFinalPathNameByHandleA)
4622 skip(
"GetFinalPathNameByHandleA is missing\n");
4638 strcpy(dos_path, dos_prefix);
4639 strcat(dos_path, long_path);
4657 count = pGetFinalPathNameByHandleA(
file, result_path, 0, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS);
4661 count = pGetFinalPathNameByHandleA(
file,
NULL, 0, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS);
4665 memset(result_path, 0x11,
sizeof(result_path));
4666 count = pGetFinalPathNameByHandleA(
file, result_path,
MAX_PATH, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS);
4668 ok(
lstrcmpiA(dos_path, result_path) == 0,
"Expected %s, got %s\n", dos_path, result_path);
4671 memset(result_path, 0x11,
sizeof(result_path));
4672 count = pGetFinalPathNameByHandleA(
file, result_path,
strlen(dos_path)-2, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS);
4674 ok(result_path[0] == 0x11,
"Result path was modified\n");
4676 memset(result_path, 0x11,
sizeof(result_path));
4677 count = pGetFinalPathNameByHandleA(
file, result_path,
strlen(dos_path)-1, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS);
4679 ok(result_path[0] == 0x11,
"Result path was modified\n");
4681 memset(result_path, 0x11,
sizeof(result_path));
4682 count = pGetFinalPathNameByHandleA(
file, result_path,
strlen(dos_path), FILE_NAME_NORMALIZED | VOLUME_NAME_DOS);
4684 ok(result_path[0] == 0x11,
"Result path was modified\n");
4686 memset(result_path, 0x11,
sizeof(result_path));
4687 count = pGetFinalPathNameByHandleA(
file, result_path,
strlen(dos_path)+1, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS);
4689 ok(result_path[0] != 0x11,
"Result path was not modified\n");
4690 ok(!result_path[
strlen(dos_path)],
"Expected nullterminated string\n");
4691 ok(result_path[
strlen(dos_path)+1] == 0x11,
"Buffer overflow\n");
4698 static WCHAR prefix[] = {
'G',
'e',
't',
'F',
'i',
'n',
'a',
'l',
'P',
'a',
't',
'h',
4699 'N',
'a',
'm',
'e',
'B',
'y',
'H',
'a',
'n',
'd',
'l',
'e',
'W',
'\0'};
4700 static WCHAR dos_prefix[] = {
'\\',
'\\',
'?',
'\\',
'\0'};
4713 if (!pGetFinalPathNameByHandleW)
4715 skip(
"GetFinalPathNameByHandleW is missing\n");
4750 count = pGetFinalPathNameByHandleW(
file, result_path, 0, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS);
4755 count = pGetFinalPathNameByHandleW(
file,
NULL, 0, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS);
4760 memset(result_path, 0x11,
sizeof(result_path));
4761 count = pGetFinalPathNameByHandleW(
file, result_path,
MAX_PATH, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS);
4766 memset(result_path, 0x11,
sizeof(result_path));
4767 count = pGetFinalPathNameByHandleW(
file, result_path,
lstrlenW(dos_path)-1, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS);
4769 ok(result_path[0] == 0x1111,
"Result path was modified\n");
4771 memset(result_path, 0x11,
sizeof(result_path));
4772 count = pGetFinalPathNameByHandleW(
file, result_path,
lstrlenW(dos_path), FILE_NAME_NORMALIZED | VOLUME_NAME_DOS);
4774 ok(result_path[0] == 0x1111,
"Result path was modified\n");
4776 memset(result_path, 0x11,
sizeof(result_path));
4777 count = pGetFinalPathNameByHandleW(
file, result_path,
lstrlenW(dos_path)+1, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS);
4779 ok(result_path[0] != 0x1111,
"Result path was not modified\n");
4780 ok(!result_path[
lstrlenW(dos_path)],
"Expected nullterminated string\n");
4781 ok(result_path[
lstrlenW(dos_path)+1] == 0x1111,
"Buffer overflow\n");
4790 memset(result_path, 0x11,
sizeof(result_path));
4791 count = pGetFinalPathNameByHandleW(
file, result_path,
MAX_PATH, FILE_NAME_NORMALIZED | VOLUME_NAME_GUID);
4793 ok(
lstrcmpiW(volume_path, result_path) == 0,
"Expected %s, got %s\n",
4797 file_part = long_path +
lstrlenW(drive_part) - 1;
4798 memset(result_path, 0x11,
sizeof(result_path));
4799 count = pGetFinalPathNameByHandleW(
file, result_path,
MAX_PATH, FILE_NAME_NORMALIZED | VOLUME_NAME_NONE);
4801 ok(
lstrcmpiW(file_part, result_path) == 0,
"Expected %s, got %s\n",
4804 drive_part[
lstrlenW(drive_part)-1] = 0;
4810 memset(result_path, 0x11,
sizeof(result_path));
4811 count = pGetFinalPathNameByHandleW(
file, result_path,
MAX_PATH, FILE_NAME_NORMALIZED | VOLUME_NAME_NT);
4813 ok(
lstrcmpiW(nt_path, result_path) == 0,
"Expected %s, got %s\n",
4821 FILE_ATTRIBUTE_TAG_INFO fileattrinfo = { 0 };
4822 FILE_REMOTE_PROTOCOL_INFO protinfo = { 0 };
4823 FILE_STANDARD_INFO stdinfo = { {{0}},{{0}},0,
FALSE,
FALSE };
4824 FILE_COMPRESSION_INFO compressinfo;
4825 FILE_DISPOSITION_INFO dispinfo;
4831 if (!pSetFileInformationByHandle)
4833 win_skip(
"SetFileInformationByHandle is not supported\n");
4850 ret = pSetFileInformationByHandle(
file, FileStandardInfo, &stdinfo,
sizeof(stdinfo));
4853 memset(&compressinfo, 0,
sizeof(compressinfo));
4855 ret = pSetFileInformationByHandle(
file, FileCompressionInfo, &compressinfo,
sizeof(compressinfo));
4859 ret = pSetFileInformationByHandle(
file, FileAttributeTagInfo, &fileattrinfo,
sizeof(fileattrinfo));
4862 memset(&protinfo, 0,
sizeof(protinfo));
4863 protinfo.StructureVersion = 1;
4864 protinfo.StructureSize =
sizeof(protinfo);
4866 ret = pSetFileInformationByHandle(
file, FileRemoteProtocolInfo, &protinfo,
sizeof(protinfo));
4871 ret = pSetFileInformationByHandle(
file, FileDispositionInfo, &dispinfo, 0);
4875 dispinfo.DeleteFile =
TRUE;
4876 ret = pSetFileInformationByHandle(
file, FileDispositionInfo, &dispinfo,
sizeof(dispinfo));
4884 static const WCHAR path1[] = {
'\\',
'\\',
'?',
'\\',0};
4885 static const WCHAR path2[] = {
'\\',
'?',
'?',
'\\',0};
4886 static const WCHAR path3[] = {
'\\',
'D',
'o',
's',
'D',
'e',
'v',
'i',
'c',
'e',
's',
'\\',0};
4892 ok(!
ret,
"GetFileAttributesExW succeeded\n");
4897 ok(!
ret,
"GetFileAttributesExW succeeded\n");
4902 ok(!
ret,
"GetFileAttributesExW succeeded\n");
int strcmp(const char *String1, const char *String2)
char * strstr(char *String1, char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strchr(const char *String, int ch)
static unsigned char bytes[4]
static const WCHAR nameW[]
#define FILE_DIRECTORY_FILE
#define FILE_NON_DIRECTORY_FILE
#define FILE_DELETE_ON_CLOSE
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
#define STATUS_INVALID_HANDLE
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
#define ERROR_INVALID_FUNCTION
static int find_data(const struct Vector *v, const BYTE *pData, int size)
BOOL WINAPI LookupPrivilegeValueA(LPCSTR lpSystemName, LPCSTR lpName, PLUID lpLuid)
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
static cab_ULONG checksum(const cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum)
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
#define IMAGE_FILE_MACHINE_ARMNT
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define INVALID_SET_FILE_POINTER
#define GetCurrentDirectoryW(x, y)
#define IMAGE_FILE_MACHINE_POWERPC
#define ReadFile(a, b, c, d, e)
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define CreateFileMappingW(a, b, c, d, e, f)
#define CreateFileA(a, b, c, d, e, f, g)
#define GetCurrentProcess()
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
#define IMAGE_FILE_MACHINE_ARM64
#define FILE_ATTRIBUTE_NORMAL
#define MultiByteToWideChar
#define ERROR_ACCESS_DENIED
#define ERROR_INVALID_NAME
static void cleanup(void)
static HRESULT create_error(script_ctx_t *ctx, jsdisp_t *constr, UINT number, jsstr_t *msg, jsdisp_t **ret)
DWORD WINAPI QueryDosDeviceW(LPCWSTR lpDeviceName, LPWSTR lpTargetPath, DWORD ucchMax)
BOOL WINAPI CopyFileExA(IN LPCSTR lpExistingFileName, IN LPCSTR lpNewFileName, IN LPPROGRESS_ROUTINE lpProgressRoutine OPTIONAL, IN LPVOID lpData OPTIONAL, IN LPBOOL pbCancel OPTIONAL, IN DWORD dwCopyFlags)
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
BOOL WINAPI CopyFileA(IN LPCSTR lpExistingFileName, IN LPCSTR lpNewFileName, IN BOOL bFailIfExists)
HFILE WINAPI OpenFile(LPCSTR lpFileName, LPOFSTRUCT lpReOpenBuff, UINT uStyle)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI GetFileInformationByHandle(HANDLE hFile, LPBY_HANDLE_FILE_INFORMATION lpFileInformation)
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD dwFileAttributes)
DWORD WINAPI GetFileType(HANDLE hFile)
BOOL WINAPI SetEndOfFile(HANDLE hFile)
BOOL WINAPI GetFileAttributesExW(LPCWSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, LPVOID lpFileInformation)
BOOL WINAPI SetFileTime(IN HANDLE hFile, CONST FILETIME *lpCreationTime OPTIONAL, CONST FILETIME *lpLastAccessTime OPTIONAL, CONST FILETIME *lpLastWriteTime OPTIONAL)
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
BOOL WINAPI GetFileTime(IN HANDLE hFile, OUT LPFILETIME lpCreationTime OPTIONAL, OUT LPFILETIME lpLastAccessTime OPTIONAL, OUT LPFILETIME lpLastWriteTime OPTIONAL)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
HANDLE WINAPI FindFirstFileA(IN LPCSTR lpFileName, OUT LPWIN32_FIND_DATAA lpFindFileData)
BOOL WINAPI FindClose(HANDLE hFindFile)
BOOL WINAPI FindNextFileA(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAA lpFindFileData)
BOOL WINAPI UnlockFileEx(IN HANDLE hFile, IN DWORD dwReserved, IN DWORD nNumberOfBytesToUnLockLow, IN DWORD nNumberOfBytesToUnLockHigh, IN LPOVERLAPPED lpOverlapped)
BOOL WINAPI UnlockFile(IN HANDLE hFile, IN DWORD dwFileOffsetLow, IN DWORD dwFileOffsetHigh, IN DWORD nNumberOfBytesToUnlockLow, IN DWORD nNumberOfBytesToUnlockHigh)
BOOL WINAPI LockFileEx(IN HANDLE hFile, IN DWORD dwFlags, IN DWORD dwReserved, IN DWORD nNumberOfBytesToLockLow, IN DWORD nNumberOfBytesToLockHigh, IN LPOVERLAPPED lpOverlapped)
BOOL WINAPI LockFile(IN HANDLE hFile, IN DWORD dwFileOffsetLow, IN DWORD dwFileOffsetHigh, IN DWORD nNumberOfBytesToLockLow, IN DWORD nNumberOfBytesToLockHigh)
BOOL WINAPI MoveFileA(IN LPCSTR lpExistingFileName, IN LPCSTR lpNewFileName)
BOOL WINAPI MoveFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName)
BOOL WINAPI WriteFileGather(HANDLE hFile, FILE_SEGMENT_ELEMENT aSegmentArray[], DWORD nNumberOfBytesToWrite, LPDWORD lpReserved, LPOVERLAPPED lpOverlapped)
BOOL WINAPI ReadFileScatter(HANDLE hFile, FILE_SEGMENT_ELEMENT aSegmentArray[], DWORD nNumberOfBytesToRead, LPDWORD lpReserved, LPOVERLAPPED lpOverlapped)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
BOOL WINAPI ReadFileEx(IN HANDLE hFile, IN LPVOID lpBuffer, IN DWORD nNumberOfBytesToRead OPTIONAL, IN LPOVERLAPPED lpOverlapped, IN LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
BOOL WINAPI GetVolumePathNameW(IN LPCWSTR lpszFileName, IN LPWSTR lpszVolumePathName, IN DWORD cchBufferLength)
BOOL WINAPI DuplicateHandle(IN HANDLE hSourceProcessHandle, IN HANDLE hSourceHandle, IN HANDLE hTargetProcessHandle, OUT LPHANDLE lpTargetHandle, IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwOptions)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
UINT WINAPI GetWindowsDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
DWORD WINAPI GetLongPathNameA(IN LPCSTR lpszShortPath, OUT LPSTR lpszLongPath, IN DWORD cchBuffer)
BOOL WINAPI SetCurrentDirectoryW(IN LPCWSTR lpPathName)
DWORD WINAPI GetLongPathNameW(IN LPCWSTR lpszShortPath, OUT LPWSTR lpszLongPath, IN DWORD cchBuffer)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
DWORD WINAPI GetTickCount(VOID)
LONG WINAPI CompareFileTime(IN CONST FILETIME *lpFileTime1, IN CONST FILETIME *lpFileTime2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
ANSI_STRING * PANSI_STRING
static unsigned char buff[32768]
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
UINT WINAPI GetTempFileNameA(IN LPCSTR lpPathName, IN LPCSTR lpPrefixString, IN UINT uUnique, OUT LPSTR lpTempFileName)
#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLenum const GLfloat * params
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLuint GLint GLboolean GLint GLenum access
GLfloat GLfloat GLfloat GLfloat h
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
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 token
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 GLint GLint j
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
LPVOID NTAPI LocalLock(HLOCAL hMem)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
static const WCHAR emptyW[]
void __cdecl srand(_In_ unsigned int _Seed)
_Check_return_ int __cdecl rand(void)
#define OBJ_CASE_INSENSITIVE
REFIID LPVOID DWORD_PTR dw
HANDLE WINAPI CreateIoCompletionPort(IN HANDLE FileHandle, IN HANDLE ExistingCompletionPort, IN ULONG_PTR CompletionKey, IN DWORD NumberOfConcurrentThreads)
BOOL WINAPI GetOverlappedResult(IN HANDLE hFile, IN LPOVERLAPPED lpOverlapped, OUT LPDWORD lpNumberOfBytesTransferred, IN BOOL bWait)
BOOL WINAPI GetQueuedCompletionStatus(IN HANDLE CompletionHandle, IN LPDWORD lpNumberOfBytesTransferred, OUT PULONG_PTR lpCompletionKey, OUT LPOVERLAPPED *lpOverlapped, IN DWORD dwMilliseconds)
int WINAPI _lclose(HFILE hFile)
LONG WINAPI _llseek(HFILE hFile, LONG lOffset, int iOrigin)
HFILE WINAPI _lopen(LPCSTR lpPathName, int iReadWrite)
HFILE WINAPI _lcreat(LPCSTR lpPathName, int iAttribute)
long WINAPI _hwrite(HFILE hFile, LPCSTR lpBuffer, long lBytes)
long WINAPI _hread(HFILE hFile, LPVOID lpBuffer, long lBytes)
__cdecl __MINGW_NOTHROW char * dirname(char *)
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
BOOL WINAPI GetVolumeNameForVolumeMountPointW(IN LPCWSTR VolumeMountPoint, OUT LPWSTR VolumeName, IN DWORD VolumeNameLength)
#define ERROR_ALREADY_EXISTS
#define TRUNCATE_EXISTING
#define FILE_FLAG_OVERLAPPED
#define FILE_FLAG_NO_BUFFERING
#define FILE_FLAG_BACKUP_SEMANTICS
#define FILE_FLAG_RANDOM_ACCESS
#define FILE_FLAG_DELETE_ON_CLOSE
#define FILE_ATTRIBUTE_DEVICE
#define ERROR_FILE_NOT_FOUND
static struct test_info tests[]
#define sprintf(buf, format,...)
static const WCHAR filenameW[]
static const struct update_accum a1
static const struct update_accum a2
static const WCHAR nonexistent[]
static POBJECT_ATTRIBUTES
static void test_ReplaceFileA(void)
static void CALLBACK user_apc(ULONG_PTR param)
static void test_FindFirstFileExA(FINDEX_INFO_LEVELS level, FINDEX_SEARCH_OPS search_ops, DWORD flags)
static void test_GetFileInformationByHandleEx(void)
static void test_ReplaceFileW(void)
static void test_DeleteFileA(void)
static char filename[MAX_PATH]
static const char sillytext[]
static void test_CreateFileA(void)
static HANDLE ULONG_PTR dwData
static void test_FindNextFileA(void)
static DWORD WINAPI copy_progress_cb(LARGE_INTEGER total_size, LARGE_INTEGER total_transferred, LARGE_INTEGER stream_size, LARGE_INTEGER stream_transferred, DWORD stream, DWORD reason, HANDLE source, HANDLE dest, LPVOID userdata)
static void test__lcreat(void)
static void test_OpenFileById(void)
static void test_async_file_errors(void)
static void test_GetFileType(void)
static BOOL is_sharing_map_compatible(DWORD map_access, DWORD access2, DWORD sharing2)
static void test_CopyFile2(void)
static LPSECURITY_ATTRIBUTES
static int completion_count
static void test__hwrite(void)
static BOOL is_access_compatible(unsigned obj_access, unsigned desired_access)
static BOOL create_fake_dll(LPCSTR filename)
static void test_MoveFileA(void)
static void test_CreateFileW(void)
static void test__llopen(void)
static void test_OpenFile(void)
static BOOL check_file_time(const FILETIME *ft1, const FILETIME *ft2, UINT tolerance)
static void test_GetFinalPathNameByHandleA(void)
static void test_RemoveDirectory(void)
static void test_offset_in_overlapped_structure(void)
static void test_WriteFileGather(void)
static void test__hread(void)
static void CALLBACK FileIOComplete(DWORD dwError, DWORD dwBytes, LPOVERLAPPED ovl)
static void test_LockFile(void)
static void test_CreateFile(void)
static char get_windows_drive(void)
static LPFILE_ID_DESCRIPTOR
static void test_FindFirstFile_wildcards(void)
static void test_file_access(void)
static void test_DeleteFileW(void)
static const struct @1706 invalid_char_tests[]
static void test__lread(void)
static void test_file_sharing(void)
static void test_GetTempFileNameA(void)
static void test_CopyFileA(void)
static void test_FindFirstFileA(void)
static unsigned int map_file_access(unsigned int access)
static PWSTR CURDIR *static BOOLEAN
static unsigned file_map_access(unsigned access)
static void dumpmem(unsigned char *mem, int len)
static void test_CopyFileEx(void)
static void test_CopyFileW(void)
static void test_GetFinalPathNameByHandleW(void)
static void test_MoveFileW(void)
static void get_nt_pathW(const char *name, UNICODE_STRING *nameW)
static void test_GetFileAttributesExW(void)
static void test_overlapped(void)
static FINDEX_INFO_LEVELS
static int test_Mapfile_createtemp(HANDLE *handle)
static void test__llseek(void)
static void test_SetFileValidData(void)
static void test_SetFileInformationByHandle(void)
static void test_CreateFile2(void)
static BOOL is_sharing_compatible(DWORD access1, DWORD sharing1, DWORD access2, DWORD sharing2)
static void test_read_write(void)
static PWSTR CURDIR *static PCANSI_STRING
static void test__lclose(void)
static void test__lwrite(void)
static void InitFunctionPointers(void)
static void test_MapFile(void)
static FILE_INFO_BY_HANDLE_CLASS
static HINSTANCE hkernel32
#define todo_wine_if(is_todo)
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK io
static const DWORD access_modes[4]
static const char * contents
static const WCHAR path3[]
static const WCHAR path1[]
static const WCHAR path2[]
#define FILE_ATTRIBUTE_READONLY
#define FILE_GENERIC_EXECUTE
#define FILE_READ_ATTRIBUTES
#define FILE_DELETE_CHILD
#define FILE_SHARE_DELETE
#define FILE_WRITE_ATTRIBUTES
#define FILE_ATTRIBUTE_ARCHIVE
#define FILE_ATTRIBUTE_DIRECTORY
#define FILE_GENERIC_READ
#define PAGE_EXECUTE_READWRITE
#define FILE_GENERIC_WRITE
#define IMAGE_SCN_MEM_WRITE
#define IMAGE_SUBSYSTEM_WINDOWS_GUI
#define IMAGE_FILE_MACHINE_AMD64
#define IMAGE_SCN_MEM_READ
#define IMAGE_NT_OPTIONAL_HDR_MAGIC
#define IMAGE_FILE_EXECUTABLE_IMAGE
#define IMAGE_FILE_MACHINE_I386
struct _IMAGE_OPTIONAL_HEADER IMAGE_OPTIONAL_HEADER
#define IMAGE_NT_SIGNATURE
#define IMAGE_DOS_SIGNATURE
_CRT_RESTORE_GCC_WARNINGS _CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
int const char int stream_size
#define STATUS_CANNOT_DELETE
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED * overlapped
LPSECURITY_ATTRIBUTES lpSecurityAttributes
CHAR szPathName[OFS_MAXPATHNAME]
LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY]
DWORD WINAPI SleepEx(IN DWORD dwMilliseconds, IN BOOL bAlertable)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
DWORD WINAPI WaitForSingleObjectEx(IN HANDLE hHandle, IN DWORD dwMilliseconds, IN BOOL bAlertable)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateSemaphoreW(IN LPSECURITY_ATTRIBUTES lpSemaphoreAttributes OPTIONAL, IN LONG lInitialCount, IN LONG lMaximumCount, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseSemaphore(IN HANDLE hSemaphore, IN LONG lReleaseCount, IN LPLONG lpPreviousCount)
Character const *const prefix
#define STATUS_NOT_A_DIRECTORY
#define STATUS_ACCESS_DENIED
#define INVALID_FILE_ATTRIBUTES
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
LPVOID NTAPI VirtualAlloc(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flAllocationType, IN DWORD flProtect)
BOOL NTAPI VirtualProtect(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flNewProtect, OUT PDWORD lpflOldProtect)
BOOL NTAPI VirtualFree(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD dwFreeType)
#define success(from, fromstr, to, tostr)
#define COPY_FILE_FAIL_IF_EXISTS
enum _FINDEX_SEARCH_OPS FINDEX_SEARCH_OPS
#define LOCKFILE_FAIL_IMMEDIATELY
#define STD_OUTPUT_HANDLE
DWORD WINAPI GetLastError(void)
HANDLE WINAPI GetCurrentThread(void)
#define LOCKFILE_EXCLUSIVE_LOCK
@ FindExSearchLimitToDirectories
#define WAIT_IO_COMPLETION
#define FIND_FIRST_EX_LARGE_FETCH
#define FIND_FIRST_EX_CASE_SENSITIVE
UINT WINAPI _lwrite(_In_ HFILE hFile, _In_reads_bytes_(uBytes) LPCCH lpBuffer, _In_ UINT uBytes)
#define CALLBACK_STREAM_SWITCH
enum _FINDEX_INFO_LEVELS FINDEX_INFO_LEVELS
#define ERROR_BAD_NETPATH
#define ERROR_IO_INCOMPLETE
#define ERROR_SHARING_VIOLATION
#define ERROR_INVALID_USER_BUFFER
#define ERROR_PATH_NOT_FOUND
#define ERROR_NOT_ALL_ASSIGNED
#define ERROR_BAD_PATHNAME
#define ERROR_FILE_EXISTS
#define ERROR_NO_MORE_FILES
#define ERROR_FILE_INVALID
#define ERROR_FILENAME_EXCED_RANGE
#define HRESULT_FROM_WIN32(x)
#define ERROR_REQUEST_ABORTED
#define ERROR_USER_MAPPED_FILE
#define ERROR_INVALID_DATA
#define ERROR_PRIVILEGE_NOT_HELD
#define ERROR_UNABLE_TO_REMOVE_REPLACED
#define SE_MANAGE_VOLUME_NAME
#define TOKEN_ADJUST_PRIVILEGES
#define SE_PRIVILEGE_ENABLED