34#define WIN32_NO_STATUS
71#ifndef IO_COMPLETION_ALL_ACCESS
72#define IO_COMPLETION_ALL_ACCESS 0x001F0003
85static NTSTATUS (
WINAPI *pNtCreateFile)(
PHANDLE,
ACCESS_MASK,
POBJECT_ATTRIBUTES,
PIO_STATUS_BLOCK,
PLARGE_INTEGER,
ULONG,
ULONG,
ULONG,
ULONG,
PVOID,
ULONG);
121#define TEST_BUF_LEN 3
136#define CVALUE_FIRST 0xfffabbcc
137#define CKEY_FIRST 0x1030341
138#define CKEY_SECOND 0x132E46
152 ok( req ==
sizeof(
a),
"Unexpected response size: %x\n", req );
175 trace(
"apc called block %p iosb.status %x iosb.info %lu\n",
183 static const WCHAR notepadW[] = {
'n',
'o',
't',
'e',
'p',
'a',
'd',
'.',
'e',
'x',
'e',0};
184 static const WCHAR systemrootW[] = {
'\\',
'S',
'y',
's',
't',
'e',
'm',
'R',
'o',
'o',
't',
185 '\\',
'f',
'a',
'i',
'l',
'i',
'n',
'g',0};
186 static const WCHAR systemrootExplorerW[] = {
'\\',
'S',
'y',
's',
't',
'e',
'm',
'R',
'o',
'o',
't',
187 '\\',
'e',
'x',
'p',
'l',
'o',
'r',
'e',
'r',
'.',
'e',
'x',
'e',0};
188 static const WCHAR questionmarkInvalidNameW[] = {
'a',
'f',
'i',
'l',
'e',
'?',0};
189 static const WCHAR pipeInvalidNameW[] = {
'a',
'|',
'b',0};
190 static const WCHAR pathInvalidNtW[] = {
'\\',
'\\',
'?',
'\\',0};
191 static const WCHAR pathInvalidNt2W[] = {
'\\',
'?',
'?',
'\\',0};
192 static const WCHAR pathInvalidDosW[] = {
'\\',
'D',
'o',
's',
'D',
'e',
'v',
'i',
'c',
'e',
's',
'\\',0};
193 static const char testdata[] =
"Hello World";
194 static const WCHAR sepW[] = {
'\\',0};
209 attr.RootDirectory = 0;
213 attr.SecurityQualityOfService =
NULL;
220 U(
io).Status = 0xdeadbeef;
229 "expected STATUS_INVALID_DEVICE_REQUEST, got %08x\n",
U(
io).
Status );
232 U(
io).Status = 0xdeadbeef;
242 "expected STATUS_INVALID_DEVICE_REQUEST, got %08x\n",
U(
io).
Status );
299 pRtlFreeUnicodeString( &
nameW );
307 attr.SecurityQualityOfService =
NULL;
316 pRtlDosPathNameToNtPathName_U(questionmarkInvalidNameW, &
nameW,
NULL,
NULL);
329 pRtlFreeUnicodeString(&
nameW);
331 pRtlDosPathNameToNtPathName_U(pipeInvalidNameW, &
nameW,
NULL,
NULL);
344 pRtlFreeUnicodeString(&
nameW);
346 pRtlInitUnicodeString( &
nameW, pathInvalidNtW );
357 pRtlInitUnicodeString( &
nameW, pathInvalidNt2W );
368 pRtlInitUnicodeString( &
nameW, pathInvalidDosW );
382 "QueryDosDeviceW failed with error %u\n",
GetLastError() );
393 pRtlInitUnicodeString( &
nameW, systemrootExplorerW );
401 static const char testdata[] =
"Hello World";
417 attr.RootDirectory = 0;
421 attr.SecurityQualityOfService =
NULL;
425 pRtlFreeUnicodeString( &
nameW );
432 pRtlFreeUnicodeString( &
nameW );
479 if (!
info->FileId.QuadPart)
continue;
494 win_skip(
"FILE_OPEN_BY_FILE_ID not supported\n" );
540 numbytes = 0xdeadbeef;
543 ok( numbytes ==
sizeof(
testdata) - 1,
"failed to write all data\n" );
547 attr.RootDirectory = 0;
551 attr.SecurityQualityOfService =
NULL;
555 pRtlFreeUnicodeString( &
nameW );
557 numbytes = 0xdeadbeef;
561 ok( numbytes ==
sizeof(
testdata) - 1,
"failed to read all data\n" );
571 "expected STATUS_OBJECT_PATH_NOT_FOUND, got %08x\n",
status );
582 ok( numbytes ==
sizeof(
testdata) - 1,
"SetFilePointer returned %u\n", numbytes );
584 ok( numbytes == 0,
"SetFilePointer returned %u\n", numbytes );
586 numbytes = 0xdeadbeef;
590 ok( numbytes ==
sizeof(
testdata) - 1,
"failed to read all data\n" );
594 ok( numbytes ==
sizeof(
testdata) - 1,
"SetFilePointer returned %u\n", numbytes );
596 ok( numbytes ==
sizeof(
testdata) - 1,
"SetFilePointer returned %u\n", numbytes );
610 static const WCHAR testdirW[] = {
'n',
't',
'd',
'e',
'l',
'e',
't',
'e',
'f',
'i',
'l',
'e',0};
611 static const WCHAR subdirW[] = {
'\\',
's',
'u',
'b',0};
616 ok(0,
"couldn't get temp dir\n");
621 ok(0,
"MAX_PATH exceeded in constructing paths\n");
630 ok(
ret ==
TRUE,
"couldn't create directory ntdeletefile\n");
631 if (!pRtlDosPathNameToNtPathName_U(pathW, &
nameW,
NULL,
NULL))
633 ok(0,
"RtlDosPathNametoNtPathName_U failed\n");
638 attr.RootDirectory = 0;
642 attr.SecurityQualityOfService =
NULL;
648 ok(
ret ==
FALSE,
"expected to fail removing directory, NtDeleteFile should have removed it\n");
652 ok(
ret ==
TRUE,
"couldn't create directory ntdeletefile ?!\n");
654 ok(
ret ==
TRUE,
"couldn't create directory subdir\n");
658 ok(
ret ==
TRUE,
"expected to remove directory ntdeletefile\\sub\n");
660 ok(
ret ==
TRUE,
"expected to remove directory ntdeletefile, NtDeleteFile failed.\n");
662 pRtlFreeUnicodeString( &
nameW );
667 const char text[] =
"foobar";
678 U(
iosb).Status = 0xdeadbabe;
688 ok( !apc_count,
"apc was called\n" );
690 ok( apc_count == 1,
"apc was not called\n" );
693 U(
iosb).Status = 0xdeadbabe;
700 "wrong status %x\n",
status );
705 ok( !apc_count,
"apc was called\n" );
707 ok( apc_count == 1,
"apc was not called\n" );
711 U(
iosb).Status = 0xdeadbabe;
722 ok( !apc_count,
"apc was called\n" );
724 ok( apc_count == 1,
"apc was not called\n" );
731 U(
iosb).Status = 0xdeadbabe;
738 "wrong status %x\n",
status );
743 ok( !apc_count,
"apc was called\n" );
745 ok( apc_count == 1,
"apc was not called\n" );
748 U(
iosb).Status = 0xdeadbabe;
757 ok( !apc_count,
"apc was called\n" );
763 U(
iosb).Status = 0xdeadbabe;
772 ok( !apc_count,
"apc was called\n" );
774 ok( !apc_count,
"apc was called\n" );
783 static const char text[6] =
"foobar";
820 ok(
ret == 4,
"expected 4, got %u\n",
ret);
831 ok(
ret == 6,
"expected 6, got %u\n",
ret);
866 ok(
memcmp(
buf,
"barbar", 6) == 0,
"wrong file contents: %s\n",
buf);
880 ULONG MaxMessageSize;
885 WCHAR buffer1[] = {
'\\',
'?',
'?',
'\\',
'M',
'A',
'I',
'L',
'S',
'L',
'O',
'T',
'\\',
886 'R',
':',
'\\',
'F',
'R',
'E',
'D',
'\0' };
890 pRtlInitUnicodeString(&
str, buffer1);
903 "rc = %x not STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER\n", rc);
908 hslot = (
HANDLE)0xdeadbeef;
914 "rc = %x not STATUS_SUCCESS or STATUS_INVALID_PARAMETER\n", rc);
915 ok( hslot != 0,
"Handle is invalid\n");
927 ok( hslot != 0,
"Handle is invalid\n");
929 rc = pNtClose(hslot);
961 static const char pipe_name[] =
"\\\\.\\pipe\\iocompletiontestnamedpipe";
965 HANDLE hPipeSrv, hPipeClt;
976 U(
iosb).Status = 0xdeadbeef;
980 "Unexpected iosb.Status on non-overlapped handle: %x\n",
U(
iosb).
Status );
1000 U(
iosb).Status = 0xdeadbeef;
1032 ok(
count == 1,
"Unexpected msg count: %ld\n",
count );
1045 ok(
count == 1,
"Unexpected msg count: %ld\n",
count );
1079 U(
iosb).Status = 0xdeadbeef;
1129 U(
iosb).Status = 0xdeadbeef;
1138 ok(!apc_count,
"apc_count = %u\n", apc_count);
1143 ok(apc_count == 1,
"apc was not called\n");
1166 memset(&ffsi,0,
sizeof(ffsi));
1167 memset(&fsi,0,
sizeof(fsi));
1177 "[fsi] TotalAllocationUnits expected positive, got 0x%s\n",
1180 "[fsi] AvailableAllocationUnits expected positive, got 0x%s\n",
1188 "[ffsi] TotalAllocationUnits expected positive, got negative value 0x%s\n",
1191 "[ffsi] CallerAvailableAllocationUnits expected positive, got negative value 0x%s\n",
1194 "[ffsi] ActualAvailableAllocationUnits expected positive, got negative value 0x%s\n",
1197 "[ffsi] TotalAllocationUnits error fsi:0x%s, ffsi:0x%s\n",
1201 "[ffsi] CallerAvailableAllocationUnits error fsi:0x%s, ffsi: 0x%s\n",
1223 memset(&fbi, 0,
sizeof(fbi));
1231 memset(&fbi, 0,
sizeof(fbi));
1233 U(
io).Status = 0xdeadbeef;
1238 memset(&fbi, 0,
sizeof(fbi));
1244 memset(&fbi, 0,
sizeof(fbi));
1246 U(
io).Status = 0xdeadbeef;
1251 memset(&fbi, 0,
sizeof(fbi));
1257 memset(&fbi, 0,
sizeof(fbi));
1259 U(
io).Status = 0xdeadbeef;
1264 memset(&fbi, 0,
sizeof(fbi));
1293 "attribute %x not expected\n", fai_buf.fai.BasicInformation.FileAttributes );
1297 memset(&fai_buf.fai.BasicInformation, 0,
sizeof(fai_buf.fai.BasicInformation));
1299 U(
io).Status = 0xdeadbeef;
1303 U(
io).Status = 0xdeadbeef;
1304 res = pNtSetInformationFile(
h, &
io, &fai_buf.fai.BasicInformation,
sizeof fai_buf.fai.BasicInformation,
FileBasicInformation);
1308 memset(&fai_buf.fai, 0,
sizeof(fai_buf.fai));
1311 ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) ==
FILE_ATTRIBUTE_SYSTEM,
"attribute %x not FILE_ATTRIBUTE_SYSTEM (ok in old linux without xattr)\n", fai_buf.fai.BasicInformation.FileAttributes );
1314 memset(&fai_buf.fai.BasicInformation, 0,
sizeof(fai_buf.fai.BasicInformation));
1316 U(
io).Status = 0xdeadbeef;
1317 res = pNtSetInformationFile(
h, &
io, &fai_buf.fai.BasicInformation,
sizeof fai_buf.fai.BasicInformation,
FileBasicInformation);
1321 memset(&fai_buf.fai, 0,
sizeof(fai_buf.fai));
1324 ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) ==
FILE_ATTRIBUTE_HIDDEN,
"attribute %x not FILE_ATTRIBUTE_HIDDEN (ok in old linux without xattr)\n", fai_buf.fai.BasicInformation.FileAttributes );
1327 memset(&fai_buf.fai.BasicInformation, 0,
sizeof(fai_buf.fai.BasicInformation));
1329 U(
io).Status = 0xdeadbeef;
1330 res = pNtSetInformationFile(
h, &
io, &fai_buf.fai.BasicInformation,
sizeof fai_buf.fai.BasicInformation,
FileBasicInformation);
1334 memset(&fai_buf.fai, 0,
sizeof(fai_buf.fai));
1337 todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) ==
FILE_ATTRIBUTE_NORMAL,
"attribute %x not FILE_ATTRIBUTE_NORMAL\n", fai_buf.fai.BasicInformation.FileAttributes );
1356 static const WCHAR foo_txtW[] = {
'\\',
'f',
'o',
'o',
'.',
't',
'x',
't',0};
1357 static const WCHAR fooW[] = {
'f',
'o',
'o',0};
1371 ok(
res != 0,
"failed to create temp file\n" );
1376 ok(
res != 0,
"failed to create temp file\n" );
1377 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1384 pRtlFreeUnicodeString( &name_str );
1386 U(
io).Status = 0xdeadbeef;
1391 ok( fileDeleted,
"file should not exist\n" );
1393 ok( !fileDeleted,
"file should exist\n" );
1410 ok(
res != 0,
"failed to create temp file\n" );
1415 ok(
res != 0,
"failed to create temp file\n" );
1416 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1422 pRtlFreeUnicodeString( &name_str );
1424 U(
io).Status = 0xdeadbeef;
1429 ok( !fileDeleted,
"file should exist\n" );
1431 ok( !fileDeleted,
"file should exist\n" );
1440 ok(
res != 0,
"failed to create temp file\n" );
1445 ok(
res != 0,
"failed to create temp file\n" );
1446 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1452 pRtlFreeUnicodeString( &name_str );
1454 U(
io).Status = 0xdeadbeef;
1459 ok( fileDeleted,
"file should not exist\n" );
1461 ok( !fileDeleted,
"file should exist\n" );
1470 ok(
res != 0,
"failed to create temp file\n" );
1475 ok(
res != 0,
"failed to create temp file\n" );
1479 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1485 pRtlFreeUnicodeString( &name_str );
1487 U(
io).Status = 0xdeadbeef;
1492 ok( !fileDeleted,
"file should exist\n" );
1494 ok( !fileDeleted,
"file should exist\n" );
1504 ok(
res != 0,
"failed to create temp file\n" );
1509 ok(
res != 0,
"failed to create temp file\n" );
1513 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1519 pRtlFreeUnicodeString( &name_str );
1521 U(
io).Status = 0xdeadbeef;
1526 ok( !fileDeleted,
"file should exist\n" );
1528 ok( !fileDeleted,
"file should exist\n" );
1538 ok(
res != 0,
"failed to create temp file\n" );
1541 ok(
success != 0,
"failed to create temp directory\n" );
1546 ok(
res != 0,
"failed to create temp file\n" );
1547 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1554 pRtlFreeUnicodeString( &name_str );
1556 U(
io).Status = 0xdeadbeef;
1561 ok( fileDeleted,
"file should not exist\n" );
1563 ok( !fileDeleted,
"file should exist\n" );
1580 ok(
res != 0,
"failed to create temp file\n" );
1583 ok(
success != 0,
"failed to create temp directory\n" );
1593 ok(
res != 0,
"failed to create temp file\n" );
1594 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1601 pRtlFreeUnicodeString( &name_str );
1603 U(
io).Status = 0xdeadbeef;
1608 todo_wine ok( !fileDeleted,
"file should exist\n" );
1610 todo_wine ok( fileDeleted,
"file should not exist\n" );
1626 ok(
res != 0,
"failed to create temp file\n" );
1629 ok(
success != 0,
"failed to create temp directory\n" );
1634 ok(
res != 0,
"failed to create temp file\n" );
1635 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1641 pRtlFreeUnicodeString( &name_str );
1643 U(
io).Status = 0xdeadbeef;
1648 ok( !fileDeleted,
"file should exist\n" );
1650 ok( !fileDeleted,
"file should exist\n" );
1659 ok(
res != 0,
"failed to create temp file\n" );
1662 ok(
success != 0,
"failed to create temp directory\n" );
1667 ok(
res != 0,
"failed to create temp file\n" );
1671 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1677 pRtlFreeUnicodeString( &name_str );
1679 U(
io).Status = 0xdeadbeef;
1684 ok( !fileDeleted,
"file should exist\n" );
1686 ok( !fileDeleted,
"file should exist\n" );
1696 ok(
res != 0,
"failed to create temp file\n" );
1699 ok(
success != 0,
"failed to create temp directory\n" );
1704 ok(
res != 0,
"failed to create temp file\n" );
1705 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1711 pRtlFreeUnicodeString( &name_str );
1713 U(
io).Status = 0xdeadbeef;
1718 ok( fileDeleted,
"file should not exist\n" );
1720 ok( !fileDeleted,
"file should exist\n" );
1729 ok(
res != 0,
"failed to create temp file\n" );
1732 ok(
success != 0,
"failed to create temp directory\n" );
1737 ok(
res != 0,
"failed to create temp file\n" );
1741 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1747 pRtlFreeUnicodeString( &name_str );
1749 U(
io).Status = 0xdeadbeef;
1754 ok( !fileDeleted,
"file should exist\n" );
1756 ok( !fileDeleted,
"file should exist\n" );
1766 ok(
res != 0,
"failed to create temp file\n" );
1769 ok(
success != 0,
"failed to create temp directory\n" );
1774 ok(
res != 0,
"failed to create temp file\n" );
1777 ok(
success != 0,
"failed to create temp directory\n" );
1778 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1784 pRtlFreeUnicodeString( &name_str );
1786 U(
io).Status = 0xdeadbeef;
1791 ok( !fileDeleted,
"file should exist\n" );
1793 ok( !fileDeleted,
"file should exist\n" );
1802 ok(
res != 0,
"failed to create temp file\n" );
1805 ok(
success != 0,
"failed to create temp directory\n" );
1810 ok(
res != 0,
"failed to create temp file\n" );
1813 ok(
success != 0,
"failed to create temp directory\n" );
1814 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1820 pRtlFreeUnicodeString( &name_str );
1822 U(
io).Status = 0xdeadbeef;
1827 ok( !fileDeleted,
"file should exist\n" );
1829 ok( !fileDeleted,
"file should exist\n" );
1838 ok(
res != 0,
"failed to create temp file\n" );
1841 ok(
success != 0,
"failed to create temp directory\n" );
1846 ok(
res != 0,
"failed to create temp file\n" );
1849 ok(
success != 0,
"failed to create temp directory\n" );
1853 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1859 pRtlFreeUnicodeString( &name_str );
1861 U(
io).Status = 0xdeadbeef;
1866 ok( !fileDeleted,
"file should exist\n" );
1868 ok( !fileDeleted,
"file should exist\n" );
1878 ok(
res != 0,
"failed to create temp file\n" );
1883 ok(
res != 0,
"failed to create temp file\n" );
1886 ok(
success != 0,
"failed to create temp directory\n" );
1887 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1893 pRtlFreeUnicodeString( &name_str );
1895 U(
io).Status = 0xdeadbeef;
1900 ok( !fileDeleted,
"file should exist\n" );
1902 ok( !fileDeleted,
"file should exist\n" );
1911 ok(
res != 0,
"failed to create temp file\n" );
1916 ok(
res != 0,
"failed to create temp file\n" );
1919 ok(
success != 0,
"failed to create temp directory\n" );
1920 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1926 pRtlFreeUnicodeString( &name_str );
1928 U(
io).Status = 0xdeadbeef;
1933 ok( !fileDeleted,
"file should exist\n" );
1935 ok( !fileDeleted,
"file should exist\n" );
1944 ok(
res != 0,
"failed to create temp file\n" );
1949 ok(
res != 0,
"failed to create temp file\n" );
1962 U(
io).Status = 0xdeadbeef;
1967 ok( fileDeleted,
"file should not exist\n" );
1969 ok( !fileDeleted,
"file should exist\n" );
1988 static const WCHAR foo_txtW[] = {
'\\',
'f',
'o',
'o',
'.',
't',
'x',
't',0};
1989 static const WCHAR fooW[] = {
'f',
'o',
'o',0};
2003 ok(
res != 0,
"failed to create temp file\n" );
2008 ok(
res != 0,
"failed to create temp file\n" );
2009 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2016 pRtlFreeUnicodeString( &name_str );
2018 U(
io).Status = 0xdeadbeef;
2023 ok( !fileDeleted,
"file should exist\n" );
2025 ok( !fileDeleted,
"file should exist\n" );
2042 ok(
res != 0,
"failed to create temp file\n" );
2047 ok(
res != 0,
"failed to create temp file\n" );
2048 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2054 pRtlFreeUnicodeString( &name_str );
2056 U(
io).Status = 0xdeadbeef;
2061 ok( !fileDeleted,
"file should exist\n" );
2063 ok( !fileDeleted,
"file should exist\n" );
2072 ok(
res != 0,
"failed to create temp file\n" );
2077 ok(
res != 0,
"failed to create temp file\n" );
2078 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2084 pRtlFreeUnicodeString( &name_str );
2086 U(
io).Status = 0xdeadbeef;
2091 ok( !fileDeleted,
"file should exist\n" );
2093 ok( !fileDeleted,
"file should exist\n" );
2102 ok(
res != 0,
"failed to create temp file\n" );
2107 ok(
res != 0,
"failed to create temp file\n" );
2111 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2117 pRtlFreeUnicodeString( &name_str );
2119 U(
io).Status = 0xdeadbeef;
2124 ok( !fileDeleted,
"file should exist\n" );
2126 ok( !fileDeleted,
"file should exist\n" );
2136 ok(
res != 0,
"failed to create temp file\n" );
2141 ok(
res != 0,
"failed to create temp file\n" );
2145 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2151 pRtlFreeUnicodeString( &name_str );
2153 U(
io).Status = 0xdeadbeef;
2158 ok( !fileDeleted,
"file should exist\n" );
2160 ok( !fileDeleted,
"file should exist\n" );
2170 ok(
res != 0,
"failed to create temp file\n" );
2173 ok(
success != 0,
"failed to create temp directory\n" );
2178 ok(
res != 0,
"failed to create temp file\n" );
2179 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2186 pRtlFreeUnicodeString( &name_str );
2188 U(
io).Status = 0xdeadbeef;
2193 ok( !fileDeleted,
"file should exist\n" );
2195 ok( fileDeleted,
"file should not exist\n" );
2212 ok(
res != 0,
"failed to create temp file\n" );
2215 ok(
success != 0,
"failed to create temp directory\n" );
2225 ok(
res != 0,
"failed to create temp file\n" );
2226 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2233 pRtlFreeUnicodeString( &name_str );
2235 U(
io).Status = 0xdeadbeef;
2240 ok( !fileDeleted,
"file should exist\n" );
2242 ok( fileDeleted,
"file should not exist\n" );
2252 ok(
res != 0,
"failed to create temp file\n" );
2255 ok(
success != 0,
"failed to create temp directory\n" );
2260 ok(
res != 0,
"failed to create temp file\n" );
2261 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2267 pRtlFreeUnicodeString( &name_str );
2269 U(
io).Status = 0xdeadbeef;
2273 "res expected STATUS_OBJECT_NAME_COLLISION or STATUS_FILE_IS_A_DIRECTORY, got %x\n",
res );
2275 ok( !fileDeleted,
"file should exist\n" );
2277 ok( !fileDeleted,
"file should exist\n" );
2286 ok(
res != 0,
"failed to create temp file\n" );
2289 ok(
success != 0,
"failed to create temp directory\n" );
2294 ok(
res != 0,
"failed to create temp file\n" );
2298 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2304 pRtlFreeUnicodeString( &name_str );
2306 U(
io).Status = 0xdeadbeef;
2310 "res expected STATUS_OBJECT_NAME_COLLISION or STATUS_FILE_IS_A_DIRECTORY, got %x\n",
res );
2312 ok( !fileDeleted,
"file should exist\n" );
2314 ok( !fileDeleted,
"file should exist\n" );
2324 ok(
res != 0,
"failed to create temp file\n" );
2327 ok(
success != 0,
"failed to create temp directory\n" );
2332 ok(
res != 0,
"failed to create temp file\n" );
2333 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2339 pRtlFreeUnicodeString( &name_str );
2341 U(
io).Status = 0xdeadbeef;
2346 ok( !fileDeleted,
"file should exist\n" );
2348 ok( !fileDeleted,
"file should exist\n" );
2357 ok(
res != 0,
"failed to create temp file\n" );
2360 ok(
success != 0,
"failed to create temp directory\n" );
2365 ok(
res != 0,
"failed to create temp file\n" );
2369 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2375 pRtlFreeUnicodeString( &name_str );
2377 U(
io).Status = 0xdeadbeef;
2382 ok( !fileDeleted,
"file should exist\n" );
2384 ok( !fileDeleted,
"file should exist\n" );
2394 ok(
res != 0,
"failed to create temp file\n" );
2397 ok(
success != 0,
"failed to create temp directory\n" );
2402 ok(
res != 0,
"failed to create temp file\n" );
2405 ok(
success != 0,
"failed to create temp directory\n" );
2406 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2412 pRtlFreeUnicodeString( &name_str );
2414 U(
io).Status = 0xdeadbeef;
2418 "res expected STATUS_OBJECT_NAME_COLLISION or STATUS_FILE_IS_A_DIRECTORY, got %x\n",
res );
2420 ok( !fileDeleted,
"file should exist\n" );
2422 ok( !fileDeleted,
"file should exist\n" );
2431 ok(
res != 0,
"failed to create temp file\n" );
2434 ok(
success != 0,
"failed to create temp directory\n" );
2439 ok(
res != 0,
"failed to create temp file\n" );
2442 ok(
success != 0,
"failed to create temp directory\n" );
2443 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2449 pRtlFreeUnicodeString( &name_str );
2451 U(
io).Status = 0xdeadbeef;
2456 ok( !fileDeleted,
"file should exist\n" );
2458 ok( !fileDeleted,
"file should exist\n" );
2467 ok(
res != 0,
"failed to create temp file\n" );
2470 ok(
success != 0,
"failed to create temp directory\n" );
2475 ok(
res != 0,
"failed to create temp file\n" );
2478 ok(
success != 0,
"failed to create temp directory\n" );
2482 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2488 pRtlFreeUnicodeString( &name_str );
2490 U(
io).Status = 0xdeadbeef;
2495 ok( !fileDeleted,
"file should exist\n" );
2497 ok( !fileDeleted,
"file should exist\n" );
2507 ok(
res != 0,
"failed to create temp file\n" );
2512 ok(
res != 0,
"failed to create temp file\n" );
2515 ok(
success != 0,
"failed to create temp directory\n" );
2516 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2522 pRtlFreeUnicodeString( &name_str );
2524 U(
io).Status = 0xdeadbeef;
2529 ok( !fileDeleted,
"file should exist\n" );
2531 ok( !fileDeleted,
"file should exist\n" );
2540 ok(
res != 0,
"failed to create temp file\n" );
2545 ok(
res != 0,
"failed to create temp file\n" );
2548 ok(
success != 0,
"failed to create temp directory\n" );
2549 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2555 pRtlFreeUnicodeString( &name_str );
2557 U(
io).Status = 0xdeadbeef;
2562 ok( !fileDeleted,
"file should exist\n" );
2564 ok( !fileDeleted,
"file should exist\n" );
2573 ok(
res != 0,
"failed to create temp file\n" );
2578 ok(
res != 0,
"failed to create temp file\n" );
2591 U(
io).Status = 0xdeadbeef;
2596 ok( !fileDeleted,
"file should exist\n" );
2598 ok( !fileDeleted,
"file should exist\n" );
2624 memset(&fbi, 0,
sizeof(fbi));
2657 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
2671 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
2680 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %x)\n",
res );
2683 ok( fileDeleted,
"File should have been deleted\n" );
2696 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
2711 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
2721 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %x)\n",
res );
2724 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %x)\n",
res );
2727 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
2736 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %x)\n",
res );
2739 ok( fileDeleted,
"File should have been deleted\n" );
2750 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %x)\n",
res );
2753 ok( fileDeleted,
"File should have been deleted\n" );
2764 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %x)\n",
res );
2767 ok( fileDeleted,
"Directory should have been deleted\n" );
2779 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %x)\n",
res );
2782 ok( !fileDeleted,
"Directory shouldn't have been deleted\n" );
2804 ok( !fileDeleted,
"Directory shouldn't have been deleted\n" );
2818 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
2831 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %x)\n",
res );
2834 ok( fileDeleted,
"File should have been deleted\n" );
2844 ok(
ptr !=
NULL,
"MapViewOfFile failed\n");
2851 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
2862 ok(
ptr !=
NULL,
"MapViewOfFile failed\n");
2867 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %x)\n",
res );
2870 ok( fileDeleted,
"File should have been deleted\n" );
2881 ok(
res == 0,
"NtCreateIoCompletion anonymous failed: %x\n",
res );
2896 ULONG old_redir = 1, tmp;
2897 UINT file_name_size;
2905 if (!pGetVolumePathNameW) {
2906 win_skip(
"GetVolumePathNameW not found\n");
2916 ok(
len == file_name_size - 1,
2917 "GetSystemDirectoryW returned %u, expected %u.\n",
2918 len, file_name_size - 1);
2920 len = pGetVolumePathNameW(
file_name, volume_prefix, file_name_size );
2921 ok(
len,
"GetVolumePathNameW failed.\n");
2924 if (
len && volume_prefix[
len - 1] ==
'\\') --
len;
2929 info_size =
sizeof(*info) + (file_name_size *
sizeof(
WCHAR));
2932 if (pRtlWow64EnableFsRedirectionEx) pRtlWow64EnableFsRedirectionEx(
TRUE, &old_redir );
2936 if (pRtlWow64EnableFsRedirectionEx) pRtlWow64EnableFsRedirectionEx( old_redir, &tmp );
2949 ok(
info->FileName[2] == 0xcccc,
"info->FileName[2] is %#x, expected 0xcccc.\n",
info->FileName[2]);
2951 "info->FileName[1] is %p, expected %p.\n",
2953 ok(
io.Information ==
sizeof(*
info),
"io.Information is %lu\n",
io.Information);
2960 ok(
info->FileName[
info->FileNameLength /
sizeof(
WCHAR)] == 0xcccc,
"info->FileName[len] is %#x, expected 0xcccc.\n",
2962 info->FileName[
info->FileNameLength /
sizeof(
WCHAR)] =
'\0';
2966 "io.Information is %lu, expected %u.\n",
2974 if (old_redir || !pGetSystemWow64DirectoryW || !(file_name_size = pGetSystemWow64DirectoryW(
NULL, 0 )))
2976 skip(
"Not running on WoW64, skipping test.\n");
2991 len = pGetSystemWow64DirectoryW(
file_name, file_name_size );
2992 ok(
len == file_name_size - 1,
2993 "GetSystemWow64DirectoryW returned %u, expected %u.\n",
2994 len, file_name_size - 1);
2996 len = pGetVolumePathNameW(
file_name, volume_prefix, file_name_size );
2997 ok(
len,
"GetVolumePathNameW failed.\n");
3000 if (
len && volume_prefix[
len - 1] ==
'\\') --
len;
3004 info_size =
sizeof(*info) + (file_name_size *
sizeof(
WCHAR));
3010 info->FileName[
info->FileNameLength /
sizeof(
WCHAR)] =
'\0';
3025 ULONG old_redir = 1, tmp;
3026 UINT file_name_size;
3034 if (!pGetVolumePathNameW) {
3035 win_skip(
"GetVolumePathNameW not found\n");
3045 ok(
len == file_name_size - 1,
3046 "GetSystemDirectoryW returned %u, expected %u.\n",
3047 len, file_name_size - 1);
3049 len = pGetVolumePathNameW(
file_name, volume_prefix, file_name_size );
3050 ok(
len,
"GetVolumePathNameW failed.\n");
3053 if (
len && volume_prefix[
len - 1] ==
'\\') --
len;
3058 info_size =
sizeof(*info) + (file_name_size *
sizeof(
WCHAR));
3061 if (pRtlWow64EnableFsRedirectionEx) pRtlWow64EnableFsRedirectionEx(
TRUE, &old_redir );
3065 if (pRtlWow64EnableFsRedirectionEx) pRtlWow64EnableFsRedirectionEx( old_redir, &tmp );
3079 "info->NameInformation.FileNameLength is %u\n",
info->NameInformation.FileNameLength );
3080 ok(
info->NameInformation.FileName[2] == 0xcccc,
3081 "info->NameInformation.FileName[2] is %#x, expected 0xcccc.\n",
info->NameInformation.FileName[2]);
3083 "info->NameInformation.FileName[1] is %p, expected %p.\n",
3085 ok(
io.Information ==
sizeof(*
info),
"io.Information is %lu\n",
io.Information);
3092 "info->NameInformation.FileNameLength is %u\n",
info->NameInformation.FileNameLength );
3093 ok(
info->NameInformation.FileName[
info->NameInformation.FileNameLength /
sizeof(
WCHAR)] == 0xcccc,
3094 "info->NameInformation.FileName[len] is %#x, expected 0xcccc.\n",
3095 info->NameInformation.FileName[
info->NameInformation.FileNameLength /
sizeof(
WCHAR)]);
3096 info->NameInformation.FileName[
info->NameInformation.FileNameLength /
sizeof(
WCHAR)] =
'\0';
3098 "info->NameInformation.FileName is %s, expected %s.\n",
3101 +
info->NameInformation.FileNameLength,
3102 "io.Information is %lu\n",
io.Information );
3109 if (old_redir || !pGetSystemWow64DirectoryW || !(file_name_size = pGetSystemWow64DirectoryW(
NULL, 0 )))
3111 skip(
"Not running on WoW64, skipping test.\n");
3126 len = pGetSystemWow64DirectoryW(
file_name, file_name_size );
3127 ok(
len == file_name_size - 1,
3128 "GetSystemWow64DirectoryW returned %u, expected %u.\n",
3129 len, file_name_size - 1);
3131 len = pGetVolumePathNameW(
file_name, volume_prefix, file_name_size );
3132 ok(
len,
"GetVolumePathNameW failed.\n");
3135 if (
len && volume_prefix[
len - 1] ==
'\\') --
len;
3139 info_size =
sizeof(*info) + (file_name_size *
sizeof(
WCHAR));
3145 info->NameInformation.FileName[
info->NameInformation.FileNameLength /
sizeof(
WCHAR)] =
'\0';
3146 ok(!
lstrcmpiW(
info->NameInformation.FileName,
expected ),
"info->NameInformation.FileName is %s, expected %s.\n",
3158 static const char buf[] =
"testdata";
3173 "expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n",
status);
3176 win_skip(
"FileIoCompletionNotificationInformation class not supported\n");
3204 memset(&ov, 0,
sizeof(ov));
3209 for (
i = 0;
i < 10;
i++)
3222 ok(num_bytes ==
sizeof(
buf),
"expected sizeof(buf), got %u\n", num_bytes);
3228 ok(
key == 0xdeadbeef,
"expected 0xdeadbeef, got %lx\n",
key);
3229 ok(pov == &ov,
"expected %p, got %p\n", &ov, pov);
3232 win_skip(
"WriteFile never returned TRUE\n");
3243 for (
i = 0;
i < 10;
i++)
3254 ok(num_bytes ==
sizeof(
buf),
"expected sizeof(buf), got %u\n", num_bytes);
3256 pov = (
void *)0xdeadbeef;
3258 ok(!
ret,
"GetQueuedCompletionStatus succeeded\n");
3259 ok(pov ==
NULL,
"expected NULL, got %p\n", pov);
3262 win_skip(
"WriteFile never returned TRUE\n");
3273 for (
i = 0;
i < 10;
i++)
3286 ok(num_bytes ==
sizeof(
buf),
"expected sizeof(buf), got %u\n", num_bytes);
3288 pov = (
void *)0xdeadbeef;
3290 ok(!
ret,
"GetQueuedCompletionStatus succeeded\n");
3291 ok(pov ==
NULL,
"expected NULL, got %p\n", pov);
3294 win_skip(
"WriteFile never returned TRUE\n");
3313 memset( &fid, 0x11,
sizeof(fid) );
3317 win_skip(
"FileIdInformation not supported\n" );
3324 ok(
ret,
"GetFileInformationByHandle failed\n" );
3327 ok( dwords[0] ==
info.dwVolumeSerialNumber,
"expected %08x, got %08x\n",
3328 info.dwVolumeSerialNumber, dwords[0] );
3329 ok( dwords[1] != 0x11111111,
"expected != 0x11111111\n" );
3332 ok( dwords[0] ==
info.nFileIndexLow,
"expected %08x, got %08x\n",
info.nFileIndexLow, dwords[0] );
3333 ok( dwords[1] ==
info.nFileIndexHigh,
"expected %08x, got %08x\n",
info.nFileIndexHigh, dwords[1] );
3334 ok( dwords[2] == 0,
"expected 0, got %08x\n", dwords[2] );
3335 ok( dwords[3] == 0,
"expected 0, got %08x\n", dwords[3] );
3358 ok(
info.AccessFlags == 0x13019f,
"got %08x\n",
info.AccessFlags );
3377 attr.RootDirectory = 0;
3381 attr.SecurityQualityOfService =
NULL;
3386 pRtlFreeUnicodeString( &
nameW );
3389 U(
io).Status = 0xdadadada;
3390 io.Information = 0xcacacaca;
3430 attr.RootDirectory = 0;
3434 attr.SecurityQualityOfService =
NULL;
3439 pRtlFreeUnicodeString( &
nameW );
3442 U(
io).Status = 0xdadadada;
3443 io.Information = 0xcacacaca;
3455 trace(
"FileSystemAttribute: %x MaximumComponentNameLength: %x FileSystemName: %s\n",
3489 static const WCHAR fooW[] = {
'f',
'o',
'o',0};
3508 attr.SecurityQualityOfService =
NULL;
3510 for (
i = 0;
i <
sizeof(td)/
sizeof(td[0]);
i++)
3514 td[
i].disposition, 0,
NULL, 0);
3520 ok(
io.Information == td[
i].result,
"%d: expected %#x got %#lx\n",
i, td[
i].result,
io.Information);
3523 ret &= ~FILE_ATTRIBUTE_NOT_CONTENT_INDEXED;
3525 if (
ret != td[
i].attrib_out)
3528 ok(
ret == td[
i].attrib_out,
"%d: expected %#x got %#x\n",
i, td[
i].attrib_out,
ret);
3532 ok(
ret == td[
i].attrib_out,
"%d: expected %#x got %#x\n",
i, td[
i].attrib_out,
ret);
3537 if (td[
i].needs_cleanup)
3544 pRtlFreeUnicodeString( &
nameW );
3551 static const WCHAR fooW[] = {
'f',
'o',
'o',0};
3569 attr.SecurityQualityOfService =
NULL;
3621 pRtlFreeUnicodeString(&
nameW);
3628 static const char contents[14] =
"1234567890abcd";
3733 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %u\n", off);
3738 ok(!
ret,
"ReadFile should fail\n");
3765 for (
i = -20;
i < -1;
i++)
3767 if (
i == -2)
continue;
3789 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %u\n", off);
3809 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %u\n", off);
3820 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %u\n", off);
3845 S(
U(ovl)).OffsetHigh = 0;
3852 ok(!
ret,
"ReadFile should fail\n");
3859 S(
U(ovl)).OffsetHigh = 0;
3918 for (
i = -20;
i < 0;
i++)
3920 if (
i == -2)
continue;
3941 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %u\n", off);
3953 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %u\n", off);
3964 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %u\n", off);
3977 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %u\n", off);
3980 S(
U(ovl)).OffsetHigh = 0;
3989 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %u\n", off);
3991 S(
U(ovl)).Offset = 0;
3992 S(
U(ovl)).OffsetHigh = 0;
4007 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %u\n", off);
4017 ok(!
ret,
"ReadFile should fail\n");
4021 S(
U(ovl)).Offset = 0;
4022 S(
U(ovl)).OffsetHigh = 0;
4037 ok(!
ret,
"WriteFile should fail\n");
4048 for (
i = -20;
i < -1;
i++)
4073 ok(off == 0,
"expected 0, got %u\n", off);
4078 ok(!
ret,
"ReadFile should fail\n");
4089 for (
i = -20;
i < 0;
i++)
4101 ok(off == 0,
"expected 0, got %u\n", off);
4105 S(
U(ovl)).Offset =
offset.u.LowPart;
4106 S(
U(ovl)).OffsetHigh =
offset.u.HighPart;
4113 ok(!
ret,
"ReadFile should fail\n");
4119 ok(off == 0,
"expected 0, got %u\n", off);
4126 ok(!
ret,
"GetOverlappedResult should report FALSE\n");
4134 ok(off == 0,
"expected 0, got %u\n", off);
4137 S(
U(ovl)).Offset =
offset.u.LowPart;
4138 S(
U(ovl)).OffsetHigh =
offset.u.HighPart;
4152 ok(off == 0,
"expected 0, got %u\n", off);
4159 ok(
ret,
"GetOverlappedResult should report TRUE\n");
4167 S(
U(ovl)).Offset =
offset.u.LowPart;
4168 S(
U(ovl)).OffsetHigh =
offset.u.HighPart;
4182 ok(off == 0,
"expected 0, got %u\n", off);
4189 ok(
ret,
"GetOverlappedResult should report TRUE\n");
4215 ok(off == 0,
"expected 0, got %u\n", off);
4236 ok(off == 0,
"expected 0, got %u\n", off);
4238 S(
U(ovl)).Offset = 0;
4239 S(
U(ovl)).OffsetHigh = 0;
4257 ok(off == 0,
"expected 0, got %u\n", off);
4268 ok(off == 0,
"expected 0, got %u\n", off);
4288 ok(off == 0,
"expected 0, got %u\n", off);
4304 ok(off == 0,
"expected 0, got %u\n", off);
4310 ok(off == 0,
"expected 0, got %u\n", off);
4313 S(
U(ovl)).OffsetHigh = 0;
4333 ok(off == 0,
"expected 0, got %u\n", off);
4343 ok(off == 0,
"expected 0, got %u\n", off);
4345 S(
U(ovl)).Offset = 0;
4346 S(
U(ovl)).OffsetHigh = 0;
4366 ok(off == 0,
"expected 0, got %u\n", off);
4378 ok(off == 0,
"expected 0, got %u\n", off);
4406 &peek_buf,
sizeof(peek_buf));
4440 status = pNtFlushBuffersFile(hfile, &io_status_block);
4443 status = pNtFlushBuffersFile(hfileread, &io_status_block);
4446 status = pNtFlushBuffersFile(
NULL, &io_status_block);
4455 status = pNtFlushBuffersFile(hfile, &io_status_block);
4464 #define EA_BUFFER_SIZE 4097
4475 U(
io).Status = 0xdeadbeef;
4476 io.Information = 0xdeadbeef;
4482 ok(
io.Information == 0xdeadbeef,
"expected 0xdeadbeef, got %lu\n",
io.Information);
4483 ok(
buffer[0] == 0xcc,
"data at position 0 overwritten\n");
4486 U(
io).Status = 0xdeadbeef;
4487 io.Information = 0xdeadbeef;
4493 ok(
io.Information == 0xdeadbeef,
"expected 0xdeadbeef, got %lu\n",
io.Information);
4494 ok(
buffer[0] == 0xcc,
"data at position 0 overwritten\n");
4497 U(
io).Status = 0xdeadbeef;
4498 io.Information = 0xdeadbeef;
4502 ok(
io.Information == 0xdeadbeef,
"expected 0xdeadbeef, got %lu\n",
io.Information);
4505 U(
io).Status = 0xdeadbeef;
4506 io.Information = 0xdeadbeef;
4510 ok(
io.Information == 0xdeadbeef,
"expected 0xdeadbeef, got %lu\n",
io.Information);
4513 U(
io).Status = 0xdeadbeef;
4514 io.Information = 0xdeadbeef;
4520 ok(
io.Information == 0xdeadbeef,
"expected 0xdeadbeef, got %lu\n",
io.Information);
4521 for (
i = 0;
i < buffer_len && !
buffer[
i];
i++);
4522 ok(
i == buffer_len,
"expected %u bytes filled with 0x00, got %u bytes\n", buffer_len,
i);
4526 U(
io).Status = 0xdeadbeef;
4527 io.Information = 0xdeadbeef;
4533 ok(
io.Information == 0xdeadbeef,
"expected 0xdeadbeef, got %lu\n",
io.Information);
4534 for (
i = 0;
i < buffer_len && !
buffer[
i];
i++);
4535 ok(
i == buffer_len,
"expected %u bytes filled with 0x00, got %u bytes\n", buffer_len,
i);
4539 #undef EA_BUFFER_SIZE
4545 INT buffer_len, string_len;
4552 buffer->ReparseDataLength =
sizeof(
buffer->MountPointReparseBuffer) + string_len;
4553 buffer->MountPointReparseBuffer.SubstituteNameLength = string_len -
sizeof(
WCHAR);
4554 buffer->MountPointReparseBuffer.PrintNameOffset = string_len;
4555 dest = &
buffer->MountPointReparseBuffer.PathBuffer[0];
4563 static const WCHAR junctionW[] = {
'\\',
'j',
'u',
'n',
'c',
't',
'i',
'o',
'n',0};
4565 static const WCHAR targetW[] = {
'\\',
't',
'a',
'r',
'g',
'e',
't',0};
4567 static const WCHAR fooW[] = {
'f',
'o',
'o',0};
4568 static WCHAR volW[] = {
'c',
':',
'\\',0};
4573 INT buffer_len, string_len;
4585 win_skip(
"Unable to create a temporary junction point directory.\n");
4591 volW[0] =
nameW.Buffer[4];
4592 pRtlFreeUnicodeString( &
nameW );
4596 skip(
"File system does not support junction points.\n");
4603 lstrcatW(junction_path, junctionW);
4605 ok(bret,
"Failed to create junction point directory.\n");
4611 ok(bret,
"Failed to create junction point target directory.\n");
4612 pRtlDosPathNameToNtPathName_U(target_path, &
nameW,
NULL,
NULL);
4623 ok(dwret ==
STATUS_SUCCESS,
"Failed to get junction point folder's attributes (0x%x).\n", dwret);
4626 ok(bret,
"Failed to create junction point! (0x%x)\n",
GetLastError());
4630 ok(dwret != (
DWORD)~0,
"Junction point doesn't exist (attributes: 0x%x)!\n", dwret);
4638 string_len =
buffer->MountPointReparseBuffer.SubstituteNameLength;
4639 dest = &
buffer->MountPointReparseBuffer.PathBuffer[
buffer->MountPointReparseBuffer.SubstituteNameOffset/
sizeof(
WCHAR)];
4640 ok(bret,
"Failed to read junction point!\n");
4641 ok((
memcmp(
dest,
nameW.Buffer, string_len) == 0),
"Junction point destination does not match ('%s' != '%s')!\n",
4645 memset(&old_attrib, 0x00,
sizeof(old_attrib));
4648 ok(dwret ==
STATUS_SUCCESS,
"Failed to set junction point folder's attributes (0x%x).\n", dwret);
4649 memset(&guid_buffer, 0x00,
sizeof(guid_buffer));
4653 ok(bret,
"Failed to delete junction point! (0x%x)\n",
GetLastError());
4654 memset(&new_attrib, 0x00,
sizeof(new_attrib));
4656 ok(dwret ==
STATUS_SUCCESS,
"Failed to get junction point folder's attributes (0x%x).\n", dwret);
4658 "Junction point folder's access time does not match.\n");
4667 ok(bret,
"Failed to create junction point! (0x%x)\n",
GetLastError());
4670 ok(bret,
"Failed to delete junction point as directory!\n");
4672 ok(dwret == (
DWORD)~0,
"Junction point still exists (attributes: 0x%x)!\n", dwret);
4677 ok(bret,
"Failed to create junction point target directory.\n");
4682 ok(bret,
"Failed to create junction point! (0x%x)\n",
GetLastError());
4685 ok(!bret,
"Succeeded in deleting junction point as file!\n");
4690 ok(dwret != (
DWORD)~0,
"Junction point doesn't exist (attributes: 0x%x)!\n", dwret);
4695 ok(dwret == 0x410 ||
broken(dwret == 0x430) ,
4696 "Unexpected junction point attributes (0x%x != 0x410)!\n", dwret);
4698 ok(bret,
"Failed to delete junction point target!\n");
4700 ok(bret,
"Failed to create junction point target directory.\n");
4704 pRtlFreeUnicodeString( &
nameW );
4707 ok(bret,
"Failed to remove temporary junction point directory!\n");
4709 ok(bret,
"Failed to remove temporary target directory!\n");
4719 skip(
"not running on NT, skipping test\n");
4728 pRtlDosPathNameToNtPathName_U = (
void *)
GetProcAddress(
hntdll,
"RtlDosPathNameToNtPathName_U");
4729 pRtlWow64EnableFsRedirectionEx = (
void *)
GetProcAddress(
hntdll,
"RtlWow64EnableFsRedirectionEx");
4748 pNtQueryVolumeInformationFile = (
void *)
GetProcAddress(
hntdll,
"NtQueryVolumeInformationFile");
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
static unsigned char bytes[4]
static const WCHAR nameW[]
#define FILE_DIRECTORY_FILE
#define FILE_NON_DIRECTORY_FILE
void restart(int argc, const char *argv[])
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define STATUS_INVALID_HANDLE
#define STATUS_NOT_IMPLEMENTED
#define STATUS_OBJECT_TYPE_MISMATCH
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
#define ERROR_INVALID_PARAMETER
#define GetCurrentDirectoryW(x, y)
#define ReadFile(a, b, c, d, e)
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define GetCurrentProcess()
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
#define FILE_ATTRIBUTE_NORMAL
#define ERROR_ACCESS_DENIED
static void cleanup(void)
DWORD WINAPI QueryDosDeviceW(LPCWSTR lpDeviceName, LPWSTR lpTargetPath, DWORD ucchMax)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI GetFileInformationByHandle(HANDLE hFile, LPBY_HANDLE_FILE_INFORMATION lpFileInformation)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD dwFileAttributes)
BOOL WINAPI SetEndOfFile(HANDLE hFile)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
BOOL WINAPI GetVolumeInformationW(IN LPCWSTR lpRootPathName, IN LPWSTR lpVolumeNameBuffer, IN DWORD nVolumeNameSize, OUT LPDWORD lpVolumeSerialNumber OPTIONAL, OUT LPDWORD lpMaximumComponentLength OPTIONAL, OUT LPDWORD lpFileSystemFlags OPTIONAL, OUT LPWSTR lpFileSystemNameBuffer OPTIONAL, IN DWORD nFileSystemNameSize)
BOOL WINAPI DuplicateHandle(IN HANDLE hSourceProcessHandle, IN HANDLE hSourceHandle, IN HANDLE hTargetProcessHandle, OUT LPHANDLE lpTargetHandle, IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwOptions)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
static const WCHAR systemrootW[]
#define FileIdInformation
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
UINT WINAPI GetTempFileNameA(IN LPCSTR lpPathName, IN LPCSTR lpPrefixString, IN UINT uUnique, OUT LPSTR lpTempFileName)
#define FILE_OPEN_BY_FILE_ID
@ FileIdBothDirectoryInformation
@ FileIoCompletionNotificationInformation
@ FileCompletionInformation
@ FileDispositionInformation
@ FileBothDirectoryInformation
#define FILE_OVERWRITE_IF
#define FILE_SUPPORTS_REPARSE_POINTS
#define FILE_SYNCHRONOUS_IO_NONALERT
struct _FILE_FS_ATTRIBUTE_INFORMATION FILE_FS_ATTRIBUTE_INFORMATION
@ FileFsAttributeInformation
@ FileFsVolumeInformation
#define FILE_OPEN_FOR_BACKUP_INTENT
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
GLenum GLenum GLenum GLenum mapping
GLboolean GLboolean GLboolean GLboolean a
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
_Check_return_ _CRTIMP FILE *__cdecl tmpfile(void)
#define OBJ_CASE_INSENSITIVE
#define FILE_SKIP_SET_USER_EVENT_ON_FAST_IO
struct _FILE_ALL_INFORMATION FILE_ALL_INFORMATION
HANDLE WINAPI CreateIoCompletionPort(IN HANDLE FileHandle, IN HANDLE ExistingCompletionPort, IN ULONG_PTR CompletionKey, IN DWORD NumberOfConcurrentThreads)
#define FILE_SKIP_SET_EVENT_ON_HANDLE
#define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS
BOOL WINAPI GetOverlappedResult(IN HANDLE hFile, IN LPOVERLAPPED lpOverlapped, OUT LPDWORD lpNumberOfBytesTransferred, IN BOOL bWait)
BOOL WINAPI GetQueuedCompletionStatus(IN HANDLE CompletionHandle, IN LPDWORD lpNumberOfBytesTransferred, OUT PULONG_PTR lpCompletionKey, OUT LPOVERLAPPED *lpOverlapped, IN DWORD dwMilliseconds)
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
#define FILE_FLAG_OPEN_REPARSE_POINT
#define FILE_FLAG_OVERLAPPED
#define FILE_FLAG_NO_BUFFERING
#define FILE_FLAG_BACKUP_SEMANTICS
#define FILE_FLAG_DELETE_ON_CLOSE
#define ERROR_FILE_NOT_FOUND
static POBJECT_ATTRIBUTES
static char filename[MAX_PATH]
static PWSTR CURDIR *static BOOLEAN
static void test_read_write(void)
static const WCHAR fooW[]
static HINSTANCE hkernel32
static const WCHAR dotW[]
static void append_file_test(void)
static void test_file_both_information(void)
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG PVOID ULONG PVOID ULONG out_size
static void test_file_all_name_information(void)
static void test_file_link_information(void)
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG PVOID ULONG PVOID out_buffer
static void test_query_ea(void)
static void test_file_basic_information(void)
#define IO_COMPLETION_ALL_ACCESS
static HANDLE PIO_APC_ROUTINE PVOID apc_context
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK io
static void test_readonly(void)
static FS_INFORMATION_CLASS
static HANDLE PIO_APC_ROUTINE apc
static void test_file_access_information(void)
static void test_NtCreateFile(void)
static void open_file_test(void)
static HANDLE PIO_APC_ROUTINE void * apc_user
static HANDLE PIO_APC_ROUTINE void PIO_STATUS_BLOCK io_status
static void test_junction_points(void)
static void test_iocompletion(void)
static HANDLE create_temp_file(ULONG flags)
static void test_query_volume_information_file(void)
static void test_query_attribute_information_file(void)
static void create_file_test(void)
static IO_COMPLETION_INFORMATION_CLASS
static void test_iocp_setcompletion(HANDLE h)
static void test_file_name_information(void)
static INT build_reparse_buffer(WCHAR *filename, REPARSE_DATA_BUFFER **pbuffer)
static BOOL is_signaled(HANDLE obj)
static void test_file_disposition_information(void)
static void test_file_rename_information(void)
static ULONG_PTR completionKey
static void delete_object(WCHAR *path)
static PIO_STATUS_BLOCK iosb
static void test_file_completion_information(void)
static ULONG get_pending_msgs(HANDLE h)
static void test_file_full_size_information(void)
static void test_flush_buffers_file(void)
static void test_file_id_information(void)
static void test_ioctl(void)
static FILE_INFORMATION_CLASS
static void delete_file_test(void)
static IO_STATUS_BLOCK ioSb
static BOOL get_msg(HANDLE h)
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG PVOID in_buffer
static ULONG_PTR completionValue
static void test_file_all_information(void)
static void test_iocp_fileio(HANDLE h)
static void read_file_test(void)
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG PVOID ULONG in_size
static void nt_mailslot_test(void)
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
static const char * contents
static int send_buf(SOCKET s, const char *buf, size_t length)
unsigned __int3264 UINT_PTR
@ IoCompletionBasicInformation
HANDLE WINAPI CreateNamedPipeA(LPCSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode, DWORD nMaxInstances, DWORD nOutBufferSize, DWORD nInBufferSize, DWORD nDefaultTimeOut, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
#define FILE_ATTRIBUTE_READONLY
#define FILE_READ_ATTRIBUTES
#define FILE_LIST_DIRECTORY
#define FILE_ATTRIBUTE_HIDDEN
#define FILE_ATTRIBUTE_SYSTEM
NTSYSAPI NTSTATUS NTAPI NtSetInformationFile(IN HANDLE hFile, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN PVOID FileInformationBuffer, IN ULONG FileInformationBufferLength, IN FILE_INFORMATION_CLASS FileInfoClass)
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_SHARE_DELETE
#define FILE_WRITE_ATTRIBUTES
#define FILE_ATTRIBUTE_ARCHIVE
#define FILE_ATTRIBUTE_DIRECTORY
NTSYSAPI NTSTATUS NTAPI NtFsControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
#define FILE_ATTRIBUTE_REPARSE_POINT
#define FileFsFullSizeInformation
#define STATUS_OBJECT_PATH_SYNTAX_BAD
#define STATUS_NO_EAS_ON_FILE
#define STATUS_PIPE_BROKEN
#define STATUS_ACCESS_VIOLATION
#define STATUS_INVALID_INFO_CLASS
#define FSCTL_GET_REPARSE_POINT
#define FSCTL_SET_REPARSE_POINT
#define FSCTL_DELETE_REPARSE_POINT
struct _FILE_FS_VOLUME_INFORMATION FILE_FS_VOLUME_INFORMATION
#define FileAccessInformation
#define STATUS_CANNOT_DELETE
#define STATUS_END_OF_FILE
struct _REPARSE_DATA_BUFFER REPARSE_DATA_BUFFER
#define STATUS_BUFFER_OVERFLOW
struct _REPARSE_DATA_BUFFER * PREPARSE_DATA_BUFFER
NTSTATUS NTAPI NtReadFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, PVOID Buffer, ULONG Length, PLARGE_INTEGER ByteOffset, PULONG Key)
struct _REPARSE_DATA_BUFFER::@313::@315 SymbolicLinkReparseBuffer
USHORT SubstituteNameLength
struct _REPARSE_DATA_BUFFER::@313::@317 GenericReparseBuffer
_ANONYMOUS_UNION union _REPARSE_DATA_BUFFER::@4093 DUMMYUNIONNAME
USHORT SubstituteNameOffset
struct _REPARSE_DATA_BUFFER::@313::@316 MountPointReparseBuffer
DWORD WINAPI SleepEx(IN DWORD dwMilliseconds, IN BOOL bAlertable)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
#define FIELD_OFFSET(t, f)
#define STATUS_DIRECTORY_NOT_EMPTY
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_FILE_IS_A_DIRECTORY
#define STATUS_ACCESS_DENIED
#define STATUS_OBJECT_PATH_NOT_FOUND
#define STATUS_INVALID_PARAMETER
#define STATUS_OBJECT_NAME_COLLISION
#define STATUS_INVALID_USER_BUFFER
#define STATUS_INFO_LENGTH_MISMATCH
#define STATUS_SHARING_VIOLATION
#define STATUS_OBJECT_NAME_INVALID
#define STATUS_OBJECT_NAME_NOT_FOUND
#define INVALID_FILE_ATTRIBUTES
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
_Must_inspect_result_ _In_opt_ WDFKEY _In_ PCUNICODE_STRING _In_ ACCESS_MASK _In_ ULONG CreateOptions
#define success(from, fromstr, to, tostr)
#define PIPE_ACCESS_INBOUND
DWORD WINAPI GetLastError(void)
#define PIPE_READMODE_MESSAGE
#define PIPE_TYPE_MESSAGE
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
LPWSTR WINAPI CharLowerW(_Inout_ LPWSTR)
#define REPARSE_GUID_DATA_BUFFER_HEADER_SIZE
#define IO_REPARSE_TAG_MOUNT_POINT
#define DUPLICATE_SAME_ACCESS