29#define WIN32_NO_STATUS
65"en larvig liten text dx \033 gx hej 84 hej 4484 ! \001\033 bla bl\na.. bla bla."
66"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3"
67"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3"
68"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3"
69"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3"
70"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3"
71"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3"
72"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3"
73"1234 43 4kljf lf &%%%&&&&&& 34 4 34 3############# 33 3 3 3 # 3## 3"
74"sdlkfjasdlkfj a dslkj adsklf \n \nasdklf askldfa sdlkf \nsadklf asdklf asdf ";
153 ok(
_hread( filehandle,
buffer, bytes_wanted ) == bytes_wanted,
"erratic _hread return value\n" );
154 for (
i = 0;
i < bytes_wanted;
i++)
195 ok( 0 == bytes_read,
"file read size error\n" );
212 bytes_written = bytes_written +
sizeof(
buffer );
222 ok( 0 != memory_object,
"LocalAlloc fails. (Could be out of memory.)\n" );
232 ok( bytes_written ==
_hread( filehandle,
contents, bytes_written),
"read length differ from write length\n" );
241 while (
i < bytes_written - 1);
282 pRtlInitAnsiString( &
str,
name );
285 ok( !
status,
"RtlAnsiStringToUnicodeString failed with %08lx\n",
status );
288 ok(
ret,
"RtlDosPathNameToNtPathName_U failed\n" );
290 pRtlFreeUnicodeString( &
strW );
301 char slashname[] =
"testfi/";
351 "_hwrite shouldn't be able to write never the less\n" );
360 attr.RootDirectory = 0;
364 attr.SecurityQualityOfService =
NULL;
434 filehandle=
_lcreat (slashname, 0);
438 "creating file \"%s\" failed with error %d\n", slashname,
err);
442 ok (0,
"couldn't create volume label \"%s\"\n",
filename);
457 "expected \"%s\", got \"%s\"\n",
name, search_results.cFileName);
458 search_results.dwFileAttributes &= ~FILE_ATTRIBUTE_NOT_CONTENT_INDEXED;
459 search_results.dwFileAttributes &= ~FILE_ATTRIBUTE_COMPRESSED;
461 "attributes of file \"%s\" are 0x%04lx\n", search_results.cFileName,
462 search_results.dwFileAttributes);
485 for (
i = 0;
i < 400;
i++)
493 ok( 1 == bytes_read,
"file read size error\n" );
498 ok( 1 == bytes_read,
"file read size error\n" );
500 ok(
_llseek( filehandle, 1000000,
FILE_END ) != -1,
"should be able to seek past file; poor, poor Windows programmers\n" );
576 for (bytes_wanted = 0; bytes_wanted <
strlen(
sillytext ); bytes_wanted++)
579 ok(
_lread( filehandle,
buffer, bytes_wanted ) == bytes_wanted,
"erratic _hread return value\n" );
580 for (
i = 0;
i < bytes_wanted;
i++)
621 ok( 0 == bytes_read,
"file read size error\n" );
638 bytes_written = bytes_written +
sizeof(
buffer );
648 ok( 0 != memory_object,
"LocalAlloc fails, could be out of memory\n" );
658 ok( bytes_written ==
_hread( filehandle,
contents, bytes_written),
"read length differ from write length\n" );
667 while (
i < bytes_written - 1);
683 static const char prefix[] =
"pfx";
701 "copying a file to itself didn't fail (ret=%d, err=%ld)\n", retok,
GetLastError());
733 "CopyFileA: ret = %d, unexpected error %ld\n", retok,
GetLastError());
736 "CopyFileA: ret = %d, unexpected error %ld\n", retok,
GetLastError());
743 "copying from a read-locked file succeeded when it shouldn't have\n");
747 "copying from a file that doesn't exist failed in an unexpected way (ret=%d, err=%ld)\n", retok,
GetLastError());
755 "copying from an r+w opened and r shared file failed (ret=%d, err=%ld)\n", retok,
GetLastError());
763 "copying from a delete-locked file failed (ret=%d, err=%ld)\n", retok,
GetLastError());
771 "copying to a write-locked file didn't fail (ret=%d, err=%ld)\n", retok,
GetLastError());
779 "copying to a r+w opened and w shared file failed (ret=%d, err=%ld)\n", retok,
GetLastError());
785 "failed to open destination file, error %ld\n",
GetLastError());
790 "copying to a delete-locked shared file didn't fail (ret=%d, err=%ld)\n", retok,
GetLastError());
799 "copying to a file opened the way Wine opens the source failed (ret=%d, err=%ld)\n", retok,
GetLastError());
806 ok(
ret ==
sizeof(
prefix),
"destination file has wrong size %ld\n",
ret);
820 ok(
ret ==
sizeof(
prefix),
"destination file has wrong size %ld\n",
ret);
832 "CopyFileA with mapped dest file: expected ERROR_SHARING_VIOLATION, got %ld\n",
GetLastError());
845 ok(!
ret,
"CopyFileA: expected failure\n");
848 "CopyFileA with mapped dest file: expected ERROR_USER_MAPPED_FILE, got %ld\n",
GetLastError());
919 win_skip(
"GetTempPathW is not available\n");
955 static const WCHAR doesntexistW[] = {
'd',
'o',
'e',
's',
'n',
't',
'e',
'x',
'i',
's',
't',0};
958 COPYFILE2_EXTENDED_PARAMETERS
params;
996 ok(
hr ==
S_OK,
"CopyFile2: error 0x%08lx\n",
hr);
1037 ok(
ret,
"CopyFile2: error 0x%08lx\n",
hr);
1127 ok(
ret ==
sizeof(
prefix),
"destination file has wrong size %ld\n",
ret);
1143 ok(
ret ==
sizeof(
prefix),
"destination file has wrong size %ld\n",
ret);
1195 static const char prefix[] =
"pfx";
1215 ok(!retok,
"CopyFileExA unexpectedly succeeded\n");
1227 ok(!retok,
"CopyFileExA unexpectedly succeeded\n");
1234 ok(!retok,
"CopyFileExA unexpectedly succeeded\n");
1237 ok(!retok,
"CopyFileExA unexpectedly succeeded\n");
1243 ok(!
ret,
"DeleteFileA unexpectedly succeeded\n");
1256 ok(
ret,
"DeleteFileA unexpectedly failed\n");
1259 ok(retok,
"CopyFileExA unexpectedly failed\n");
1264 ok(retok,
"CopyFileExA unexpectedly failed\n");
1270 ok(retok,
"CopyFileExA unexpectedly failed\n");
1274 ok(!retok,
"CopyFileExA unexpectedly succeeded\n");
1278 ok(retok,
"CopyFileExA unexpectedly failed\n");
1282 ok(retok,
"CopyFileExA unexpectedly failed\n");
1286 ok(retok,
"CopyFileExA unexpectedly failed\n");
1290 ok(!retok,
"CopyFileExA unexpectedly succeeded\n");
1294 ok(!retok,
"CopyFileExA unexpectedly succeeded\n");
1298 ok(!retok,
"CopyFileExA unexpectedly succeeded\n");
1322 }
while (++
x % 16 &&
x <
len);
1324 trace(
"%04x: %-48s- %s\n",
x,
hex, txt);
1333 static const char prefix[] =
"pfx";
1336 unsigned char buffer[512];
1338 static const char nt_drive[] =
"\\\\?\\A:";
1371 "CREATE_NEW should fail if file exists and last error value should be ERROR_FILE_EXISTS\n");
1408 "LastError should have been ERROR_INVALID_NAME or ERROR_FILE_NOT_FOUND but got %lu\n",
GetLastError());
1412 ok(
ret <
sizeof(windowsdir),
"windowsdir is abnormally long!\n");
1460 skip(
"Do not have authority to access volumes. Test for %s skipped\n",
filename);
1469 "CreateFileA failed on %s, hFile %p, err=%lu, should be %lu\n",
1489 "CreateFileA did not work, last error %lu on volume <%s>\n",
1498 "CreateFileA probably did not open temp directory %s correctly\n file information does not include FILE_ATTRIBUTE_DIRECTORY, actual=0x%08lx\n",
1505 skip(
"Probable Win9x, got ERROR_PATH_NOT_FOUND w/ FILE_FLAG_BACKUP_SEMANTICS or %s\n",
temp_path);
1531 todo_wine ok(
ret,
"Failed to read volume, last error %lu, %lu, for %s\n",
1535 trace(
"buffer is\n");
1552 "CreateFileA should have returned ERROR_PATH_NOT_FOUND on %s, but got %lu\n",
1567 "CreateFileA should have worked on %s, but got %lu\n",
1588 skip(
"Probable Win9x, got ERROR_BAD_NETPATH (53)\n");
1590 skip(
"Do not have authority to access volumes. Tests skipped\n");
1595 if (pGetVolumeNameForVolumeMountPointA)
1603 ok(
strlen(Volume_1) == 49,
"GetVolumeNameForVolumeMountPointA returned wrong length name <%s>\n", Volume_1);
1616 "CreateFileA should not have opened %s, hFile %p\n",
1620 "CreateFileA should have returned ERROR_PATH_NOT_FOUND on %s, but got %lu\n",
1637 "CreateFileA should have opened %s, but got %lu\n",
1665 todo_wine ok(
ret,
"Failed to read volume, last error %lu, %lu, for %s\n",
1669 trace(
"buffer is\n");
1676 skip(
"Do not have authority to access volumes. Tests skipped\n");
1679 win_skip(
"GetVolumeNameForVolumeMountPointA not functioning\n");
1682 win_skip(
"GetVolumeNameForVolumeMountPointA not found\n");
1692 static const WCHAR bogus[] = {
'\\',
'\\',
'.',
'\\',
'B',
'O',
'G',
'U',
'S', 0 };
1698 win_skip(
"GetTempPathW is not available\n");
1711 "CREATE_NEW should fail if file exists and last error value should be ERROR_FILE_EXISTS\n");
1761 "CreateFileW on invalid VxD name returned ret=%p error=%ld\n",
hFile,
GetLastError());
1764 ok(
ret ==
TRUE,
"couldn't create temporary directory\n");
1768 "expected CreateFile to succeed on existing directory, error: %ld\n",
GetLastError());
1782 static const WCHAR bogus[] = {
'\\',
'\\',
'.',
'\\',
'B',
'O',
'G',
'U',
'S', 0 };
1787 win_skip(
"CreateFile2 is missing\n");
1799 exparams.
dwSize =
sizeof(exparams);
1807 "CREATE_NEW should fail if file exists and last error value should be ERROR_FILE_EXISTS\n");
1841 "CreateFile2 on invalid VxD name returned ret=%p error=%ld\n",
hFile,
GetLastError());
1844 ok(
ret ==
TRUE,
"couldn't create temporary directory\n");
1850 "CreateFile2 failed with FILE_FLAG_BACKUP_SEMANTICS on existing directory, error: %ld\n",
GetLastError());
1855 for (
i = 0;
i < 2; ++
i)
1857 memset(&exparams, 0,
sizeof(exparams));
1858 exparams.
dwSize =
sizeof(exparams);
1882 if (
i == 1)
ok(
ret,
"%ld: unexpected DeleteFileW failure, error %lu\n",
i,
GetLastError());
1893 char windowsdrive[3];
1896 ok(
result <
sizeof(windowsdir),
"windowsdir is abnormally long!\n");
1900 if (
strlen(windowsdir) != 3)
1902 strcat(windowsdir,
"\\");
1905 windowsdrive[0] = windowsdir[0];
1906 windowsdrive[1] = windowsdir[1];
1907 windowsdrive[2] =
'\0';
1911 ok(((
out[0] == windowsdrive[0]) && (
out[1] ==
':')) && (
out[2] ==
'\\'),
1912 "GetTempFileNameA: first three characters should be %c:\\, string was actually %s\n",
1913 windowsdrive[0],
out);
1946 "DeleteFileA(\"nul\") returned ret=%d error=%ld\n",
ret,
GetLastError());
1966 ok(!
ret,
"DeleteFile should fail\n");
1973 "Expected ERROR_ACCESS_DENIED, got error %ld\n",
GetLastError());
1989 ok(!
ret,
"expected failure\n");
2005 static const WCHAR dirW[] = {
'd',
'e',
'l',
'e',
't',
'e',
'f',
'i',
'l',
'e',0};
2006 static const WCHAR subdirW[] = {
'\\',
's',
'u',
'b',0};
2012 win_skip(
"DeleteFileW is not available\n");
2026 ok(0,
"MAX_PATH exceeded in constructing paths\n");
2033 ok(
ret ==
TRUE,
"couldn't create directory deletefile\n");
2035 ok(
ret ==
FALSE,
"DeleteFile should fail for empty directories\n");
2037 ok(
ret ==
TRUE,
"expected to remove directory deletefile\n");
2041 ok(
ret ==
TRUE,
"couldn't create directory deletefile\n");
2043 ok(
ret ==
TRUE,
"couldn't create directory deletefile\\sub\n");
2045 ok(
ret ==
FALSE,
"DeleteFile should fail for non-empty directories\n");
2047 ok(
ret ==
TRUE,
"expected to remove directory deletefile\\sub\n");
2049 ok(
ret ==
TRUE,
"expected to remove directory deletefile\n");
2052#define IsDotDir(x) ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0))))
2058 static const char prefix[] =
"pfx";
2096 ok(!
ret,
"MoveFileA: expected failure\n");
2099 "MoveFileA: expected ERROR_SHARING_VIOLATION, got %ld\n",
GetLastError());
2114 ok(!
ret,
"MoveFileA: expected failure\n");
2117 "MoveFileA: expected ERROR_SHARING_VIOLATION, got %ld\n",
GetLastError());
2132 tempdir[
lstrlenA(tempdir) - 2] =
'm';
2146 "MoveFile failed to change casing on same file: got %s\n",
find_data.cFileName);
2151 tempdir[
lstrlenA(tempdir) - 2] =
'B';
2158 ok(!
ret,
"MoveFileA: expected failure\n");
2163 tempdir[
lstrlenA(tempdir) - 2] =
'm';
2170 "MoveFile failed to change casing on existing target file: got %s\n",
find_data.cFileName);
2179 ok(
ret ==
TRUE,
"CreateDirectoryA failed\n");
2182 tempdir[
lstrlenA(tempdir) - 2] =
'M';
2191 "MoveFile failed to change casing on same directory: got %s\n",
find_data.cFileName);
2200 ok(!
ret,
"MoveFileA: shouldn't move to wildcard file\n");
2203 "MoveFileA: with wildcards, unexpected error %ld\n",
GetLastError());
2245 win_skip(
"GetTempPathW is not available\n");
2267#define PATTERN_OFFSET 0x10
2293 ok(done ==
sizeof(
buf),
"expected number of bytes written %lu\n", done);
2295 memset(&ov, 0,
sizeof(ov));
2302 ok(done ==
sizeof(
pattern),
"expected number of bytes written %lu\n", done);
2310 ok(done ==
sizeof(
pattern),
"expected number of bytes written %lu\n", done);
2323 memset(&ov, 0,
sizeof(ov));
2330 ok(done ==
sizeof(
pattern),
"expected number of bytes read %lu\n", done);
2347 int limited_LockFile;
2348 int limited_UnLockFile;
2372 limited_UnLockFile = 0;
2375 limited_UnLockFile = 1;
2399 "LockFileEx 100,100 failed\n" );
2409 "LockFileEx exclusive 150,50 succeeded\n" );
2414 "UnlockFileEx 150,100 again succeeded\n" );
2420 "LockFileEx exclusive 300,100 failed\n" );
2422 "LockFileEx handle2 300,100 succeeded\n" );
2424 ok(
ret,
"LockFileEx 300,100 failed\n" );
2428 "LockFileEx handle2 300,100 failed\n" );
2437 ok( !
LockFile(
handle, 0, 0x20000000, 20, 0 ),
"LockFile 0x20000000,20 succeeded\n" );
2447 limited_LockFile = 0;
2450 limited_LockFile = 1;
2453 limited_UnLockFile ||
ok(
UnlockFile(
handle, ~0, ~0, 1, 0 ),
"Unlockfile ~0,1 failed\n" );
2457 if (!limited_LockFile)
ok( !
LockFile(
handle, 98, 0, 4, 0 ),
"LockFile 98,4 succeeded\n" );
2459 if (!limited_LockFile)
ok( !
LockFile(
handle, 100, 0, 10, 0 ),
"LockFile 100,10 failed\n" );
2478 DWORD lfanew =
sizeof(*dos);
2479 DWORD size = lfanew +
sizeof(*nt) +
sizeof(*sec);
2504#elif defined __x86_64__
2506#elif defined __arm__
2508#elif defined __aarch64__
2511# error You must specify the machine type
2535 memcpy( sec->
Name,
".rodata",
sizeof(
".rodata") );
2588#define M(x) {x, # x}
2597 static const struct mode sharing_modes[] =
2602 static const struct mode mapping_modes[] =
2640 "open failed for modes %s / %s / %s / %s\n",
2643 ok(
ret == 0,
"wrong error code %d\n",
ret );
2648 "open succeeded for modes %s / %s / %s / %s\n",
2652 "wrong error code %d\n",
ret );
2690 "open failed for modes map %s / %s / %s\n",
2693 "wrong error code %d\n",
ret );
2699 "open succeeded for modes map %s / %s / %s\n",
2701 ok(
ret == 0xdeadbeef ||
2703 "wrong error code %d\n",
ret );
2767 return windowsdir[0];
2795 "FindFirstFile shouldn't return '%s' in drive root\n",
data.cFileName );
2798 "FindNextFile shouldn't return '%s' in drive root\n",
data.cFileName );
2806 ok( !
strcmp(
data.cFileName,
"." ),
"FindFirstFile should return '.' first\n" );
2808 ok( !
strcmp(
data.cFileName,
".." ),
"FindNextFile should return '..' as second entry\n" );
2812 "FindNextFile shouldn't return '%s'\n",
data.cFileName );
2825 ok ( found,
"Windows dir should not be empty\n" );
2844 strcpy(buffer2, nonexistent);
2855 strcpy(buffer2, nonexistent);
2863 strcpy(buffer2, nonexistent);
2864 strcat(buffer2,
"\\bar.txt");
2872 strcpy(buffer2, nonexistent);
2873 strcat(buffer2,
"\\*.*");
2881 strcpy(buffer2, nonexistent + 3);
2882 strcat(buffer2,
"\\bar.txt");
2898 "wrong attributes %lx\n",
data.dwFileAttributes );
2901 ok( 0 ==
data.nFileSizeHigh,
"wrong size %ld\n",
data.nFileSizeHigh );
2902 ok( 0 ==
data.nFileSizeLow,
"wrong size %ld\n",
data.nFileSizeLow );
2918 "wrong attributes %lx\n",
data.dwFileAttributes );
2921 ok( 0 ==
data.nFileSizeHigh,
"wrong size %ld\n",
data.nFileSizeHigh );
2922 ok( 0 ==
data.nFileSizeLow,
"wrong size %ld\n",
data.nFileSizeLow );
2932 strcat(buffer2,
"nul\\*");
2950 strcat(buffer2,
"foo\\bar\\nul");
2954 "FindFirstFile on %s should fail\n", buffer2 );
2963 strcat(buffer2,
"foo\\nul\\bar");
2975 char buffer[5] =
"C:\\*";
2995 if (!pFindFirstFileExA)
2997 win_skip(
"FindFirstFileExA() is missing\n");
3001 trace(
"Running FindFirstFileExA tests with level=%d, search_ops=%d, flags=%lu\n",
3012 win_skip(
"FindFirstFileExA is not implemented\n");
3017 win_skip(
"FindFirstFileExA flag FIND_FIRST_EX_LARGE_FETCH not supported, skipping test\n");
3022 win_skip(
"FindFirstFileExA level FindExInfoBasic not supported, skipping test\n");
3026#define CHECK_NAME(fn) (strcmp((fn), "file1") == 0 || strcmp((fn), "file2") == 0 || strcmp((fn), "dir1") == 0)
3027#define CHECK_LEVEL(fn) (level != FindExInfoBasic || !(fn)[0])
3030 ok(
strcmp(search_results.cFileName,
".") == 0,
"First entry should be '.', is %s\n", search_results.cFileName);
3031 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
3034 ok(
strcmp(search_results.cFileName,
"..") == 0,
"Second entry should be '..' is %s\n", search_results.cFileName);
3035 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
3038 ok(
CHECK_NAME(search_results.cFileName),
"Invalid third entry - %s\n", search_results.cFileName);
3039 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
3045 skip(
"File system supports directory filtering\n");
3047 ok(
strcmp(search_results.cFileName,
"dir1") == 0,
"Third entry should be 'dir1' is %s\n", search_results.cFileName);
3048 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
3053 ok(
ret,
"Fetching fourth file failed\n");
3054 ok(
CHECK_NAME(search_results.cFileName),
"Invalid fourth entry - %s\n", search_results.cFileName);
3055 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
3058 ok(
CHECK_NAME(search_results.cFileName),
"Invalid fifth entry - %s\n", search_results.cFileName);
3059 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
3076 "Unexpected error %lx, expected valid handle or ERROR_PATH_NOT_FOUND\n",
GetLastError());
3077 trace(
"FindFirstFileExA flag FIND_FIRST_EX_CASE_SENSITIVE is %signored\n",
3097 static const char* files[] = {
3098 "..a",
"..a.a",
".a",
".a..a",
".a.a",
".aaa",
3099 "a",
"a..a",
"a.a",
"a.a.a",
"aa",
"aaa",
"aaaa",
" .a"
3101 static const struct {
3104 {
"*.*.*",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3105 {
"*.*.",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3106 {
".*.*",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa'"},
3107 {
"*.*",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3108 {
".*",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa'"},
3110 {
"*.",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3111 {
"*",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3112 {
"*..*",
", '.', '..', '..a', '..a.a', '.a..a', 'a..a'"},
3113 {
"*..",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3114 {
".*.",
", '.', '..', '.a', '.aaa'"},
3115 {
"..*",
", '.', '..', '..a', '..a.a'"},
3116 {
"**",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3117 {
"**.",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3118 {
"*. ",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3119 {
"* .",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3120 {
"* . ",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3122 {
"*.. ",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3123 {
"*. .",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3124 {
"* ..",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3126 {
"..* ",
", '.', '..', '..a', '..a.a'"},
3127 {
"* .*.",
", ' .a'"},
3129 {
"a*.",
", '..a', '.a', '.aaa', 'a', 'aa', 'aaa', 'aaaa'"},
3130 {
"*a ",
", '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3131 {
"*aa*",
", '.aaa', 'a.a.a', 'aa', 'aaa', 'aaaa'"},
3132 {
"aa*.",
", '.aaa', 'aa', 'aaa', 'aaaa'"},
3135 {
"a\"*\"a",
", 'a..a', 'a.a.a'"},
3136 {
"aa*.*",
", '.aaa', 'a.a.a', 'aa', 'aaa', 'aaaa'"},
3142 {
"a* .",
", 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3144 {
"* .a",
", ' .a'"},
3145 {
"< .a",
", ' .a'"},
3146 {
"** .a",
", ' .a'"},
3147 {
"<< .a",
", ' .a'"},
3148 {
"aa? ",
", 'aa', 'aaa'"},
3149 {
"aa\"*",
", 'aa'"},
3150 {
"*.a",
", '..a', '..a.a', '.a', '.a..a', '.a.a', 'a..a', 'a.a', 'a.a.a', ' .a'"},
3151 {
"<.a",
", '..a', '..a.a', '.a', '.a..a', '.a.a', 'a..a', 'a.a', 'a.a.a', ' .a'"},
3153 {
"<.<.<",
", '..a', '..a.a', '.a..a', '.a.a', 'a..a', 'a.a.a'"},
3154 {
"<.<.< ",
", '..a', '..a.a', '.a..a', '.a.a', 'a..a', 'a.a.a'"},
3155 {
"<.<.",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a..a', 'a.a', 'a.a.a', ' .a'"},
3156 {
"< .<.",
", ' .a'"},
3157 {
"< .<. ",
", ' .a'"},
3158 {
"<.<. ",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a..a', 'a.a', 'a.a.a', ' .a'"},
3159 {
".<.<",
", '..a', '..a.a', '.a..a', '.a.a'"},
3160 {
"<.<",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a..a', 'a.a', 'a.a.a', ' .a'"},
3161 {
".<",
", '.', '..', '.a', '.aaa'"},
3162 {
"<.",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3163 {
"<",
", '.', '..', '..a', '.a', '.aaa', 'a', 'aa', 'aaa', 'aaaa'"},
3164 {
"<..<",
", '..a', '.a..a', 'a..a'"},
3165 {
"<..",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3166 {
".<.",
", '.', '..', '.a', '.aaa'"},
3168 {
"<<",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3169 {
"<<.",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3170 {
"<. ",
", '.', '..', '..a', '.a', '.aaa', 'a', 'aa', 'aaa', 'aaaa'"},
3171 {
"< .",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3172 {
"< . ",
", '.', '..', '..a', '.a', '.aaa', 'a', 'aa', 'aaa', 'aaaa'"},
3173 {
"<.. ",
", '.', '..', '..a', '.a', '.aaa', 'a', 'aa', 'aaa', 'aaaa'"},
3174 {
"<. .",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3175 {
"< ..",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3177 {
"..< ",
", '..a'"},
3179 {
"?",
", '.', '..', 'a'"},
3180 {
"?.",
", '.', '..', 'a'"},
3181 {
"?. ",
", '.', '..', 'a'"},
3183 {
"??.",
", '.', '..', 'a', 'aa'"},
3184 {
"??. ",
", '.', '..', 'a', 'aa'"},
3185 {
"???.",
", '.', '..', 'a', 'aa', 'aaa'"},
3186 {
"?.??.",
", '.', '..', '.a', 'a', 'a.a', ' .a'"},
3189 {
">",
", '.', '..', 'a'"},
3190 {
">.",
", '.', '..', 'a'"},
3191 {
">. ",
", '.', '..', 'a'"},
3192 {
">>.",
", '.', '..', 'a', 'aa'"},
3193 {
">>. ",
", '.', '..', 'a', 'aa'"},
3194 {
">>>.",
", '.', '..', 'a', 'aa', 'aaa'"},
3195 {
">.>>.",
", '.', '..', '.a', 'a.a', ' .a'"},
3206 char incorrect[512];
3210 correct[0] = incorrect[0] = 0;
3229 strcat(incorrect, quoted);
3234 ok(missing[0] == 0 && incorrect[0] == 0,
3235 "FindFirstFile with '%s' found correctly %s, found incorrectly %s, and missed %s\n",
3237 correct[0] ? correct+2 :
"none",
3238 incorrect[0] ? incorrect+2 :
"none",
3239 missing[0] ? missing+2 :
"none");
3271 ok( hmap !=
NULL,
"mapping should work, I named it!\n" );
3278 ok( hmap !=
NULL,
"We should still be able to map!\n" );
3288 ok( hmap ==
NULL,
"mapped zero size file\n");
3294 ok( hmap ==
NULL,
"mapping should fail\n");
3323 ok(
type == type2,
"expected type %ld for STD_OUTPUT_HANDLE got %ld\n", type2,
type);
3326 ok(
ret,
"CreatePipe failed\n" );
3343 ok( h2 !=
NULL,
"CreateFileMapping failed\n" );
3355 ok(
h !=
NULL,
"CreateFileMapping failed\n" );
3384 ok(
h !=
NULL,
"CreateMutex failed\n" );
3410 ok(
FALSE,
"FIXME: test_async_file_errors() crashes on ReactOS!\n");
3420 strcat(szFile,
"\\win.ini");
3463 static const char prefix[] =
"pfx";
3495 "bytes = %ld\n",
bytes);
3526 ok(
bytes == 0x4000,
"only wrote %lx bytes\n",
bytes );
3532 ok( !
ret,
"WriteFile succeeded\n" );
3539 ok( !
ret,
"WriteFile succeeded\n" );
3549 ok( !
ret,
"WriteFile succeeded\n" );
3558 ok( !
ret,
"ReadFile succeeded\n" );
3568 ok( !
ret,
"ReadFile succeeded\n" );
3578 ok( !
ret,
"ReadFile succeeded\n" );
3589 ok( !
ret,
"ReadFile succeeded\n" );
3600 ok( !
ret,
"ReadFile succeeded\n" );
3621 static const char file[] =
"regedit.exe";
3622 static const char foo[] =
".\\foo-bar-foo.baz";
3623 static const char *foo_too_long =
".\\foo-bar-foo.baz+++++++++++++++"
3624 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
3625 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
3626 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
3627 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
3628 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++";
3636 if (!pGetSystemWindowsDirectoryA)
3644 if (
p >
buff &&
p[-1] !=
'\\') *
p++ =
'\\';
3646 memset(&ofs, 0xA5,
sizeof(ofs));
3653 ok( ofs.
cBytes ==
sizeof(ofs),
"OpenFile set ofs.cBytes to %d\n", ofs.
cBytes );
3656 "OpenFile returned '%s', but was expected to return '%s' or string filled with 0xA5\n",
3667 if (
p >
buff &&
p[-1] !=
'\\') *
p++ =
'\\';
3669 memset(&ofs, 0xA5,
sizeof(ofs));
3676 ok( ofs.
cBytes == 0xA5,
"OpenFile set ofs.cBytes to %d\n", ofs.
cBytes );
3679 "OpenFile returned '%s', but was expected to return '%s' or string filled with 0xA5\n",
3689 lstrcatA(buff_long, foo_too_long + 1);
3690 memset(&ofs, 0xA5,
sizeof(ofs));
3698 ok( ofs.
cBytes == 0xA5,
"OpenFile set ofs.cBytes to %d\n", ofs.
cBytes );
3700 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3702 "OpenFile returned '%s', but was expected to return string filled with 0xA5\n",
3706 memset(&ofs, 0xA5,
sizeof(ofs));
3715 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3717 ok( !
ret,
"_lclose() returns %d\n",
ret );
3721 memset(&ofs, 0xA5,
sizeof(ofs));
3731 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3733 "OpenFile returned '%s', but was expected to return '%s'\n", ofs.
szPathName,
filename );
3735 ok( !
ret,
"_lclose() returns %d\n",
ret );
3737 memset(&ofs, 0xA5,
sizeof(ofs));
3746 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3748 "OpenFile returned '%s', but was expected to return '%s'\n", ofs.
szPathName,
filename );
3750 ok( !
ret,
"_lclose() returns %d\n",
ret );
3752 memset(&ofs, 0xA5,
sizeof(ofs));
3761 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3763 "OpenFile returned '%s', but was expected to return '%s'\n", ofs.
szPathName,
filename );
3765 ok( !
ret,
"_lclose() returns %d\n",
ret );
3767 memset(&ofs, 0xA5,
sizeof(ofs));
3771 ok(
hFile == 1,
"OpenFile failed on finding our created file\n" );
3776 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3778 "OpenFile returned '%s', but was expected to return '%s'\n", ofs.
szPathName,
filename );
3780 memset(&ofs, 0xA5,
sizeof(ofs));
3784 ok(
hFile == 1,
"OpenFile failed on delete (%d)\n",
hFile );
3789 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3791 "OpenFile returned '%s', but was expected to return '%s'\n", ofs.
szPathName,
filename );
3810 memset( &ov, 0,
sizeof ov );
3833 ok(
r ==
FALSE,
"should return false\n");
3843 ok(
r ==
FALSE,
"should return false\n");
3853 ok(
r ==
FALSE,
"should return false\n");
3856 ok(
r ==
TRUE,
"should return TRUE\n" );
3868 ok(
r ==
FALSE,
"should return false\n");
3871 ok(
r ==
TRUE,
"close handle failed\n");
3883 ok( rc,
"SetCurrentDirectory failed, gle=%ld\n",
GetLastError() );
3889 ok( rc,
"SetCurrentDirectory failed, gle=%ld\n",
GetLastError() );
3900 return (t1 > t2 ? t1 - t2 : t2 - t1) <= tolerance;
3906 HANDLE hReplacedFile, hReplacementFile, hBackupFile,
mapping;
3907 static const char replacedData[] =
"file-to-replace";
3908 static const char replacementData[] =
"new-file";
3909 static const char backupData[] =
"backup-file";
3910 FILETIME ftReplaced, ftReplacement, ftBackup;
3911 static const char prefix[] =
"pfx";
3933 "failed to open replaced file\n");
3934 retok =
WriteFile(hReplacedFile, replacedData,
sizeof(replacedData), &
ret,
NULL );
3935 ok( retok &&
ret ==
sizeof(replacedData),
3938 "replaced file has wrong size\n");
3942 "failed to open replacement file\n");
3943 retok =
WriteFile(hReplacementFile, replacementData,
sizeof(replacementData), &
ret,
NULL );
3944 ok( retok &&
ret ==
sizeof(replacementData),
3945 "WriteFile error (replacement) %ld\n",
GetLastError());
3947 "replacement file has wrong size\n");
3951 "failed to open backup file\n");
3952 retok =
WriteFile(hBackupFile, backupData,
sizeof(backupData), &
ret,
NULL );
3953 ok( retok &&
ret ==
sizeof(backupData),
3954 "WriteFile error (replacement) %ld\n",
GetLastError());
3956 "backup file has wrong size\n");
3987 "failed to open backup file\n");
3989 ok(
ret ==
sizeof(replacedData),
3990 "backup file has wrong size %ld\n",
ret);
3994 "failed to open replaced file: %ld\n",
GetLastError());
3998 ok(
ret ==
sizeof(replacementData),
3999 "replaced file has wrong size %ld\n",
ret);
4003 "unexpected error, replacement file should not exist %ld\n",
GetLastError());
4007 ok(
check_file_time(&ftBackup, &ftReplaced, 20000000),
"backup file has wrong filetime\n");
4013 "replaced file has wrong filetime %lx%08lx / %lx%08lx\n",
4019 skip(
"couldn't open replacement file, skipping tests\n");
4030 "ReplaceFileA: unexpected error %ld\n",
GetLastError());
4044 "ReplaceFileA: unexpected error %ld\n",
GetLastError());
4046 removeBackup =
TRUE;
4054 "SetFileAttributesA: error setting to read only %ld\n",
GetLastError());
4065 "unexpected error, replacement file should still exist %ld\n",
GetLastError());
4069 "SetFileAttributesA: error setting to normal %ld\n",
GetLastError());
4076 ok(
ret,
"SetFileAttributesA: error setting to readonly %#lx\n",
GetLastError());
4093 "unexpected error, replaced file should be able to be opened %ld\n",
GetLastError());
4103 ok(hReplacementFile !=
INVALID_HANDLE_VALUE,
"unexpected error, replacement file should be able to be opened %ld\n",
4106 ok(!
ret,
"expect failure\n");
4113 "DeleteFileA: error (replaced) %ld\n",
GetLastError());
4121 "ReplaceFileA: unexpected error %ld\n",
GetLastError());
4130 "ReplaceFileA: unexpected error %ld\n",
GetLastError());
4200 win_skip(
"ReplaceFileW() is missing\n");
4207 win_skip(
"GetTempPathW is not available\n");
4222 ret = pReplaceFileW(replaced, replacement,
backup, 0, 0, 0);
4227 ret = pReplaceFileW(replaced, replacement,
NULL, 0, 0, 0);
4235 ret = pReplaceFileW(replaced, replacement,
backup, 0, 0, 0);
4243 "SetFileAttributesW: error setting to read only %ld\n",
GetLastError());
4246 ret = pReplaceFileW(replaced, replacement,
backup, 0, 0, 0);
4247 ok(!
ret,
"expected failure\n");
4251 "SetFileAttributesW: error setting to normal %ld\n",
GetLastError());
4253 removeBackup =
TRUE;
4257 ret = pReplaceFileW(replaced, replacement,
backup, 0, 0, 0);
4260 ret = pReplaceFileW(replaced, replacement,
NULL, 0, 0, 0);
4263 "ReplaceFileW: unexpected error %ld\n",
GetLastError());
4321 for (
i = 0;
i <= 5;
i++)
4326 if (
i == 0 ||
i == 5)
4359 written = 0xdeadbeef;
4366 ok(!
ret,
"%ld: WriteFile should fail\n",
i);
4377 ok(!
ret,
"%ld: SetFileTime should fail\n",
i);
4413 DWORD ret2, written;
4415 FILE_ID_BOTH_DIR_INFO *bothDirInfo;
4416 FILE_BASIC_INFO *basicInfo;
4417 FILE_STANDARD_INFO *standardInfo;
4418 FILE_NAME_INFO *nameInfo;
4420 FILE_IO_PRIORITY_HINT_INFO priohintinfo;
4421 FILE_ALLOCATION_INFO allocinfo;
4422 FILE_DISPOSITION_INFO dispinfo;
4423 FILE_END_OF_FILE_INFO eofinfo;
4424 FILE_RENAME_INFO renameinfo;
4437 if (!pGetFileInformationByHandleEx)
4439 win_skip(
"GetFileInformationByHandleEx is missing.\n");
4444 ok(ret2,
"GetFileInformationByHandleEx: GetTempPathA failed, got error %lu.\n",
GetLastError());
4448 ok(ret2,
"GetFileInformationByHandleEx: GetTempFileNameA failed, got error %lu.\n",
GetLastError());
4451 "GetFileAttributesA failed to find the temp file, got error %lu.\n",
GetLastError());
4462 ok(!
ret &&
GetLastError() == checks[
i].errorCode,
"GetFileInformationByHandleEx: expected error %lu, "
4472 ok(
ret,
"GetFileInformationByHandleEx: failed to query for FileIdBothDirectoryInfo, got error %lu.\n",
GetLastError());
4475 bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)
buffer;
4478 ok(bothDirInfo->FileAttributes != 0xffffffff,
"GetFileInformationByHandleEx: returned invalid file attributes.\n");
4479 ok(bothDirInfo->FileId.u.LowPart != 0xffffffff,
"GetFileInformationByHandleEx: returned invalid file id.\n");
4480 ok(bothDirInfo->FileNameLength != 0xffffffff,
"GetFileInformationByHandleEx: returned invalid file name length.\n");
4481 if (!bothDirInfo->NextEntryOffset)
4483 bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)(((
char *)bothDirInfo) + bothDirInfo->NextEntryOffset);
4497 ok(
ret,
"GetFileInformationByHandleEx: failed to get FileBasicInfo, %lu\n",
GetLastError());
4498 basicInfo = (FILE_BASIC_INFO *)
buffer;
4499 prevWrite = basicInfo->LastWriteTime;
4510 ok(
ret,
"GetFileInformationByHandleEx: Write failed\n");
4520 ok(
ret,
"GetFileInformationByHandleEx: failed to get FileBasicInfo, %lu\n",
GetLastError());
4521 basicInfo = (FILE_BASIC_INFO *)
buffer;
4524 ok(basicInfo->LastWriteTime.QuadPart != prevWrite.
QuadPart,
4525 "GetFileInformationByHandleEx: last write time didn't change\n");
4530 ok(
ret,
"GetFileInformationByHandleEx: failed to get FileStandardInfo, %lu\n",
GetLastError());
4531 standardInfo = (FILE_STANDARD_INFO *)
buffer;
4532 ok(standardInfo->NumberOfLinks == 1,
"GetFileInformationByHandleEx: Unexpected number of links\n");
4533 ok(standardInfo->DeletePending ==
FALSE,
"GetFileInformationByHandleEx: Unexpected pending delete\n");
4534 ok(standardInfo->Directory ==
FALSE,
"GetFileInformationByHandleEx: Incorrect directory flag\n");
4539 ok(
ret,
"GetFileInformationByHandleEx: failed to get FileNameInfo, %lu\n",
GetLastError());
4540 nameInfo = (FILE_NAME_INFO *)
buffer;
4541 strPtr =
strchr(tempFileName,
'\\');
4542 ok(strPtr !=
NULL,
"GetFileInformationByHandleEx: Temp filename didn't contain backslash\n");
4543 ok(nameInfo->FileNameLength ==
strlen(strPtr) * 2,
4544 "GetFileInformationByHandleEx: Incorrect file name length\n");
4545 for (
i = 0;
i < nameInfo->FileNameLength/2;
i++)
4546 ok(strPtr[
i] == nameInfo->FileName[
i],
"Incorrect filename char %d: %c vs %c\n",
4547 i, strPtr[
i], nameInfo->FileName[
i]);
4581 FILE_ID_BOTH_DIR_INFO *bothDirInfo;
4582 FILE_ID_DESCRIPTOR fileIdDescr;
4584 if (!pGetFileInformationByHandleEx || !pOpenFileById)
4586 win_skip(
"GetFileInformationByHandleEx or OpenFileById is missing.\n");
4591 ok(ret2,
"OpenFileById: GetTempPath failed, got error %lu.\n",
GetLastError());
4595 ok(ret2,
"OpenFileById: GetTempFileNameA failed, got error %lu.\n",
GetLastError());
4598 "OpenFileById: GetFileAttributesA failed to find the temp file, got error %lu\n",
GetLastError());
4601 ok(ret2,
"OpenFileById: MultiByteToWideChar failed to convert tempFileName, got error %lu.\n",
GetLastError());
4602 tempFileNameLen = ret2 - 1;
4618 bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)
buffer;
4620 ok(
ret,
"OpenFileById: failed to query for FileIdBothDirectoryInfo, got error %lu.\n",
GetLastError());
4621 ok(bothDirInfo->FileNameLength ==
sizeof(
WCHAR) && bothDirInfo->FileName[0] ==
'.',
4622 "OpenFileById: failed to return the temp folder at the first entry, got error %lu.\n",
GetLastError());
4625 fileIdDescr.dwSize =
sizeof(fileIdDescr);
4626 fileIdDescr.Type = FileIdType;
4627 fileIdDescr.FileId = bothDirInfo->FileId;
4638 ok(
ret,
"OpenFileById: failed to query for FileIdBothDirectoryInfo, got error %lu.\n",
GetLastError());
4641 bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)
buffer;
4644 if (tempFileNameLen == bothDirInfo->FileNameLength /
sizeof(
WCHAR) &&
4645 memcmp(tempFileNameW, bothDirInfo->FileName, bothDirInfo->FileNameLength) == 0)
4650 if (!bothDirInfo->NextEntryOffset)
4652 bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)(((
char *)bothDirInfo) + bothDirInfo->NextEntryOffset);
4655 ok(found,
"OpenFileById: failed to find the temp file in the temp folder.\n");
4660 "OpenFileById: expected ERROR_INVALID_PARAMETER, got error %lu.\n",
GetLastError());
4662 fileIdDescr.dwSize =
sizeof(fileIdDescr);
4663 fileIdDescr.Type = FileIdType;
4664 fileIdDescr.FileId = bothDirInfo->FileId;
4671 ok(
strcmp(tickCount,
buffer) == 0,
"OpenFileById: invalid contents of the temp file.\n");
4687 if (!pSetFileValidData)
4689 win_skip(
"SetFileValidData is missing\n");
4701 ok(!
ret,
"SetFileValidData succeeded\n");
4707 ok(!
ret,
"SetFileValidData succeeded\n");
4715 ok(!
ret,
"SetFileValidData succeeded\n");
4722 ok(!
ret,
"SetFileValidData succeeded\n");
4731 ok(!
ret,
"SetFileValidData succeeded\n");
4743 win_skip(
"cannot enable SE_MANAGE_VOLUME_NAME privilege\n");
4753 ok(!
ret,
"SetFileValidData succeeded\n");
4759 ok(!
ret,
"SetFileValidData succeeded\n");
4774 ok(!
ret,
"SetFileValidData succeeded\n");
4804 ok(!
ret,
"SetFileValidData succeeded\n");
4823 static const DWORD invalid_attributes[] =
4835 static const DWORD valid_attributes[] =
4847 win_skip(
"ReOpenFile() is not available\n");
4913 HANDLE hfile, hiocp1, hiocp2, evt;
4919 char *wbuf =
NULL, *rbuf1, *rbuf2;
4926 ok(
ret <
MAX_PATH,
"temp path should fit into MAX_PATH\n" );
4937 ok( hiocp2 != 0,
"CreateIoCompletionPort failed err %lu\n",
GetLastError() );
4949 memset( &ovl, 0,
sizeof(ovl) );
4951 memset( fse, 0,
sizeof(fse) );
4960 ok( povl == &ovl,
"wrong ovl %p\n", povl );
4964 ok(
FALSE,
"FIXME: Calls to GetOverlappedResult hang on ReactOS!\n");
4970 ok( tx ==
si.
dwPageSize,
"got unexpected bytes transferred: %lu\n", tx );
4978 memset( &ovl, 0,
sizeof(ovl) );
4980 memset( fse, 0,
sizeof(fse) );
4985 ok( br ==
FALSE,
"ReadFileScatter should be asynchronous\n" );
4990 ok( povl == &ovl,
"wrong ovl %p\n", povl );
4994 ok(
FALSE,
"FIXME: Calls to GetOverlappedResult hang on ReactOS!\n");
5000 ok( tx ==
si.
dwPageSize,
"got unexpected bytes transferred: %lu\n", tx );
5006 "data was not read into buffer\n" );
5011 memset( &ovl, 0,
sizeof(ovl) );
5015 memset( fse, 0,
sizeof(fse) );
5019 ok( br ==
FALSE,
"ReadFileScatter should have failed\n" );
5026 ok( !
ret,
"GetQueuedCompletionStatus should have returned failure\n" );
5028 ok( povl == &ovl,
"wrong ovl %p\n", povl );
5032 ok( br ==
FALSE,
"GetOverlappedResult should have failed\n" );
5041 ok( povl ==
NULL,
"wrong ovl %p\n", povl );
5047 memset( &ovl, 0,
sizeof(ovl) );
5049 memset( fse, 0,
sizeof(fse) );
5056 ok( br ==
FALSE,
"ReadFileScatter should be asynchronous\n" );
5061 ok( povl == &ovl,
"wrong ovl %p\n", povl );
5065 ok(
FALSE,
"FIXME: Calls to GetOverlappedResult hang on ReactOS!\n");
5071 ok( tx ==
si.
dwPageSize,
"got unexpected bytes transferred: %lu\n", tx );
5077 "data was not read into buffer\n" );
5080 "data should not have been read into buffer\n" );
5085 memset( &ovl, 0,
sizeof(ovl) );
5087 memset( fse, 0,
sizeof(fse) );
5092 ok( br ==
FALSE,
"ReadFileScatter should be asynchronous\n" );
5097 ok( povl == &ovl,
"wrong ovl %p\n", povl );
5101 ok(
FALSE,
"FIXME: Calls to GetOverlappedResult hang on ReactOS!\n");
5107 ok( tx ==
si.
dwPageSize / 2,
"got unexpected bytes transferred: %lu\n", tx );
5113 "invalid data was read into buffer\n" );
5116 "invalid data was read into buffer\n" );
5118 if (pSetFileCompletionNotificationModes)
5121 ok(br,
"SetFileCompletionNotificationModes failed, error %lu.\n",
GetLastError());
5124 ok(br ==
FALSE,
"ReadFileScatter should be asynchronous.\n");
5128 ok(br,
"GetQueuedCompletionStatus failed, err %lu.\n",
GetLastError());
5129 ok(povl == &ovl,
"Wrong ovl %p.\n", povl);
5133 ok(
FALSE,
"FIXME: Calls to GetOverlappedResult hang on ReactOS!\n");
5137 ok(br,
"GetOverlappedResult failed, err %lu.\n",
GetLastError());
5146 win_skip(
"SetFileCompletionNotificationModes not available.\n");
5157 memset( &ovl, 0,
sizeof(ovl) );
5158 memset( fse, 0,
sizeof(fse) );
5163 ok( br ==
FALSE,
"ReadFileScatter should fail\n" );
5186 return (obj_access & desired_access) == desired_access;
5208 unsigned char buf[16];
5254 if (td[
i].write_error)
5256 ok(!
ret,
"%ld: WriteFile should fail\n",
i);
5273 if (td[
i].read_error)
5275 ok(!
ret,
"%ld: ReadFile should fail\n",
i);
5282 if (td[
i].write_error)
5287 ok(
buf[0] == 0x5e &&
buf[1] == 0xa7,
"%ld: expected 5ea7, got %02x%02x\n",
i,
buf[0],
buf[1]);
5297 static char prefix[] =
"GetFinalPathNameByHandleA";
5298 static char dos_prefix[] =
"\\\\?\\";
5301 char dos_path[
MAX_PATH +
sizeof(dos_prefix)];
5306 if (!pGetFinalPathNameByHandleA)
5308 win_skip(
"GetFinalPathNameByHandleA is missing\n");
5324 strcpy(dos_path, dos_prefix);
5325 strcat(dos_path, long_path);
5351 memset(result_path, 0x11,
sizeof(result_path));
5354 ok(
lstrcmpiA(dos_path, result_path) == 0,
"Expected %s, got %s\n", dos_path, result_path);
5357 memset(result_path, 0x11,
sizeof(result_path));
5360 ok(result_path[0] == 0x11,
"Result path was modified\n");
5362 memset(result_path, 0x11,
sizeof(result_path));
5365 ok(result_path[0] == 0x11,
"Result path was modified\n");
5367 memset(result_path, 0x11,
sizeof(result_path));
5370 ok(result_path[0] == 0x11,
"Result path was modified\n");
5372 memset(result_path, 0x11,
sizeof(result_path));
5375 ok(result_path[0] != 0x11,
"Result path was not modified\n");
5376 ok(!result_path[
strlen(dos_path)],
"Expected nullterminated string\n");
5377 ok(result_path[
strlen(dos_path)+1] == 0x11,
"Buffer overflow\n");
5384 static WCHAR prefix[] = {
'G',
'e',
't',
'F',
'i',
'n',
'a',
'l',
'P',
'a',
't',
'h',
5385 'N',
'a',
'm',
'e',
'B',
'y',
'H',
'a',
'n',
'd',
'l',
'e',
'W',
'\0'};
5386 static WCHAR dos_prefix[] = {
'\\',
'\\',
'?',
'\\',
'\0'};
5401 win_skip(
"GetFinalPathNameByHandleW is missing\n");
5446 memset(result_path, 0x11,
sizeof(result_path));
5452 memset(result_path, 0x11,
sizeof(result_path));
5455 ok(result_path[0] == 0x1111,
"Result path was modified\n");
5457 memset(result_path, 0x11,
sizeof(result_path));
5460 ok(result_path[0] == 0x1111,
"Result path was modified\n");
5462 memset(result_path, 0x11,
sizeof(result_path));
5465 ok(result_path[0] != 0x1111,
"Result path was not modified\n");
5466 ok(!result_path[
lstrlenW(dos_path)],
"Expected nullterminated string\n");
5467 ok(result_path[
lstrlenW(dos_path)+1] == 0x1111,
"Buffer overflow\n");
5476 memset(result_path, 0x11,
sizeof(result_path));
5479 ok(
lstrcmpiW(volume_path, result_path) == 0,
"Expected %s, got %s\n",
5483 file_part = long_path +
lstrlenW(drive_part) - 1;
5484 memset(result_path, 0x11,
sizeof(result_path));
5487 ok(
lstrcmpiW(file_part, result_path) == 0,
"Expected %s, got %s\n",
5490 drive_part[
lstrlenW(drive_part)-1] = 0;
5496 memset(result_path, 0x11,
sizeof(result_path));
5499 ok(
lstrcmpiW(nt_path, result_path) == 0,
"Expected %s, got %s\n",
5507 FILE_ATTRIBUTE_TAG_INFO fileattrinfo = { 0 };
5508 FILE_REMOTE_PROTOCOL_INFO protinfo = { 0 };
5509 FILE_STANDARD_INFO stdinfo = { {{0}},{{0}},0,
FALSE,
FALSE };
5510 FILE_COMPRESSION_INFO compressinfo;
5511 FILE_DISPOSITION_INFO dispinfo;
5513 FILE_BASIC_INFO basicinfo = { {{0}} };
5520#if defined(__REACTOS__) && DLL_EXPORT_VERSION >= 0x600
5522 if (is_reactos() || !pSetFileInformationByHandle)
5524 if (!pSetFileInformationByHandle)
5527 win_skip(
"SetFileInformationByHandle is not supported\n");
5547 memset(&compressinfo, 0,
sizeof(compressinfo));
5557 hintinfo.PriorityHint = MaximumIoPriorityHintType;
5561 hintinfo.PriorityHint = IoPriorityHintNormal;
5565 hintinfo.PriorityHint = IoPriorityHintVeryLow;
5574 hintinfo.PriorityHint = IoPriorityHintVeryLow - 1;
5578 memset(&protinfo, 0,
sizeof(protinfo));
5579 protinfo.StructureVersion = 1;
5580 protinfo.StructureSize =
sizeof(protinfo);
5596 memset(&basicinfo, 0,
sizeof(basicinfo));
5599 atime = basicinfo.LastAccessTime;
5601 basicinfo.LastAccessTime.
QuadPart++;
5605 memset(&basicinfo, 0,
sizeof(basicinfo));
5608 ok(atime.
QuadPart + 1 == basicinfo.LastAccessTime.QuadPart,
"Unexpected access time.\n");
5610 memset(&basicinfo, 0,
sizeof(basicinfo));
5611 basicinfo.LastAccessTime.QuadPart = -1;
5615 memset(&basicinfo, 0,
sizeof(basicinfo));
5618 ok(atime.
QuadPart + 1 == basicinfo.LastAccessTime.QuadPart,
"Unexpected access time.\n");
5620 dispinfo.DeleteFile =
TRUE;
5636#if defined(__REACTOS__) && DLL_EXPORT_VERSION >= 0x600
5638 if (is_reactos() || !pSetFileInformationByHandle)
5640 if (!pSetFileInformationByHandle)
5643 win_skip(
"SetFileInformationByHandle is not supported\n");
5704 DWORD expected_error;
5724 ok(!
ret,
"GetFileAttributesExW succeeded\n");
5725 ok(
error ==
tests[test_idx].expected_error,
"Expected error %lu, got %lu\n",
5746 ok(!
ret,
"GetQueuedCompletionStatus succeeded\n");
5755 ok(
key == 456,
"wrong key %Iu\n",
key);
5756 ok(povl == &ovl,
"wrong ovl %p\n", povl);
5759 ok(!
ret,
"GetQueuedCompletionStatus succeeded\n");
5762#if defined(__REACTOS__) && DLL_EXPORT_VERSION >= 0x600
5764 if (is_reactos() || !pGetQueuedCompletionStatusEx)
5766 if (!pGetQueuedCompletionStatusEx)
5769 win_skip(
"GetQueuedCompletionStatusEx not available\n");
5776 ok(!
ret,
"GetQueuedCompletionStatusEx succeeded\n");
5784 memset( entries, 0xcc,
sizeof(entries) );
5786 ok(
ret,
"GetQueuedCompletionStatusEx failed\n");
5788 ok(entries[0].lpCompletionKey == 456,
"wrong key %Iu\n", entries[0].lpCompletionKey);
5791 ok(entries[0].dwNumberOfBytesTransferred == 123,
"wrong size %lu\n", entries[0].dwNumberOfBytesTransferred);
5800 memset( entries, 0xcc,
sizeof(entries) );
5802 ok(
ret,
"GetQueuedCompletionStatusEx failed\n");
5804 ok(entries[0].lpCompletionKey == 456,
"wrong key %Iu\n", entries[0].lpCompletionKey);
5807 ok(entries[0].dwNumberOfBytesTransferred == 123,
"wrong size %lu\n", entries[0].dwNumberOfBytesTransferred);
5808 ok(entries[1].lpCompletionKey == 321,
"wrong key %Iu\n", entries[1].lpCompletionKey);
5811 ok(entries[1].dwNumberOfBytesTransferred == 654,
"wrong size %lu\n", entries[1].dwNumberOfBytesTransferred);
5817 ok(!
ret,
"GetQueuedCompletionStatusEx succeeded\n");
5823 ok(!
ret ||
broken(
ret) ,
"GetQueuedCompletionStatusEx succeeded\n");
5836 ok(
ret,
"GetQueuedCompletionStatusEx failed\n");
5845#define TEST_OVERLAPPED_READ_SIZE 4096
5850 static const char prefix[] =
"pfx";
5870 "Unexpected WriteFile result, ret %#lx, bytes_count %lu, GetLastError() %lu.\n",
5878 memset(&ov, 0,
sizeof(ov));
5880 bytes_count = 0xffffffff;
5883 "Unexpected ReadFile result, ret %#lx, GetLastError() %lu.\n",
ret,
GetLastError());
5884 ok(!bytes_count,
"Unexpected read size %lu.\n", bytes_count);
5895 "Unexpected ReadFile result, ret %#lx, GetLastError() %lu.\n",
ret,
GetLastError());
5902 ok(!bytes_count,
"Unexpected read size %lu.\n", bytes_count);
5927 ok(
ret,
"expect success\n");
5932 ok(
ret,
"expect success\n");
5959 ok(
ret,
"expect success\n");
5961 ok(
ret,
"expect success\n");
5966 ok(!
ret,
"expect failure\n");
5983 WCHAR path[] = {
'C',
':',
'\\',
'w',
'i',
'n',
'd',
'o',
'w',
's',0};
5987 WIN32_FIND_STREAM_DATA
data;
5989 if (!pFindFirstStreamW)
5991 win_skip(
"FindFirstStreamW is missing\n");
5999 handle = pFindFirstStreamW(
path, FindStreamInfoStandard, &
data, 0);
6032 memset(&ft2, 0,
sizeof(ft2));
6035 ok(
memcmp(&ft1, &ft2,
sizeof(ft1)),
"Unexpected write time.\n");
6037 memset(&ft1, 0xff,
sizeof(ft1));
6040 memset(&ft1, 0,
sizeof(ft1));
6043 ok(!
memcmp(&ft1, &ft2,
sizeof(ft1)),
"Unexpected write time.\n");
6081 L"\\winetest_file3",
wcslen(
L"\\winetest_file3")),
"got name %s\n",
6095 ok(!
ret,
"expected failure\n");
6100 ok(!
ret,
"expected failure\n");
6105 ok(!
ret,
"expected failure\n");
6110 ok(!
ret,
"expected failure\n");
6116 ok(!
ret,
"expected failure\n");
6156 ok(!
ret,
"expected failure\n");
6161 ok(!
ret,
"expected failure\n");
6169 ok(!
ret,
"expected failure\n");
6175 ok(!
ret,
"expected failure\n");
6197 ok(!
ret,
"expected failure\n");
6203 ok(!
ret,
"expected failure\n");
6208 ok(!
ret,
"expected failure\n");
6273 ok(!
ret,
"expected failure\n");
6369 ok(!
ret,
"expected failure\n");
6384 ok(!
ret,
"expected failure\n");
6404 ok(!
ret,
"expected failure\n");
ios_base &_STLP_CALL hex(ios_base &__s)
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)
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 CopyFileA(IN LPCSTR lpExistingFileName, IN LPCSTR lpNewFileName, IN BOOL bFailIfExists)
#define STATUS_INVALID_HANDLE
#define ERROR_NOT_ENOUGH_MEMORY
#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 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)
static __inline const char * debugstr_an(const char *s, int n)
#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)
HFILE WINAPI OpenFile(LPCSTR lpFileName, LPOFSTRUCT lpReOpenBuff, UINT uStyle)
HANDLE WINAPI CreateMailslotW(IN LPCWSTR lpName, IN DWORD nMaxMessageSize, IN DWORD lReadTimeout, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI MoveFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName)
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)
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
DWORD WINAPI QueueUserAPC(IN PAPCFUNC pfnAPC, IN HANDLE hThread, IN ULONG_PTR dwData)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
DWORD WINAPI DECLSPEC_HOTPATCH GetTempPathA(DWORD count, LPSTR path)
BOOL WINAPI DECLSPEC_HOTPATCH UnlockFileEx(HANDLE file, DWORD reserved, DWORD count_low, DWORD count_high, LPOVERLAPPED overlapped)
BOOL WINAPI DECLSPEC_HOTPATCH WriteFileGather(HANDLE file, FILE_SEGMENT_ELEMENT *segments, DWORD count, LPDWORD reserved, LPOVERLAPPED overlapped)
UINT WINAPI DECLSPEC_HOTPATCH GetTempFileNameW(LPCWSTR path, LPCWSTR prefix, UINT unique, LPWSTR buffer)
DWORD WINAPI DECLSPEC_HOTPATCH GetLongPathNameW(LPCWSTR shortpath, LPWSTR longpath, DWORD longlen)
DWORD WINAPI DECLSPEC_HOTPATCH GetTempPathW(DWORD count, LPWSTR path)
BOOL WINAPI DECLSPEC_HOTPATCH WriteFile(HANDLE file, LPCVOID buffer, DWORD count, LPDWORD result, LPOVERLAPPED overlapped)
BOOL WINAPI DECLSPEC_HOTPATCH UnlockFile(HANDLE file, DWORD offset_low, DWORD offset_high, DWORD count_low, DWORD count_high)
UINT WINAPI DECLSPEC_HOTPATCH GetCurrentDirectoryA(UINT buflen, LPSTR buf)
DWORD WINAPI DECLSPEC_HOTPATCH GetFileType(HANDLE file)
BOOL WINAPI DECLSPEC_HOTPATCH SetFileAttributesA(LPCSTR name, DWORD attributes)
BOOL WINAPI DECLSPEC_HOTPATCH GetOverlappedResult(HANDLE file, LPOVERLAPPED overlapped, LPDWORD result, BOOL wait)
UINT WINAPI DECLSPEC_HOTPATCH GetWindowsDirectoryA(LPSTR path, UINT count)
BOOL WINAPI DECLSPEC_HOTPATCH GetFileInformationByHandle(HANDLE file, BY_HANDLE_FILE_INFORMATION *info)
BOOL WINAPI DECLSPEC_HOTPATCH DeleteFileW(LPCWSTR path)
BOOL WINAPI DECLSPEC_HOTPATCH DeleteFileA(LPCSTR path)
DWORD WINAPI DECLSPEC_HOTPATCH GetFileSize(HANDLE file, LPDWORD size_high)
UINT WINAPI DECLSPEC_HOTPATCH GetTempFileNameA(LPCSTR path, LPCSTR prefix, UINT unique, LPSTR buffer)
BOOL WINAPI DECLSPEC_HOTPATCH RemoveDirectoryA(LPCSTR path)
BOOL WINAPI DECLSPEC_HOTPATCH ReadFileEx(HANDLE file, LPVOID buffer, DWORD count, LPOVERLAPPED overlapped, LPOVERLAPPED_COMPLETION_ROUTINE completion)
BOOL WINAPI DECLSPEC_HOTPATCH CopyFileW(const WCHAR *source, const WCHAR *dest, BOOL fail_if_exists)
DWORD WINAPI DECLSPEC_HOTPATCH GetFileAttributesA(LPCSTR name)
UINT WINAPI DECLSPEC_HOTPATCH GetWindowsDirectoryW(LPWSTR path, UINT count)
HANDLE WINAPI DECLSPEC_HOTPATCH FindFirstFileA(const char *filename, WIN32_FIND_DATAA *data)
BOOL WINAPI DECLSPEC_HOTPATCH SetCurrentDirectoryA(LPCSTR dir)
BOOL WINAPI DECLSPEC_HOTPATCH SetFileAttributesW(LPCWSTR name, DWORD attributes)
BOOL WINAPI DECLSPEC_HOTPATCH CreateHardLinkA(const char *dest, const char *source, SECURITY_ATTRIBUTES *attr)
DWORD WINAPI DECLSPEC_HOTPATCH GetLongPathNameA(LPCSTR shortpath, LPSTR longpath, DWORD longlen)
BOOL WINAPI DECLSPEC_HOTPATCH CreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sa)
BOOL WINAPI CopyFileExW(const WCHAR *source, const WCHAR *dest, LPPROGRESS_ROUTINE progress, void *param, BOOL *cancel_ptr, DWORD flags)
BOOL WINAPI DECLSPEC_HOTPATCH SetCurrentDirectoryW(LPCWSTR dir)
BOOL WINAPI DECLSPEC_HOTPATCH CreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sa)
BOOL WINAPI DECLSPEC_HOTPATCH FindNextFileA(HANDLE handle, WIN32_FIND_DATAA *data)
BOOL WINAPI DECLSPEC_HOTPATCH GetFileAttributesExW(LPCWSTR name, GET_FILEEX_INFO_LEVELS level, void *ptr)
BOOL WINAPI DECLSPEC_HOTPATCH GetFileTime(HANDLE file, FILETIME *creation, FILETIME *access, FILETIME *write)
BOOL WINAPI DECLSPEC_HOTPATCH RemoveDirectoryW(LPCWSTR path)
BOOL WINAPI DECLSPEC_HOTPATCH LockFile(HANDLE file, DWORD offset_low, DWORD offset_high, DWORD count_low, DWORD count_high)
BOOL WINAPI DECLSPEC_HOTPATCH FindClose(HANDLE handle)
BOOL WINAPI DECLSPEC_HOTPATCH LockFileEx(HANDLE file, DWORD flags, DWORD reserved, DWORD count_low, DWORD count_high, LPOVERLAPPED overlapped)
BOOL WINAPI DECLSPEC_HOTPATCH ReadFileScatter(HANDLE file, FILE_SEGMENT_ELEMENT *segments, DWORD count, LPDWORD reserved, LPOVERLAPPED overlapped)
INT WINAPI DECLSPEC_HOTPATCH CompareFileTime(const FILETIME *x, const FILETIME *y)
BOOL WINAPI DECLSPEC_HOTPATCH SetEndOfFile(HANDLE file)
BOOL WINAPI DECLSPEC_HOTPATCH SetFileTime(HANDLE file, const FILETIME *ctime, const FILETIME *atime, const FILETIME *mtime)
ULONG WINAPI DECLSPEC_HOTPATCH GetTickCount(void)
int CDECL fclose(FILE *file)
int CDECL fputs(const char *s, FILE *file)
FILE *CDECL fopen(const char *path, const char *mode)
#define DECLSPEC_ALIGN(x)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP int __cdecl wcsncmp(const wchar_t *, const wchar_t *, size_t)
_ACRTIMP int __cdecl rand(void)
_ACRTIMP void __cdecl srand(unsigned int)
_ACRTIMP char *__cdecl strchr(const char *, int)
_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)
_ACRTIMP char *__cdecl strrchr(const char *, int)
struct _IO_STATUS_BLOCK * PIO_STATUS_BLOCK
ANSI_STRING * PANSI_STRING
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
#define MOVEFILE_REPLACE_EXISTING
#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
GLenum GLenum GLenum GLenum mapping
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[]
REFIID LPVOID DWORD_PTR dw
BOOL WINAPI PostQueuedCompletionStatus(IN HANDLE CompletionHandle, IN DWORD dwNumberOfBytesTransferred, IN ULONG_PTR dwCompletionKey, IN LPOVERLAPPED lpOverlapped)
HANDLE WINAPI CreateIoCompletionPort(IN HANDLE FileHandle, IN HANDLE ExistingCompletionPort, IN ULONG_PTR CompletionKey, IN DWORD NumberOfConcurrentThreads)
#define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS
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 todo_wine_if(is_todo)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
enum _FINDEX_SEARCH_OPS FINDEX_SEARCH_OPS
#define LOCKFILE_FAIL_IMMEDIATELY
#define LOCKFILE_EXCLUSIVE_LOCK
@ FindExSearchLimitToDirectories
#define FIND_FIRST_EX_LARGE_FETCH
#define FIND_FIRST_EX_CASE_SENSITIVE
@ FileIdBothDirectoryInfo
enum _FINDEX_INFO_LEVELS FINDEX_INFO_LEVELS
enum _FILE_INFO_BY_HANDLE_CLASS FILE_INFO_BY_HANDLE_CLASS
#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 FILE_FLAG_SEQUENTIAL_SCAN
#define ERROR_FILE_NOT_FOUND
#define FILE_FLAG_WRITE_THROUGH
static struct test_info tests[]
FN_GetFinalPathNameByHandleW * pGetFinalPathNameByHandleW
#define FILE_NAME_NORMALIZED
static const WCHAR filenameW[]
static const struct update_accum a1
static const struct update_accum a2
#define create_file(name, size)
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 void test_SetFileTime(void)
static void test_eof(void)
static char filename[MAX_PATH]
static const char sillytext[]
static void test_CreateFileA(void)
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)
#define TEST_OVERLAPPED_READ_SIZE
static void test_CopyFile2(void)
static void test_ReOpenFile(void)
static LPSECURITY_ATTRIBUTES
static int completion_count
static void test_move_file(void)
static void test__hwrite(void)
static BOOL is_access_compatible(unsigned obj_access, unsigned desired_access)
static void test_file_readonly_access(void)
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_find_file_stream(void)
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 STREAM_INFO_LEVELS infolevel
static void test_file_access(void)
static void test_DeleteFileW(void)
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_overlapped_read(void)
static void test_SetFileRenameInfo(void)
static void test_GetFinalPathNameByHandleW(void)
static void test_MoveFileW(void)
static OVERLAPPED_ENTRY ULONG BOOL
static void get_nt_pathW(const char *name, UNICODE_STRING *nameW)
static void test_GetFileAttributesExW(void)
static void test_hard_link(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 FILE_INFO_BY_HANDLE_CLASS
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_post_completion(void)
static void test__lwrite(void)
static void InitFunctionPointers(void)
static void test_MapFile(void)
static const WCHAR pathW[]
static HINSTANCE hkernel32
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK io
static const DWORD access_modes[4]
static const char * contents
BOOL WINAPI MoveFileA(IN LPCSTR lpExistingFileName, IN LPCSTR lpNewFileName)
BOOL WINAPI ReplaceFileA(IN LPCSTR lpReplacedFileName, IN LPCSTR lpReplacementFileName, IN LPCSTR lpBackupFileName OPTIONAL, IN DWORD dwReplaceFlags, IN LPVOID lpExclude, IN LPVOID lpReserved)
BOOL WINAPI MoveFileExA(IN LPCSTR lpExistingFileName, IN LPCSTR lpNewFileName OPTIONAL, IN DWORD dwFlags)
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED lpOverlapped
HANDLE WINAPI CreateNamedPipeA(LPCSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode, DWORD nMaxInstances, DWORD nOutBufferSize, DWORD nInBufferSize, DWORD nDefaultTimeOut, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI CreatePipe(PHANDLE hReadPipe, PHANDLE hWritePipe, LPSECURITY_ATTRIBUTES lpPipeAttributes, DWORD nSize)
HANDLE WINAPI CreateNamedPipeW(LPCWSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode, DWORD nMaxInstances, DWORD nOutBufferSize, DWORD nInBufferSize, DWORD nDefaultTimeOut, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
#define FILE_ATTRIBUTE_READONLY
#define FILE_GENERIC_EXECUTE
#define FILE_READ_ATTRIBUTES
#define FILE_ATTRIBUTE_HIDDEN
#define FILE_ATTRIBUTE_SYSTEM
#define FILE_DELETE_CHILD
NTSYSAPI NTSTATUS NTAPI NtQueryInformationFile(IN HANDLE hFile, OUT PIO_STATUS_BLOCK pIoStatusBlock, OUT PVOID FileInformationBuffer, IN ULONG FileInformationBufferLength, IN FILE_INFORMATION_CLASS FileInfoClass)
#define FILE_ATTRIBUTE_OFFLINE
#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 FILE_ATTRIBUTE_TEMPORARY
#define FILE_ATTRIBUTE_ENCRYPTED
#define IMAGE_SCN_MEM_WRITE
#define IMAGE_DLLCHARACTERISTICS_NX_COMPAT
#define IMAGE_SUBSYSTEM_WINDOWS_GUI
#define IMAGE_FILE_MACHINE_AMD64
#define IMAGE_SCN_MEM_READ
#define IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE
#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
#define OBJ_CASE_INSENSITIVE
static unsigned int file_size
int winetest_get_mainargs(char ***pargv)
int const char int stream_size
static const char *static const char const char DWORD void DWORD *static const char const char DWORD void DWORD *static const char DWORD DWORD void * buff
#define STATUS_CANNOT_DELETE
#define STATUS_END_OF_FILE
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)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateMutexW(IN LPSECURITY_ATTRIBUTES lpMutexAttributes OPTIONAL, IN BOOL bInitialOwner, IN LPCWSTR lpName OPTIONAL)
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
#define STD_OUTPUT_HANDLE
#define COPY_FILE_RESTARTABLE
DWORD WINAPI GetLastError(void)
HANDLE WINAPI GetCurrentThread(void)
#define PIPE_ACCESS_DUPLEX
#define FILE_TYPE_UNKNOWN
#define WAIT_IO_COMPLETION
UINT WINAPI _lwrite(_In_ HFILE hFile, _In_reads_bytes_(uBytes) LPCCH lpBuffer, _In_ UINT uBytes)
#define COPY_FILE_ALLOW_DECRYPTED_DESTINATION
#define CALLBACK_STREAM_SWITCH
struct _FILE_RENAME_INFORMATION FILE_RENAME_INFORMATION
#define ERROR_BAD_NETPATH
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
#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 ERROR_REQUEST_ABORTED
#define ERROR_USER_MAPPED_FILE
#define ERROR_INVALID_DATA
#define ERROR_PRIVILEGE_NOT_HELD
#define SE_MANAGE_VOLUME_NAME
#define TOKEN_ADJUST_PRIVILEGES
#define SE_PRIVILEGE_ENABLED