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");
1262 }
while (++
x % 16 &&
x <
len);
1264 trace(
"%04x: %-48s- %s\n",
x,
hex, txt);
1273 static const char prefix[] =
"pfx";
1276 unsigned char buffer[512];
1278 static const char nt_drive[] =
"\\\\?\\A:";
1311 "CREATE_NEW should fail if file exists and last error value should be ERROR_FILE_EXISTS\n");
1348 "LastError should have been ERROR_INVALID_NAME or ERROR_FILE_NOT_FOUND but got %lu\n",
GetLastError());
1352 ok(
ret <
sizeof(windowsdir),
"windowsdir is abnormally long!\n");
1400 skip(
"Do not have authority to access volumes. Test for %s skipped\n",
filename);
1409 "CreateFileA failed on %s, hFile %p, err=%lu, should be %lu\n",
1429 "CreateFileA did not work, last error %lu on volume <%s>\n",
1438 "CreateFileA probably did not open temp directory %s correctly\n file information does not include FILE_ATTRIBUTE_DIRECTORY, actual=0x%08lx\n",
1445 skip(
"Probable Win9x, got ERROR_PATH_NOT_FOUND w/ FILE_FLAG_BACKUP_SEMANTICS or %s\n",
temp_path);
1471 todo_wine ok(
ret,
"Failed to read volume, last error %lu, %lu, for %s\n",
1475 trace(
"buffer is\n");
1492 "CreateFileA should have returned ERROR_PATH_NOT_FOUND on %s, but got %lu\n",
1507 "CreateFileA should have worked on %s, but got %lu\n",
1528 skip(
"Probable Win9x, got ERROR_BAD_NETPATH (53)\n");
1530 skip(
"Do not have authority to access volumes. Tests skipped\n");
1535 if (pGetVolumeNameForVolumeMountPointA)
1543 ok(
strlen(Volume_1) == 49,
"GetVolumeNameForVolumeMountPointA returned wrong length name <%s>\n", Volume_1);
1556 "CreateFileA should not have opened %s, hFile %p\n",
1560 "CreateFileA should have returned ERROR_PATH_NOT_FOUND on %s, but got %lu\n",
1577 "CreateFileA should have opened %s, but got %lu\n",
1605 todo_wine ok(
ret,
"Failed to read volume, last error %lu, %lu, for %s\n",
1609 trace(
"buffer is\n");
1616 skip(
"Do not have authority to access volumes. Tests skipped\n");
1619 win_skip(
"GetVolumeNameForVolumeMountPointA not functioning\n");
1622 win_skip(
"GetVolumeNameForVolumeMountPointA not found\n");
1632 static const WCHAR bogus[] = {
'\\',
'\\',
'.',
'\\',
'B',
'O',
'G',
'U',
'S', 0 };
1638 win_skip(
"GetTempPathW is not available\n");
1651 "CREATE_NEW should fail if file exists and last error value should be ERROR_FILE_EXISTS\n");
1701 "CreateFileW on invalid VxD name returned ret=%p error=%ld\n",
hFile,
GetLastError());
1704 ok(
ret ==
TRUE,
"couldn't create temporary directory\n");
1708 "expected CreateFile to succeed on existing directory, error: %ld\n",
GetLastError());
1722 static const WCHAR bogus[] = {
'\\',
'\\',
'.',
'\\',
'B',
'O',
'G',
'U',
'S', 0 };
1727 win_skip(
"CreateFile2 is missing\n");
1739 exparams.
dwSize =
sizeof(exparams);
1747 "CREATE_NEW should fail if file exists and last error value should be ERROR_FILE_EXISTS\n");
1781 "CreateFile2 on invalid VxD name returned ret=%p error=%ld\n",
hFile,
GetLastError());
1784 ok(
ret ==
TRUE,
"couldn't create temporary directory\n");
1790 "CreateFile2 failed with FILE_FLAG_BACKUP_SEMANTICS on existing directory, error: %ld\n",
GetLastError());
1795 for (
i = 0;
i < 2; ++
i)
1797 memset(&exparams, 0,
sizeof(exparams));
1798 exparams.
dwSize =
sizeof(exparams);
1822 if (
i == 1)
ok(
ret,
"%ld: unexpected DeleteFileW failure, error %lu\n",
i,
GetLastError());
1833 char windowsdrive[3];
1836 ok(
result <
sizeof(windowsdir),
"windowsdir is abnormally long!\n");
1840 if (
strlen(windowsdir) != 3)
1842 strcat(windowsdir,
"\\");
1845 windowsdrive[0] = windowsdir[0];
1846 windowsdrive[1] = windowsdir[1];
1847 windowsdrive[2] =
'\0';
1851 ok(((
out[0] == windowsdrive[0]) && (
out[1] ==
':')) && (
out[2] ==
'\\'),
1852 "GetTempFileNameA: first three characters should be %c:\\, string was actually %s\n",
1853 windowsdrive[0],
out);
1886 "DeleteFileA(\"nul\") returned ret=%d error=%ld\n",
ret,
GetLastError());
1906 ok(!
ret,
"DeleteFile should fail\n");
1913 "Expected ERROR_ACCESS_DENIED, got error %ld\n",
GetLastError());
1929 ok(!
ret,
"expected failure\n");
1945 static const WCHAR dirW[] = {
'd',
'e',
'l',
'e',
't',
'e',
'f',
'i',
'l',
'e',0};
1946 static const WCHAR subdirW[] = {
'\\',
's',
'u',
'b',0};
1952 win_skip(
"DeleteFileW is not available\n");
1966 ok(0,
"MAX_PATH exceeded in constructing paths\n");
1973 ok(
ret ==
TRUE,
"couldn't create directory deletefile\n");
1975 ok(
ret ==
FALSE,
"DeleteFile should fail for empty directories\n");
1977 ok(
ret ==
TRUE,
"expected to remove directory deletefile\n");
1981 ok(
ret ==
TRUE,
"couldn't create directory deletefile\n");
1983 ok(
ret ==
TRUE,
"couldn't create directory deletefile\\sub\n");
1985 ok(
ret ==
FALSE,
"DeleteFile should fail for non-empty directories\n");
1987 ok(
ret ==
TRUE,
"expected to remove directory deletefile\\sub\n");
1989 ok(
ret ==
TRUE,
"expected to remove directory deletefile\n");
1992#define IsDotDir(x) ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0))))
1998 static const char prefix[] =
"pfx";
2036 ok(!
ret,
"MoveFileA: expected failure\n");
2039 "MoveFileA: expected ERROR_SHARING_VIOLATION, got %ld\n",
GetLastError());
2054 ok(!
ret,
"MoveFileA: expected failure\n");
2057 "MoveFileA: expected ERROR_SHARING_VIOLATION, got %ld\n",
GetLastError());
2072 tempdir[
lstrlenA(tempdir) - 2] =
'm';
2086 "MoveFile failed to change casing on same file: got %s\n",
find_data.cFileName);
2091 tempdir[
lstrlenA(tempdir) - 2] =
'B';
2098 ok(!
ret,
"MoveFileA: expected failure\n");
2103 tempdir[
lstrlenA(tempdir) - 2] =
'm';
2110 "MoveFile failed to change casing on existing target file: got %s\n",
find_data.cFileName);
2119 ok(
ret ==
TRUE,
"CreateDirectoryA failed\n");
2122 tempdir[
lstrlenA(tempdir) - 2] =
'M';
2131 "MoveFile failed to change casing on same directory: got %s\n",
find_data.cFileName);
2140 ok(!
ret,
"MoveFileA: shouldn't move to wildcard file\n");
2143 "MoveFileA: with wildcards, unexpected error %ld\n",
GetLastError());
2185 win_skip(
"GetTempPathW is not available\n");
2207#define PATTERN_OFFSET 0x10
2233 ok(done ==
sizeof(
buf),
"expected number of bytes written %lu\n", done);
2235 memset(&ov, 0,
sizeof(ov));
2242 ok(done ==
sizeof(
pattern),
"expected number of bytes written %lu\n", done);
2250 ok(done ==
sizeof(
pattern),
"expected number of bytes written %lu\n", done);
2263 memset(&ov, 0,
sizeof(ov));
2270 ok(done ==
sizeof(
pattern),
"expected number of bytes read %lu\n", done);
2287 int limited_LockFile;
2288 int limited_UnLockFile;
2312 limited_UnLockFile = 0;
2315 limited_UnLockFile = 1;
2339 "LockFileEx 100,100 failed\n" );
2349 "LockFileEx exclusive 150,50 succeeded\n" );
2354 "UnlockFileEx 150,100 again succeeded\n" );
2360 "LockFileEx exclusive 300,100 failed\n" );
2362 "LockFileEx handle2 300,100 succeeded\n" );
2364 ok(
ret,
"LockFileEx 300,100 failed\n" );
2368 "LockFileEx handle2 300,100 failed\n" );
2377 ok( !
LockFile(
handle, 0, 0x20000000, 20, 0 ),
"LockFile 0x20000000,20 succeeded\n" );
2387 limited_LockFile = 0;
2390 limited_LockFile = 1;
2393 limited_UnLockFile ||
ok(
UnlockFile(
handle, ~0, ~0, 1, 0 ),
"Unlockfile ~0,1 failed\n" );
2397 if (!limited_LockFile)
ok( !
LockFile(
handle, 98, 0, 4, 0 ),
"LockFile 98,4 succeeded\n" );
2399 if (!limited_LockFile)
ok( !
LockFile(
handle, 100, 0, 10, 0 ),
"LockFile 100,10 failed\n" );
2418 DWORD lfanew =
sizeof(*dos);
2419 DWORD size = lfanew +
sizeof(*nt) +
sizeof(*sec);
2444#elif defined __x86_64__
2446#elif defined __arm__
2448#elif defined __aarch64__
2451# error You must specify the machine type
2475 memcpy( sec->
Name,
".rodata",
sizeof(
".rodata") );
2528#define M(x) {x, # x}
2537 static const struct mode sharing_modes[] =
2542 static const struct mode mapping_modes[] =
2580 "open failed for modes %s / %s / %s / %s\n",
2583 ok(
ret == 0,
"wrong error code %d\n",
ret );
2588 "open succeeded for modes %s / %s / %s / %s\n",
2592 "wrong error code %d\n",
ret );
2630 "open failed for modes map %s / %s / %s\n",
2633 "wrong error code %d\n",
ret );
2639 "open succeeded for modes map %s / %s / %s\n",
2641 ok(
ret == 0xdeadbeef ||
2643 "wrong error code %d\n",
ret );
2707 return windowsdir[0];
2735 "FindFirstFile shouldn't return '%s' in drive root\n",
data.cFileName );
2738 "FindNextFile shouldn't return '%s' in drive root\n",
data.cFileName );
2746 ok( !
strcmp(
data.cFileName,
"." ),
"FindFirstFile should return '.' first\n" );
2748 ok( !
strcmp(
data.cFileName,
".." ),
"FindNextFile should return '..' as second entry\n" );
2752 "FindNextFile shouldn't return '%s'\n",
data.cFileName );
2765 ok ( found,
"Windows dir should not be empty\n" );
2804 strcat(buffer2,
"\\bar.txt");
2813 strcat(buffer2,
"\\*.*");
2822 strcat(buffer2,
"\\bar.txt");
2838 "wrong attributes %lx\n",
data.dwFileAttributes );
2841 ok( 0 ==
data.nFileSizeHigh,
"wrong size %ld\n",
data.nFileSizeHigh );
2842 ok( 0 ==
data.nFileSizeLow,
"wrong size %ld\n",
data.nFileSizeLow );
2858 "wrong attributes %lx\n",
data.dwFileAttributes );
2861 ok( 0 ==
data.nFileSizeHigh,
"wrong size %ld\n",
data.nFileSizeHigh );
2862 ok( 0 ==
data.nFileSizeLow,
"wrong size %ld\n",
data.nFileSizeLow );
2872 strcat(buffer2,
"nul\\*");
2890 strcat(buffer2,
"foo\\bar\\nul");
2894 "FindFirstFile on %s should fail\n", buffer2 );
2903 strcat(buffer2,
"foo\\nul\\bar");
2915 char buffer[5] =
"C:\\*";
2935 if (!pFindFirstFileExA)
2937 win_skip(
"FindFirstFileExA() is missing\n");
2941 trace(
"Running FindFirstFileExA tests with level=%d, search_ops=%d, flags=%lu\n",
2952 win_skip(
"FindFirstFileExA is not implemented\n");
2957 win_skip(
"FindFirstFileExA flag FIND_FIRST_EX_LARGE_FETCH not supported, skipping test\n");
2962 win_skip(
"FindFirstFileExA level FindExInfoBasic not supported, skipping test\n");
2966#define CHECK_NAME(fn) (strcmp((fn), "file1") == 0 || strcmp((fn), "file2") == 0 || strcmp((fn), "dir1") == 0)
2967#define CHECK_LEVEL(fn) (level != FindExInfoBasic || !(fn)[0])
2970 ok(
strcmp(search_results.cFileName,
".") == 0,
"First entry should be '.', is %s\n", search_results.cFileName);
2971 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
2974 ok(
strcmp(search_results.cFileName,
"..") == 0,
"Second entry should be '..' is %s\n", search_results.cFileName);
2975 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
2978 ok(
CHECK_NAME(search_results.cFileName),
"Invalid third entry - %s\n", search_results.cFileName);
2979 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
2985 skip(
"File system supports directory filtering\n");
2987 ok(
strcmp(search_results.cFileName,
"dir1") == 0,
"Third entry should be 'dir1' is %s\n", search_results.cFileName);
2988 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
2993 ok(
ret,
"Fetching fourth file failed\n");
2994 ok(
CHECK_NAME(search_results.cFileName),
"Invalid fourth entry - %s\n", search_results.cFileName);
2995 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
2998 ok(
CHECK_NAME(search_results.cFileName),
"Invalid fifth entry - %s\n", search_results.cFileName);
2999 ok(
CHECK_LEVEL(search_results.cAlternateFileName),
"FindFirstFile unexpectedly returned an alternate filename\n");
3016 "Unexpected error %lx, expected valid handle or ERROR_PATH_NOT_FOUND\n",
GetLastError());
3017 trace(
"FindFirstFileExA flag FIND_FIRST_EX_CASE_SENSITIVE is %signored\n",
3037 static const char* files[] = {
3038 "..a",
"..a.a",
".a",
".a..a",
".a.a",
".aaa",
3039 "a",
"a..a",
"a.a",
"a.a.a",
"aa",
"aaa",
"aaaa",
" .a"
3041 static const struct {
3044 {
"*.*.*",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3045 {
"*.*.",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3046 {
".*.*",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa'"},
3047 {
"*.*",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3048 {
".*",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa'"},
3050 {
"*.",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3051 {
"*",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3052 {
"*..*",
", '.', '..', '..a', '..a.a', '.a..a', 'a..a'"},
3053 {
"*..",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3054 {
".*.",
", '.', '..', '.a', '.aaa'"},
3055 {
"..*",
", '.', '..', '..a', '..a.a'"},
3056 {
"**",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3057 {
"**.",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3058 {
"*. ",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3059 {
"* .",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3060 {
"* . ",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3062 {
"*.. ",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3063 {
"*. .",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3064 {
"* ..",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3066 {
"..* ",
", '.', '..', '..a', '..a.a'"},
3067 {
"* .*.",
", ' .a'"},
3069 {
"a*.",
", '..a', '.a', '.aaa', 'a', 'aa', 'aaa', 'aaaa'"},
3070 {
"*a ",
", '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3071 {
"*aa*",
", '.aaa', 'a.a.a', 'aa', 'aaa', 'aaaa'"},
3072 {
"aa*.",
", '.aaa', 'aa', 'aaa', 'aaaa'"},
3075 {
"a\"*\"a",
", 'a..a', 'a.a.a'"},
3076 {
"aa*.*",
", '.aaa', 'a.a.a', 'aa', 'aaa', 'aaaa'"},
3082 {
"a* .",
", 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3084 {
"* .a",
", ' .a'"},
3085 {
"< .a",
", ' .a'"},
3086 {
"** .a",
", ' .a'"},
3087 {
"<< .a",
", ' .a'"},
3088 {
"aa? ",
", 'aa', 'aaa'"},
3089 {
"aa\"*",
", 'aa'"},
3090 {
"*.a",
", '..a', '..a.a', '.a', '.a..a', '.a.a', 'a..a', 'a.a', 'a.a.a', ' .a'"},
3091 {
"<.a",
", '..a', '..a.a', '.a', '.a..a', '.a.a', 'a..a', 'a.a', 'a.a.a', ' .a'"},
3093 {
"<.<.<",
", '..a', '..a.a', '.a..a', '.a.a', 'a..a', 'a.a.a'"},
3094 {
"<.<.< ",
", '..a', '..a.a', '.a..a', '.a.a', 'a..a', 'a.a.a'"},
3095 {
"<.<.",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a..a', 'a.a', 'a.a.a', ' .a'"},
3096 {
"< .<.",
", ' .a'"},
3097 {
"< .<. ",
", ' .a'"},
3098 {
"<.<. ",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a..a', 'a.a', 'a.a.a', ' .a'"},
3099 {
".<.<",
", '..a', '..a.a', '.a..a', '.a.a'"},
3100 {
"<.<",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a..a', 'a.a', 'a.a.a', ' .a'"},
3101 {
".<",
", '.', '..', '.a', '.aaa'"},
3102 {
"<.",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3103 {
"<",
", '.', '..', '..a', '.a', '.aaa', 'a', 'aa', 'aaa', 'aaaa'"},
3104 {
"<..<",
", '..a', '.a..a', 'a..a'"},
3105 {
"<..",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3106 {
".<.",
", '.', '..', '.a', '.aaa'"},
3108 {
"<<",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3109 {
"<<.",
", '.', '..', '..a', '..a.a', '.a', '.a..a', '.a.a', '.aaa', 'a', 'a..a', 'a.a', 'a.a.a', 'aa', 'aaa', 'aaaa', ' .a'"},
3110 {
"<. ",
", '.', '..', '..a', '.a', '.aaa', 'a', 'aa', 'aaa', 'aaaa'"},
3111 {
"< .",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3112 {
"< . ",
", '.', '..', '..a', '.a', '.aaa', 'a', 'aa', 'aaa', 'aaaa'"},
3113 {
"<.. ",
", '.', '..', '..a', '.a', '.aaa', 'a', 'aa', 'aaa', 'aaaa'"},
3114 {
"<. .",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3115 {
"< ..",
", '.', '..', 'a', '.a', '..a', 'aa', 'aaa', 'aaaa', '.aaa'"},
3117 {
"..< ",
", '..a'"},
3119 {
"?",
", '.', '..', 'a'"},
3120 {
"?.",
", '.', '..', 'a'"},
3121 {
"?. ",
", '.', '..', 'a'"},
3123 {
"??.",
", '.', '..', 'a', 'aa'"},
3124 {
"??. ",
", '.', '..', 'a', 'aa'"},
3125 {
"???.",
", '.', '..', 'a', 'aa', 'aaa'"},
3126 {
"?.??.",
", '.', '..', '.a', 'a', 'a.a', ' .a'"},
3129 {
">",
", '.', '..', 'a'"},
3130 {
">.",
", '.', '..', 'a'"},
3131 {
">. ",
", '.', '..', 'a'"},
3132 {
">>.",
", '.', '..', 'a', 'aa'"},
3133 {
">>. ",
", '.', '..', 'a', 'aa'"},
3134 {
">>>.",
", '.', '..', 'a', 'aa', 'aaa'"},
3135 {
">.>>.",
", '.', '..', '.a', 'a.a', ' .a'"},
3146 char incorrect[512];
3150 correct[0] = incorrect[0] = 0;
3169 strcat(incorrect, quoted);
3174 ok(missing[0] == 0 && incorrect[0] == 0,
3175 "FindFirstFile with '%s' found correctly %s, found incorrectly %s, and missed %s\n",
3177 correct[0] ? correct+2 :
"none",
3178 incorrect[0] ? incorrect+2 :
"none",
3179 missing[0] ? missing+2 :
"none");
3211 ok( hmap !=
NULL,
"mapping should work, I named it!\n" );
3218 ok( hmap !=
NULL,
"We should still be able to map!\n" );
3228 ok( hmap ==
NULL,
"mapped zero size file\n");
3234 ok( hmap ==
NULL,
"mapping should fail\n");
3263 ok(
type == type2,
"expected type %ld for STD_OUTPUT_HANDLE got %ld\n", type2,
type);
3266 ok(
ret,
"CreatePipe failed\n" );
3283 ok( h2 !=
NULL,
"CreateFileMapping failed\n" );
3295 ok(
h !=
NULL,
"CreateFileMapping failed\n" );
3324 ok(
h !=
NULL,
"CreateMutex failed\n" );
3350 ok(
FALSE,
"FIXME: test_async_file_errors() crashes on ReactOS!\n");
3360 strcat(szFile,
"\\win.ini");
3403 static const char prefix[] =
"pfx";
3435 "bytes = %ld\n",
bytes);
3466 ok(
bytes == 0x4000,
"only wrote %lx bytes\n",
bytes );
3472 ok( !
ret,
"WriteFile succeeded\n" );
3479 ok( !
ret,
"WriteFile succeeded\n" );
3489 ok( !
ret,
"WriteFile succeeded\n" );
3498 ok( !
ret,
"ReadFile succeeded\n" );
3508 ok( !
ret,
"ReadFile succeeded\n" );
3518 ok( !
ret,
"ReadFile succeeded\n" );
3529 ok( !
ret,
"ReadFile succeeded\n" );
3540 ok( !
ret,
"ReadFile succeeded\n" );
3561 static const char file[] =
"regedit.exe";
3562 static const char foo[] =
".\\foo-bar-foo.baz";
3563 static const char *foo_too_long =
".\\foo-bar-foo.baz+++++++++++++++"
3564 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
3565 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
3566 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
3567 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
3568 "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++";
3576 if (!pGetSystemWindowsDirectoryA)
3584 if (
p >
buff &&
p[-1] !=
'\\') *
p++ =
'\\';
3586 memset(&ofs, 0xA5,
sizeof(ofs));
3593 ok( ofs.
cBytes ==
sizeof(ofs),
"OpenFile set ofs.cBytes to %d\n", ofs.
cBytes );
3596 "OpenFile returned '%s', but was expected to return '%s' or string filled with 0xA5\n",
3607 if (
p >
buff &&
p[-1] !=
'\\') *
p++ =
'\\';
3609 memset(&ofs, 0xA5,
sizeof(ofs));
3616 ok( ofs.
cBytes == 0xA5,
"OpenFile set ofs.cBytes to %d\n", ofs.
cBytes );
3619 "OpenFile returned '%s', but was expected to return '%s' or string filled with 0xA5\n",
3629 lstrcatA(buff_long, foo_too_long + 1);
3630 memset(&ofs, 0xA5,
sizeof(ofs));
3638 ok( ofs.
cBytes == 0xA5,
"OpenFile set ofs.cBytes to %d\n", ofs.
cBytes );
3640 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3642 "OpenFile returned '%s', but was expected to return string filled with 0xA5\n",
3646 memset(&ofs, 0xA5,
sizeof(ofs));
3655 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3657 ok( !
ret,
"_lclose() returns %d\n",
ret );
3661 memset(&ofs, 0xA5,
sizeof(ofs));
3671 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3673 "OpenFile returned '%s', but was expected to return '%s'\n", ofs.
szPathName,
filename );
3675 ok( !
ret,
"_lclose() returns %d\n",
ret );
3677 memset(&ofs, 0xA5,
sizeof(ofs));
3686 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3688 "OpenFile returned '%s', but was expected to return '%s'\n", ofs.
szPathName,
filename );
3690 ok( !
ret,
"_lclose() returns %d\n",
ret );
3692 memset(&ofs, 0xA5,
sizeof(ofs));
3701 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3703 "OpenFile returned '%s', but was expected to return '%s'\n", ofs.
szPathName,
filename );
3705 ok( !
ret,
"_lclose() returns %d\n",
ret );
3707 memset(&ofs, 0xA5,
sizeof(ofs));
3711 ok(
hFile == 1,
"OpenFile failed on finding our created file\n" );
3716 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3718 "OpenFile returned '%s', but was expected to return '%s'\n", ofs.
szPathName,
filename );
3720 memset(&ofs, 0xA5,
sizeof(ofs));
3724 ok(
hFile == 1,
"OpenFile failed on delete (%d)\n",
hFile );
3729 "OpenFile set ofs.nErrCode to %d\n", ofs.
nErrCode );
3731 "OpenFile returned '%s', but was expected to return '%s'\n", ofs.
szPathName,
filename );
3750 memset( &ov, 0,
sizeof ov );
3773 ok(
r ==
FALSE,
"should return false\n");
3783 ok(
r ==
FALSE,
"should return false\n");
3793 ok(
r ==
FALSE,
"should return false\n");
3796 ok(
r ==
TRUE,
"should return TRUE\n" );
3808 ok(
r ==
FALSE,
"should return false\n");
3811 ok(
r ==
TRUE,
"close handle failed\n");
3823 ok( rc,
"SetCurrentDirectory failed, gle=%ld\n",
GetLastError() );
3829 ok( rc,
"SetCurrentDirectory failed, gle=%ld\n",
GetLastError() );
3840 return (t1 > t2 ? t1 - t2 : t2 - t1) <= tolerance;
3846 HANDLE hReplacedFile, hReplacementFile, hBackupFile,
mapping;
3847 static const char replacedData[] =
"file-to-replace";
3848 static const char replacementData[] =
"new-file";
3849 static const char backupData[] =
"backup-file";
3850 FILETIME ftReplaced, ftReplacement, ftBackup;
3851 static const char prefix[] =
"pfx";
3873 "failed to open replaced file\n");
3874 retok =
WriteFile(hReplacedFile, replacedData,
sizeof(replacedData), &
ret,
NULL );
3875 ok( retok &&
ret ==
sizeof(replacedData),
3878 "replaced file has wrong size\n");
3882 "failed to open replacement file\n");
3883 retok =
WriteFile(hReplacementFile, replacementData,
sizeof(replacementData), &
ret,
NULL );
3884 ok( retok &&
ret ==
sizeof(replacementData),
3885 "WriteFile error (replacement) %ld\n",
GetLastError());
3887 "replacement file has wrong size\n");
3891 "failed to open backup file\n");
3892 retok =
WriteFile(hBackupFile, backupData,
sizeof(backupData), &
ret,
NULL );
3893 ok( retok &&
ret ==
sizeof(backupData),
3894 "WriteFile error (replacement) %ld\n",
GetLastError());
3896 "backup file has wrong size\n");
3927 "failed to open backup file\n");
3929 ok(
ret ==
sizeof(replacedData),
3930 "backup file has wrong size %ld\n",
ret);
3934 "failed to open replaced file: %ld\n",
GetLastError());
3938 ok(
ret ==
sizeof(replacementData),
3939 "replaced file has wrong size %ld\n",
ret);
3943 "unexpected error, replacement file should not exist %ld\n",
GetLastError());
3947 ok(
check_file_time(&ftBackup, &ftReplaced, 20000000),
"backup file has wrong filetime\n");
3953 "replaced file has wrong filetime %lx%08lx / %lx%08lx\n",
3959 skip(
"couldn't open replacement file, skipping tests\n");
3970 "ReplaceFileA: unexpected error %ld\n",
GetLastError());
3984 "ReplaceFileA: unexpected error %ld\n",
GetLastError());
3986 removeBackup =
TRUE;
3994 "SetFileAttributesA: error setting to read only %ld\n",
GetLastError());
4005 "unexpected error, replacement file should still exist %ld\n",
GetLastError());
4009 "SetFileAttributesA: error setting to normal %ld\n",
GetLastError());
4016 ok(
ret,
"SetFileAttributesA: error setting to readonly %#lx\n",
GetLastError());
4033 "unexpected error, replaced file should be able to be opened %ld\n",
GetLastError());
4043 ok(hReplacementFile !=
INVALID_HANDLE_VALUE,
"unexpected error, replacement file should be able to be opened %ld\n",
4046 ok(!
ret,
"expect failure\n");
4053 "DeleteFileA: error (replaced) %ld\n",
GetLastError());
4061 "ReplaceFileA: unexpected error %ld\n",
GetLastError());
4070 "ReplaceFileA: unexpected error %ld\n",
GetLastError());
4140 win_skip(
"ReplaceFileW() is missing\n");
4147 win_skip(
"GetTempPathW is not available\n");
4162 ret = pReplaceFileW(replaced, replacement,
backup, 0, 0, 0);
4167 ret = pReplaceFileW(replaced, replacement,
NULL, 0, 0, 0);
4175 ret = pReplaceFileW(replaced, replacement,
backup, 0, 0, 0);
4183 "SetFileAttributesW: error setting to read only %ld\n",
GetLastError());
4186 ret = pReplaceFileW(replaced, replacement,
backup, 0, 0, 0);
4187 ok(!
ret,
"expected failure\n");
4191 "SetFileAttributesW: error setting to normal %ld\n",
GetLastError());
4193 removeBackup =
TRUE;
4197 ret = pReplaceFileW(replaced, replacement,
backup, 0, 0, 0);
4200 ret = pReplaceFileW(replaced, replacement,
NULL, 0, 0, 0);
4203 "ReplaceFileW: unexpected error %ld\n",
GetLastError());
4261 for (
i = 0;
i <= 5;
i++)
4266 if (
i == 0 ||
i == 5)
4299 written = 0xdeadbeef;
4306 ok(!
ret,
"%ld: WriteFile should fail\n",
i);
4317 ok(!
ret,
"%ld: SetFileTime should fail\n",
i);
4353 DWORD ret2, written;
4355 FILE_ID_BOTH_DIR_INFO *bothDirInfo;
4356 FILE_BASIC_INFO *basicInfo;
4357 FILE_STANDARD_INFO *standardInfo;
4358 FILE_NAME_INFO *nameInfo;
4360 FILE_IO_PRIORITY_HINT_INFO priohintinfo;
4361 FILE_ALLOCATION_INFO allocinfo;
4362 FILE_DISPOSITION_INFO dispinfo;
4363 FILE_END_OF_FILE_INFO eofinfo;
4364 FILE_RENAME_INFO renameinfo;
4377 if (!pGetFileInformationByHandleEx)
4379 win_skip(
"GetFileInformationByHandleEx is missing.\n");
4384 ok(ret2,
"GetFileInformationByHandleEx: GetTempPathA failed, got error %lu.\n",
GetLastError());
4388 ok(ret2,
"GetFileInformationByHandleEx: GetTempFileNameA failed, got error %lu.\n",
GetLastError());
4391 "GetFileAttributesA failed to find the temp file, got error %lu.\n",
GetLastError());
4402 ok(!
ret &&
GetLastError() == checks[
i].errorCode,
"GetFileInformationByHandleEx: expected error %lu, "
4412 ok(
ret,
"GetFileInformationByHandleEx: failed to query for FileIdBothDirectoryInfo, got error %lu.\n",
GetLastError());
4415 bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)
buffer;
4418 ok(bothDirInfo->FileAttributes != 0xffffffff,
"GetFileInformationByHandleEx: returned invalid file attributes.\n");
4419 ok(bothDirInfo->FileId.u.LowPart != 0xffffffff,
"GetFileInformationByHandleEx: returned invalid file id.\n");
4420 ok(bothDirInfo->FileNameLength != 0xffffffff,
"GetFileInformationByHandleEx: returned invalid file name length.\n");
4421 if (!bothDirInfo->NextEntryOffset)
4423 bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)(((
char *)bothDirInfo) + bothDirInfo->NextEntryOffset);
4437 ok(
ret,
"GetFileInformationByHandleEx: failed to get FileBasicInfo, %lu\n",
GetLastError());
4438 basicInfo = (FILE_BASIC_INFO *)
buffer;
4439 prevWrite = basicInfo->LastWriteTime;
4450 ok(
ret,
"GetFileInformationByHandleEx: Write failed\n");
4460 ok(
ret,
"GetFileInformationByHandleEx: failed to get FileBasicInfo, %lu\n",
GetLastError());
4461 basicInfo = (FILE_BASIC_INFO *)
buffer;
4464 ok(basicInfo->LastWriteTime.QuadPart != prevWrite.
QuadPart,
4465 "GetFileInformationByHandleEx: last write time didn't change\n");
4470 ok(
ret,
"GetFileInformationByHandleEx: failed to get FileStandardInfo, %lu\n",
GetLastError());
4471 standardInfo = (FILE_STANDARD_INFO *)
buffer;
4472 ok(standardInfo->NumberOfLinks == 1,
"GetFileInformationByHandleEx: Unexpected number of links\n");
4473 ok(standardInfo->DeletePending ==
FALSE,
"GetFileInformationByHandleEx: Unexpected pending delete\n");
4474 ok(standardInfo->Directory ==
FALSE,
"GetFileInformationByHandleEx: Incorrect directory flag\n");
4479 ok(
ret,
"GetFileInformationByHandleEx: failed to get FileNameInfo, %lu\n",
GetLastError());
4480 nameInfo = (FILE_NAME_INFO *)
buffer;
4481 strPtr =
strchr(tempFileName,
'\\');
4482 ok(strPtr !=
NULL,
"GetFileInformationByHandleEx: Temp filename didn't contain backslash\n");
4483 ok(nameInfo->FileNameLength ==
strlen(strPtr) * 2,
4484 "GetFileInformationByHandleEx: Incorrect file name length\n");
4485 for (
i = 0;
i < nameInfo->FileNameLength/2;
i++)
4486 ok(strPtr[
i] == nameInfo->FileName[
i],
"Incorrect filename char %d: %c vs %c\n",
4487 i, strPtr[
i], nameInfo->FileName[
i]);
4521 FILE_ID_BOTH_DIR_INFO *bothDirInfo;
4522 FILE_ID_DESCRIPTOR fileIdDescr;
4524 if (!pGetFileInformationByHandleEx || !pOpenFileById)
4526 win_skip(
"GetFileInformationByHandleEx or OpenFileById is missing.\n");
4531 ok(ret2,
"OpenFileById: GetTempPath failed, got error %lu.\n",
GetLastError());
4535 ok(ret2,
"OpenFileById: GetTempFileNameA failed, got error %lu.\n",
GetLastError());
4538 "OpenFileById: GetFileAttributesA failed to find the temp file, got error %lu\n",
GetLastError());
4541 ok(ret2,
"OpenFileById: MultiByteToWideChar failed to convert tempFileName, got error %lu.\n",
GetLastError());
4542 tempFileNameLen = ret2 - 1;
4558 bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)
buffer;
4560 ok(
ret,
"OpenFileById: failed to query for FileIdBothDirectoryInfo, got error %lu.\n",
GetLastError());
4561 ok(bothDirInfo->FileNameLength ==
sizeof(
WCHAR) && bothDirInfo->FileName[0] ==
'.',
4562 "OpenFileById: failed to return the temp folder at the first entry, got error %lu.\n",
GetLastError());
4565 fileIdDescr.dwSize =
sizeof(fileIdDescr);
4566 fileIdDescr.Type = FileIdType;
4567 fileIdDescr.FileId = bothDirInfo->FileId;
4578 ok(
ret,
"OpenFileById: failed to query for FileIdBothDirectoryInfo, got error %lu.\n",
GetLastError());
4581 bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)
buffer;
4584 if (tempFileNameLen == bothDirInfo->FileNameLength /
sizeof(
WCHAR) &&
4585 memcmp(tempFileNameW, bothDirInfo->FileName, bothDirInfo->FileNameLength) == 0)
4590 if (!bothDirInfo->NextEntryOffset)
4592 bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)(((
char *)bothDirInfo) + bothDirInfo->NextEntryOffset);
4595 ok(found,
"OpenFileById: failed to find the temp file in the temp folder.\n");
4600 "OpenFileById: expected ERROR_INVALID_PARAMETER, got error %lu.\n",
GetLastError());
4602 fileIdDescr.dwSize =
sizeof(fileIdDescr);
4603 fileIdDescr.Type = FileIdType;
4604 fileIdDescr.FileId = bothDirInfo->FileId;
4611 ok(
strcmp(tickCount,
buffer) == 0,
"OpenFileById: invalid contents of the temp file.\n");
4627 if (!pSetFileValidData)
4629 win_skip(
"SetFileValidData is missing\n");
4641 ok(!
ret,
"SetFileValidData succeeded\n");
4647 ok(!
ret,
"SetFileValidData succeeded\n");
4655 ok(!
ret,
"SetFileValidData succeeded\n");
4662 ok(!
ret,
"SetFileValidData succeeded\n");
4671 ok(!
ret,
"SetFileValidData succeeded\n");
4683 win_skip(
"cannot enable SE_MANAGE_VOLUME_NAME privilege\n");
4693 ok(!
ret,
"SetFileValidData succeeded\n");
4699 ok(!
ret,
"SetFileValidData succeeded\n");
4714 ok(!
ret,
"SetFileValidData succeeded\n");
4744 ok(!
ret,
"SetFileValidData succeeded\n");
4763 static const DWORD invalid_attributes[] =
4775 static const DWORD valid_attributes[] =
4787 win_skip(
"ReOpenFile() is not available\n");
4853 HANDLE hfile, hiocp1, hiocp2, evt;
4859 char *wbuf =
NULL, *rbuf1, *rbuf2;
4866 ok(
ret <
MAX_PATH,
"temp path should fit into MAX_PATH\n" );
4877 ok( hiocp2 != 0,
"CreateIoCompletionPort failed err %lu\n",
GetLastError() );
4889 memset( &ovl, 0,
sizeof(ovl) );
4891 memset( fse, 0,
sizeof(fse) );
4900 ok( povl == &ovl,
"wrong ovl %p\n", povl );
4904 ok(
FALSE,
"FIXME: Calls to GetOverlappedResult hang on ReactOS!\n");
4910 ok( tx ==
si.
dwPageSize,
"got unexpected bytes transferred: %lu\n", tx );
4918 memset( &ovl, 0,
sizeof(ovl) );
4920 memset( fse, 0,
sizeof(fse) );
4925 ok( br ==
FALSE,
"ReadFileScatter should be asynchronous\n" );
4930 ok( povl == &ovl,
"wrong ovl %p\n", povl );
4934 ok(
FALSE,
"FIXME: Calls to GetOverlappedResult hang on ReactOS!\n");
4940 ok( tx ==
si.
dwPageSize,
"got unexpected bytes transferred: %lu\n", tx );
4946 "data was not read into buffer\n" );
4951 memset( &ovl, 0,
sizeof(ovl) );
4955 memset( fse, 0,
sizeof(fse) );
4959 ok( br ==
FALSE,
"ReadFileScatter should have failed\n" );
4966 ok( !
ret,
"GetQueuedCompletionStatus should have returned failure\n" );
4968 ok( povl == &ovl,
"wrong ovl %p\n", povl );
4972 ok( br ==
FALSE,
"GetOverlappedResult should have failed\n" );
4981 ok( povl ==
NULL,
"wrong ovl %p\n", povl );
4987 memset( &ovl, 0,
sizeof(ovl) );
4989 memset( fse, 0,
sizeof(fse) );
4996 ok( br ==
FALSE,
"ReadFileScatter should be asynchronous\n" );
5001 ok( povl == &ovl,
"wrong ovl %p\n", povl );
5005 ok(
FALSE,
"FIXME: Calls to GetOverlappedResult hang on ReactOS!\n");
5011 ok( tx ==
si.
dwPageSize,
"got unexpected bytes transferred: %lu\n", tx );
5017 "data was not read into buffer\n" );
5020 "data should not have been read into buffer\n" );
5025 memset( &ovl, 0,
sizeof(ovl) );
5027 memset( fse, 0,
sizeof(fse) );
5032 ok( br ==
FALSE,
"ReadFileScatter should be asynchronous\n" );
5037 ok( povl == &ovl,
"wrong ovl %p\n", povl );
5041 ok(
FALSE,
"FIXME: Calls to GetOverlappedResult hang on ReactOS!\n");
5047 ok( tx ==
si.
dwPageSize / 2,
"got unexpected bytes transferred: %lu\n", tx );
5053 "invalid data was read into buffer\n" );
5056 "invalid data was read into buffer\n" );
5058 if (pSetFileCompletionNotificationModes)
5061 ok(br,
"SetFileCompletionNotificationModes failed, error %lu.\n",
GetLastError());
5064 ok(br ==
FALSE,
"ReadFileScatter should be asynchronous.\n");
5068 ok(br,
"GetQueuedCompletionStatus failed, err %lu.\n",
GetLastError());
5069 ok(povl == &ovl,
"Wrong ovl %p.\n", povl);
5073 ok(
FALSE,
"FIXME: Calls to GetOverlappedResult hang on ReactOS!\n");
5077 ok(br,
"GetOverlappedResult failed, err %lu.\n",
GetLastError());
5086 win_skip(
"SetFileCompletionNotificationModes not available.\n");
5097 memset( &ovl, 0,
sizeof(ovl) );
5098 memset( fse, 0,
sizeof(fse) );
5103 ok( br ==
FALSE,
"ReadFileScatter should fail\n" );
5126 return (obj_access & desired_access) == desired_access;
5148 unsigned char buf[16];
5194 if (td[
i].write_error)
5196 ok(!
ret,
"%ld: WriteFile should fail\n",
i);
5213 if (td[
i].read_error)
5215 ok(!
ret,
"%ld: ReadFile should fail\n",
i);
5222 if (td[
i].write_error)
5227 ok(
buf[0] == 0x5e &&
buf[1] == 0xa7,
"%ld: expected 5ea7, got %02x%02x\n",
i,
buf[0],
buf[1]);
5237 static char prefix[] =
"GetFinalPathNameByHandleA";
5238 static char dos_prefix[] =
"\\\\?\\";
5241 char dos_path[
MAX_PATH +
sizeof(dos_prefix)];
5246 if (!pGetFinalPathNameByHandleA)
5248 win_skip(
"GetFinalPathNameByHandleA is missing\n");
5264 strcpy(dos_path, dos_prefix);
5265 strcat(dos_path, long_path);
5291 memset(result_path, 0x11,
sizeof(result_path));
5294 ok(
lstrcmpiA(dos_path, result_path) == 0,
"Expected %s, got %s\n", dos_path, result_path);
5297 memset(result_path, 0x11,
sizeof(result_path));
5300 ok(result_path[0] == 0x11,
"Result path was modified\n");
5302 memset(result_path, 0x11,
sizeof(result_path));
5305 ok(result_path[0] == 0x11,
"Result path was modified\n");
5307 memset(result_path, 0x11,
sizeof(result_path));
5310 ok(result_path[0] == 0x11,
"Result path was modified\n");
5312 memset(result_path, 0x11,
sizeof(result_path));
5315 ok(result_path[0] != 0x11,
"Result path was not modified\n");
5316 ok(!result_path[
strlen(dos_path)],
"Expected nullterminated string\n");
5317 ok(result_path[
strlen(dos_path)+1] == 0x11,
"Buffer overflow\n");
5324 static WCHAR prefix[] = {
'G',
'e',
't',
'F',
'i',
'n',
'a',
'l',
'P',
'a',
't',
'h',
5325 'N',
'a',
'm',
'e',
'B',
'y',
'H',
'a',
'n',
'd',
'l',
'e',
'W',
'\0'};
5326 static WCHAR dos_prefix[] = {
'\\',
'\\',
'?',
'\\',
'\0'};
5341 win_skip(
"GetFinalPathNameByHandleW is missing\n");
5386 memset(result_path, 0x11,
sizeof(result_path));
5392 memset(result_path, 0x11,
sizeof(result_path));
5395 ok(result_path[0] == 0x1111,
"Result path was modified\n");
5397 memset(result_path, 0x11,
sizeof(result_path));
5400 ok(result_path[0] == 0x1111,
"Result path was modified\n");
5402 memset(result_path, 0x11,
sizeof(result_path));
5405 ok(result_path[0] != 0x1111,
"Result path was not modified\n");
5406 ok(!result_path[
lstrlenW(dos_path)],
"Expected nullterminated string\n");
5407 ok(result_path[
lstrlenW(dos_path)+1] == 0x1111,
"Buffer overflow\n");
5416 memset(result_path, 0x11,
sizeof(result_path));
5419 ok(
lstrcmpiW(volume_path, result_path) == 0,
"Expected %s, got %s\n",
5423 file_part = long_path +
lstrlenW(drive_part) - 1;
5424 memset(result_path, 0x11,
sizeof(result_path));
5427 ok(
lstrcmpiW(file_part, result_path) == 0,
"Expected %s, got %s\n",
5430 drive_part[
lstrlenW(drive_part)-1] = 0;
5436 memset(result_path, 0x11,
sizeof(result_path));
5439 ok(
lstrcmpiW(nt_path, result_path) == 0,
"Expected %s, got %s\n",
5447 FILE_ATTRIBUTE_TAG_INFO fileattrinfo = { 0 };
5448 FILE_REMOTE_PROTOCOL_INFO protinfo = { 0 };
5449 FILE_STANDARD_INFO stdinfo = { {{0}},{{0}},0,
FALSE,
FALSE };
5450 FILE_COMPRESSION_INFO compressinfo;
5451 FILE_DISPOSITION_INFO dispinfo;
5453 FILE_BASIC_INFO basicinfo = { {{0}} };
5460#if defined(__REACTOS__) && DLL_EXPORT_VERSION >= 0x600
5462 if (
is_reactos() || !pSetFileInformationByHandle)
5464 if (!pSetFileInformationByHandle)
5467 win_skip(
"SetFileInformationByHandle is not supported\n");
5487 memset(&compressinfo, 0,
sizeof(compressinfo));
5497 hintinfo.PriorityHint = MaximumIoPriorityHintType;
5501 hintinfo.PriorityHint = IoPriorityHintNormal;
5505 hintinfo.PriorityHint = IoPriorityHintVeryLow;
5514 hintinfo.PriorityHint = IoPriorityHintVeryLow - 1;
5518 memset(&protinfo, 0,
sizeof(protinfo));
5519 protinfo.StructureVersion = 1;
5520 protinfo.StructureSize =
sizeof(protinfo);
5536 memset(&basicinfo, 0,
sizeof(basicinfo));
5539 atime = basicinfo.LastAccessTime;
5541 basicinfo.LastAccessTime.
QuadPart++;
5545 memset(&basicinfo, 0,
sizeof(basicinfo));
5548 ok(atime.
QuadPart + 1 == basicinfo.LastAccessTime.QuadPart,
"Unexpected access time.\n");
5550 memset(&basicinfo, 0,
sizeof(basicinfo));
5551 basicinfo.LastAccessTime.QuadPart = -1;
5555 memset(&basicinfo, 0,
sizeof(basicinfo));
5558 ok(atime.
QuadPart + 1 == basicinfo.LastAccessTime.QuadPart,
"Unexpected access time.\n");
5560 dispinfo.DeleteFile =
TRUE;
5576#if defined(__REACTOS__) && DLL_EXPORT_VERSION >= 0x600
5578 if (
is_reactos() || !pSetFileInformationByHandle)
5580 if (!pSetFileInformationByHandle)
5583 win_skip(
"SetFileInformationByHandle is not supported\n");
5644 DWORD expected_error;
5664 ok(!
ret,
"GetFileAttributesExW succeeded\n");
5665 ok(
error ==
tests[test_idx].expected_error,
"Expected error %lu, got %lu\n",
5686 ok(!
ret,
"GetQueuedCompletionStatus succeeded\n");
5695 ok(
key == 456,
"wrong key %Iu\n",
key);
5696 ok(povl == &ovl,
"wrong ovl %p\n", povl);
5699 ok(!
ret,
"GetQueuedCompletionStatus succeeded\n");
5702#if defined(__REACTOS__) && DLL_EXPORT_VERSION >= 0x600
5704 if (
is_reactos() || !pGetQueuedCompletionStatusEx)
5706 if (!pGetQueuedCompletionStatusEx)
5709 win_skip(
"GetQueuedCompletionStatusEx not available\n");
5716 ok(!
ret,
"GetQueuedCompletionStatusEx succeeded\n");
5724 memset( entries, 0xcc,
sizeof(entries) );
5726 ok(
ret,
"GetQueuedCompletionStatusEx failed\n");
5728 ok(entries[0].lpCompletionKey == 456,
"wrong key %Iu\n", entries[0].lpCompletionKey);
5731 ok(entries[0].dwNumberOfBytesTransferred == 123,
"wrong size %lu\n", entries[0].dwNumberOfBytesTransferred);
5740 memset( entries, 0xcc,
sizeof(entries) );
5742 ok(
ret,
"GetQueuedCompletionStatusEx failed\n");
5744 ok(entries[0].lpCompletionKey == 456,
"wrong key %Iu\n", entries[0].lpCompletionKey);
5747 ok(entries[0].dwNumberOfBytesTransferred == 123,
"wrong size %lu\n", entries[0].dwNumberOfBytesTransferred);
5748 ok(entries[1].lpCompletionKey == 321,
"wrong key %Iu\n", entries[1].lpCompletionKey);
5751 ok(entries[1].dwNumberOfBytesTransferred == 654,
"wrong size %lu\n", entries[1].dwNumberOfBytesTransferred);
5757 ok(!
ret,
"GetQueuedCompletionStatusEx succeeded\n");
5763 ok(!
ret ||
broken(
ret) ,
"GetQueuedCompletionStatusEx succeeded\n");
5776 ok(
ret,
"GetQueuedCompletionStatusEx failed\n");
5785#define TEST_OVERLAPPED_READ_SIZE 4096
5790 static const char prefix[] =
"pfx";
5810 "Unexpected WriteFile result, ret %#lx, bytes_count %lu, GetLastError() %lu.\n",
5818 memset(&ov, 0,
sizeof(ov));
5820 bytes_count = 0xffffffff;
5823 "Unexpected ReadFile result, ret %#lx, GetLastError() %lu.\n",
ret,
GetLastError());
5824 ok(!bytes_count,
"Unexpected read size %lu.\n", bytes_count);
5835 "Unexpected ReadFile result, ret %#lx, GetLastError() %lu.\n",
ret,
GetLastError());
5842 ok(!bytes_count,
"Unexpected read size %lu.\n", bytes_count);
5867 ok(
ret,
"expect success\n");
5872 ok(
ret,
"expect success\n");
5899 ok(
ret,
"expect success\n");
5901 ok(
ret,
"expect success\n");
5906 ok(!
ret,
"expect failure\n");
5923 WCHAR path[] = {
'C',
':',
'\\',
'w',
'i',
'n',
'd',
'o',
'w',
's',0};
5927 WIN32_FIND_STREAM_DATA
data;
5929 if (!pFindFirstStreamW)
5931 win_skip(
"FindFirstStreamW is missing\n");
5939 handle = pFindFirstStreamW(
path, FindStreamInfoStandard, &
data, 0);
5972 memset(&ft2, 0,
sizeof(ft2));
5975 ok(
memcmp(&ft1, &ft2,
sizeof(ft1)),
"Unexpected write time.\n");
5977 memset(&ft1, 0xff,
sizeof(ft1));
5980 memset(&ft1, 0,
sizeof(ft1));
5983 ok(!
memcmp(&ft1, &ft2,
sizeof(ft1)),
"Unexpected write time.\n");
6021 L"\\winetest_file3",
wcslen(
L"\\winetest_file3")),
"got name %s\n",
6035 ok(!
ret,
"expected failure\n");
6040 ok(!
ret,
"expected failure\n");
6045 ok(!
ret,
"expected failure\n");
6050 ok(!
ret,
"expected failure\n");
6056 ok(!
ret,
"expected failure\n");
6096 ok(!
ret,
"expected failure\n");
6101 ok(!
ret,
"expected failure\n");
6109 ok(!
ret,
"expected failure\n");
6115 ok(!
ret,
"expected failure\n");
6137 ok(!
ret,
"expected failure\n");
6143 ok(!
ret,
"expected failure\n");
6148 ok(!
ret,
"expected failure\n");
6213 ok(!
ret,
"expected failure\n");
6309 ok(!
ret,
"expected failure\n");
6324 ok(!
ret,
"expected failure\n");
6344 ok(!
ret,
"expected failure\n");
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
#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)
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)
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 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)
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
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)
#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[]
#define OBJ_CASE_INSENSITIVE
REFIID LPVOID DWORD_PTR dw
struct _FILE_RENAME_INFORMATION FILE_RENAME_INFORMATION
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)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
#define todo_wine_if(is_todo)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
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 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 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
_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
static unsigned int file_size
int winetest_get_mainargs(char ***pargv)
int const char int stream_size
#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
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 CALLBACK_STREAM_SWITCH
#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