34#define WIN32_NO_STATUS
42#ifndef IO_COMPLETION_ALL_ACCESS
43#define IO_COMPLETION_ALL_ACCESS 0x001F0003
57static NTSTATUS (
WINAPI *pNtCreateFile)(
PHANDLE,
ACCESS_MASK,
POBJECT_ATTRIBUTES,
PIO_STATUS_BLOCK,
PLARGE_INTEGER,
ULONG,
ULONG,
ULONG,
ULONG,
PVOID,
ULONG);
113#define CVALUE_FIRST 0xfffabbcc
114#define CKEY_FIRST 0x1030341
115#define CKEY_SECOND 0x132E46
125 ok( req ==
sizeof(
a),
"Unexpected response size: %lx\n", req );
133 trace(
"apc called block %p iosb.status %lx iosb.info %Iu\n",
141 static const WCHAR systemrootW[] = {
'\\',
'S',
'y',
's',
't',
'e',
'm',
'R',
'o',
'o',
't',
142 '\\',
'f',
'a',
'i',
'l',
'i',
'n',
'g',0};
143 static const WCHAR questionmarkInvalidNameW[] = {
'a',
'f',
'i',
'l',
'e',
'?',0};
144 static const WCHAR pipeInvalidNameW[] = {
'a',
'|',
'b',0};
145 static const WCHAR pathInvalidNtW[] = {
'\\',
'\\',
'?',
'\\',0};
146 static const WCHAR pathInvalidNt2W[] = {
'\\',
'?',
'?',
'\\',0};
147 static const WCHAR pathInvalidDosW[] = {
'\\',
'D',
'o',
's',
'D',
'e',
'v',
'i',
'c',
'e',
's',
'\\',0};
148 static const char testdata[] =
"Hello World";
163 attr.RootDirectory = 0;
167 attr.SecurityQualityOfService =
NULL;
174 io.Status = 0xdeadbeef;
183 "expected STATUS_INVALID_DEVICE_REQUEST, got %08lx\n",
io.Status );
186 io.Status = 0xdeadbeef;
196 "expected STATUS_INVALID_DEVICE_REQUEST, got %08lx\n",
io.Status );
253 pRtlFreeUnicodeString( &
nameW );
261 attr.SecurityQualityOfService =
NULL;
270 pRtlDosPathNameToNtPathName_U(questionmarkInvalidNameW, &
nameW,
NULL,
NULL);
283 pRtlFreeUnicodeString(&
nameW);
285 pRtlDosPathNameToNtPathName_U(pipeInvalidNameW, &
nameW,
NULL,
NULL);
298 pRtlFreeUnicodeString(&
nameW);
300 pRtlInitUnicodeString( &
nameW, pathInvalidNtW );
311 pRtlInitUnicodeString( &
nameW, pathInvalidNt2W );
322 pRtlInitUnicodeString( &
nameW, pathInvalidDosW );
336 static const WCHAR testdirW[] = {
'o',
'p',
'e',
'n',
'f',
'i',
'l',
'e',
't',
'e',
's',
't',0};
337 static const char testdata[] =
"Hello World";
352 attr.RootDirectory = 0;
356 attr.SecurityQualityOfService =
NULL;
360 pRtlFreeUnicodeString( &
nameW );
367 pRtlFreeUnicodeString( &
nameW );
406 attr.RootDirectory = 0;
417 pRtlFreeUnicodeString( &
nameW );
426 pRtlFreeUnicodeString( &
nameW );
436 pRtlFreeUnicodeString( &
nameW );
447 pRtlFreeUnicodeString( &
nameW );
452 numbytes = 0xdeadbeef;
455 ok( numbytes ==
sizeof(
testdata) - 1,
"failed to write all data\n" );
467 if (!
info->FileId.QuadPart)
continue;
516 attr.RootDirectory = 0;
520 attr.SecurityQualityOfService =
NULL;
524 pRtlFreeUnicodeString( &
nameW );
526 numbytes = 0xdeadbeef;
530 ok( numbytes ==
sizeof(
testdata) - 1,
"failed to read all data\n" );
540 "expected STATUS_OBJECT_PATH_NOT_FOUND, got %08lx\n",
status );
551 ok( numbytes ==
sizeof(
testdata) - 1,
"SetFilePointer returned %lu\n", numbytes );
553 ok( numbytes == 0,
"SetFilePointer returned %lu\n", numbytes );
555 numbytes = 0xdeadbeef;
559 ok( numbytes ==
sizeof(
testdata) - 1,
"failed to read all data\n" );
563 ok( numbytes ==
sizeof(
testdata) - 1,
"SetFilePointer returned %lu\n", numbytes );
565 ok( numbytes ==
sizeof(
testdata) - 1,
"SetFilePointer returned %lu\n", numbytes );
580 static const WCHAR testdirW[] = {
'n',
't',
'd',
'e',
'l',
'e',
't',
'e',
'f',
'i',
'l',
'e',0};
581 static const WCHAR subdirW[] = {
'\\',
's',
'u',
'b',0};
586 ok(0,
"couldn't get temp dir\n");
591 ok(0,
"MAX_PATH exceeded in constructing paths\n");
600 ok(
ret ==
TRUE,
"couldn't create directory ntdeletefile\n");
603 ok(0,
"RtlDosPathNametoNtPathName_U failed\n");
608 attr.RootDirectory = 0;
612 attr.SecurityQualityOfService =
NULL;
618 ok(
ret ==
FALSE,
"expected to fail removing directory, NtDeleteFile should have removed it\n");
622 ok(
ret ==
TRUE,
"couldn't create directory ntdeletefile ?!\n");
624 ok(
ret ==
TRUE,
"couldn't create directory subdir\n");
628 ok(
ret ==
TRUE,
"expected to remove directory ntdeletefile\\sub\n");
630 ok(
ret ==
TRUE,
"expected to remove directory ntdeletefile, NtDeleteFile failed.\n");
632 pRtlFreeUnicodeString( &
nameW );
635#define TEST_OVERLAPPED_READ_SIZE 4096
640 const char text[] =
"foobar";
657 "wrong status %lx.\n",
status );
674 "wrong status %lx.\n",
status);
690 "expected STATUS_PENDING, got %#lx\n",
status);
713 "wrong status %lx\n",
status );
763 aligned_buffer,
sizeof(aligned_buffer), &
offset,
NULL);
766 "Wrong status %lx.\n",
status);
781 aligned_buffer,
sizeof(aligned_buffer), &
offset,
NULL);
797 static const char text[6] =
"foobar";
834 ok(
ret == 4,
"expected 4, got %lu\n",
ret);
845 ok(
ret == 6,
"expected 6, got %lu\n",
ret);
880 ok(
memcmp(
buf,
"barbar", 6) == 0,
"wrong file contents: %s\n",
buf);
894 ULONG MaxMessageSize;
899 WCHAR buffer1[] = {
'\\',
'?',
'?',
'\\',
'M',
'A',
'I',
'L',
'S',
'L',
'O',
'T',
'\\',
900 'R',
':',
'\\',
'F',
'R',
'E',
'D',
'\0' };
904 pRtlInitUnicodeString(&
str, buffer1);
917 "rc = %lx not STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER\n", rc);
922 hslot = (
HANDLE)0xdeadbeef;
928 "rc = %lx not STATUS_SUCCESS or STATUS_INVALID_PARAMETER\n", rc);
929 ok( hslot != 0,
"Handle is invalid\n");
941 ok( hslot != 0,
"Handle is invalid\n");
943 rc = pNtClose(hslot);
966 if (!pNtSetIoCompletionEx)
968 win_skip(
"NtSetIoCompletionEx() is unavailable.\n");
978 res = pNtSetIoCompletion( h2, 123, 456, 789,
size );
990 res = pNtSetIoCompletion(
h, 123, 456, 789,
size );
1014 res = pNtSetIoCompletion(
h, 123, 456, 789,
size );
1031 ok(
count == 1,
"Unexpected msg count: %ld\n",
count );
1043 if (!pNtRemoveIoCompletionEx)
1045 skip(
"NtRemoveIoCompletionEx() not present\n");
1055 res = pNtSetIoCompletion(
h, 123, 456, 789,
size );
1062 ok(
info[0].CompletionKey == 123,
"wrong key %#Ix\n",
info[0].CompletionKey );
1063 ok(
info[0].CompletionValue == 456,
"wrong value %#Ix\n",
info[0].CompletionValue );
1065 info[0].IoStatusBlock.Information );
1068 res = pNtSetIoCompletion(
h, 123, 456, 789,
size );
1071 res = pNtSetIoCompletion(
h, 12, 34, 56,
size );
1078 ok(
info[0].CompletionKey == 123,
"wrong key %#Ix\n",
info[0].CompletionKey );
1079 ok(
info[0].CompletionValue == 456,
"wrong value %#Ix\n",
info[0].CompletionValue );
1081 info[0].IoStatusBlock.Information );
1083 ok(
info[1].CompletionKey == 12,
"wrong key %#Ix\n",
info[1].CompletionKey );
1084 ok(
info[1].CompletionValue == 34,
"wrong value %#Ix\n",
info[1].CompletionValue );
1086 info[1].IoStatusBlock.Information );
1089 res = pNtSetIoCompletion(
h, 123, 456, 789,
size );
1092 res = pNtSetIoCompletion(
h, 12, 34, 56,
size );
1099 ok(
info[0].CompletionKey == 123,
"wrong key %#Ix\n",
info[0].CompletionKey );
1100 ok(
info[0].CompletionValue == 456,
"wrong value %#Ix\n",
info[0].CompletionValue );
1102 info[0].IoStatusBlock.Information );
1109 ok(
info[0].CompletionKey == 12,
"wrong key %#Ix\n",
info[0].CompletionKey );
1110 ok(
info[0].CompletionValue == 34,
"wrong value %#Ix\n",
info[0].CompletionValue );
1112 info[0].IoStatusBlock.Information );
1132 res = pNtSetIoCompletion(
h, 123, 456, 789,
size );
1147 static const char pipe_name[] =
"\\\\.\\pipe\\iocompletiontestnamedpipe";
1170 4, 1024, 1024, 1000,
NULL );
1186 4, 1024, 1024, 1000,
NULL );
1213 "Receive buffer (%02x %02x %02x) did not match send buffer (%02x %02x %02x)\n",
1225 ok(
count == 1,
"Unexpected msg count: %ld\n",
count );
1234 "Receive buffer (%02x %02x) did not match send buffer (%02x %02x)\n",
1240 ok(
count == 1,
"Unexpected msg count: %ld\n",
count );
1254 4, 1024, 1024, 1000,
NULL );
1282 "Receive buffer (%02x %02x %02x) did not match send buffer (%02x %02x %02x)\n",
1298 4, 1024, 1024, 1000,
NULL );
1350 memset(&ffsi,0,
sizeof(ffsi));
1351 memset(&fsi,0,
sizeof(fsi));
1361 "[fsi] TotalAllocationUnits expected positive, got 0x%s\n",
1364 "[fsi] AvailableAllocationUnits expected positive, got 0x%s\n",
1372 "[ffsi] TotalAllocationUnits expected positive, got negative value 0x%s\n",
1375 "[ffsi] CallerAvailableAllocationUnits expected positive, got negative value 0x%s\n",
1378 "[ffsi] ActualAvailableAllocationUnits expected positive, got negative value 0x%s\n",
1381 "[ffsi] TotalAllocationUnits error fsi:0x%s, ffsi:0x%s\n",
1403 memset(&fbi, 0,
sizeof(fbi));
1409 memset(&fbi2, 0,
sizeof(fbi2));
1411 io.Status = 0xdeadbeef;
1416 memset(&fbi2, 0,
sizeof(fbi2));
1418 io.Status = 0xdeadbeef;
1426 "access time mismatch, set: %s get: %s\n",
1430 memset(&fbi2, 0,
sizeof(fbi2));
1437 memset(&fbi2, 0,
sizeof(fbi2));
1438 io.Status = 0xdeadbeef;
1443 memset(&fbi2, 0,
sizeof(fbi2));
1452 memset(&fbi, 0,
sizeof(fbi));
1454 io.Status = 0xdeadbeef;
1457 ok (
io.Status ==
STATUS_SUCCESS,
"can't set system attribute, io.Status is %lx\n",
io.Status );
1459 memset(&fbi, 0,
sizeof(fbi));
1465 memset(&fbi, 0,
sizeof(fbi));
1467 io.Status = 0xdeadbeef;
1470 ok (
io.Status ==
STATUS_SUCCESS,
"can't set hidden attribute, io.Status is %lx\n",
io.Status );
1472 memset(&fbi, 0,
sizeof(fbi));
1478 memset(&fbi, 0,
sizeof(fbi));
1480 io.Status = 0xdeadbeef;
1483 ok (
io.Status ==
STATUS_SUCCESS,
"can't set normal attribute, io.Status is %lx\n",
io.Status );
1485 memset(&fbi, 0,
sizeof(fbi));
1514 "attribute %lx not expected\n", fai_buf.fai.BasicInformation.FileAttributes );
1518 memset(&fai_buf.fai.BasicInformation, 0,
sizeof(fai_buf.fai.BasicInformation));
1520 io.Status = 0xdeadbeef;
1523 todo_wine ok (
io.Status == 0xdeadbeef,
"shouldn't be able to set FileAllInformation, io.Status is %lx\n",
io.Status);
1524 io.Status = 0xdeadbeef;
1525 res = pNtSetInformationFile(
h, &
io, &fai_buf.fai.BasicInformation,
sizeof fai_buf.fai.BasicInformation,
FileBasicInformation);
1529 memset(&fai_buf.fai, 0,
sizeof(fai_buf.fai));
1532 ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) ==
FILE_ATTRIBUTE_SYSTEM,
"attribute %lx not FILE_ATTRIBUTE_SYSTEM\n", fai_buf.fai.BasicInformation.FileAttributes );
1535 memset(&fai_buf.fai.BasicInformation, 0,
sizeof(fai_buf.fai.BasicInformation));
1537 io.Status = 0xdeadbeef;
1538 res = pNtSetInformationFile(
h, &
io, &fai_buf.fai.BasicInformation,
sizeof fai_buf.fai.BasicInformation,
FileBasicInformation);
1542 memset(&fai_buf.fai, 0,
sizeof(fai_buf.fai));
1545 ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) ==
FILE_ATTRIBUTE_HIDDEN,
"attribute %lx not FILE_ATTRIBUTE_HIDDEN\n", fai_buf.fai.BasicInformation.FileAttributes );
1548 memset(&fai_buf.fai.BasicInformation, 0,
sizeof(fai_buf.fai.BasicInformation));
1550 io.Status = 0xdeadbeef;
1551 res = pNtSetInformationFile(
h, &
io, &fai_buf.fai.BasicInformation,
sizeof fai_buf.fai.BasicInformation,
FileBasicInformation);
1555 memset(&fai_buf.fai, 0,
sizeof(fai_buf.fai));
1558 todo_wine ok ( (fai_buf.fai.BasicInformation.FileAttributes & attrib_mask) ==
FILE_ATTRIBUTE_NORMAL,
"attribute %lx not FILE_ATTRIBUTE_NORMAL\n", fai_buf.fai.BasicInformation.FileAttributes );
1579 static const WCHAR foo_txtW[] = {
'\\',
'f',
'o',
'o',
'.',
't',
'x',
't',0};
1580 static const WCHAR fooW[] = {
'f',
'o',
'o',0};
1594 ok(
res != 0,
"failed to create temp file\n" );
1599 ok(
res != 0,
"failed to create temp file\n" );
1600 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1607 pRtlFreeUnicodeString( &name_str );
1609 io.Status = 0xdeadbeef;
1614 win_skip(
"FileRenameInformationEx not supported\n" );
1624 ok( fileDeleted,
"file should not exist\n" );
1626 ok( !fileDeleted,
"file should exist\n" );
1643 ok(
res != 0,
"failed to create temp file\n" );
1648 ok(
res != 0,
"failed to create temp file\n" );
1649 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1655 pRtlFreeUnicodeString( &name_str );
1657 io.Status = 0xdeadbeef;
1659 todo_wine ok(
io.Status == 0xdeadbeef,
"io.Status expected 0xdeadbeef, got %lx\n",
io.Status );
1662 ok( !fileDeleted,
"file should exist\n" );
1664 ok( !fileDeleted,
"file should exist\n" );
1673 ok(
res != 0,
"failed to create temp file\n" );
1678 ok(
res != 0,
"failed to create temp file\n" );
1679 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1685 pRtlFreeUnicodeString( &name_str );
1687 io.Status = 0xdeadbeef;
1692 ok( fileDeleted,
"file should not exist\n" );
1694 ok( !fileDeleted,
"file should exist\n" );
1703 ok(
res != 0,
"failed to create temp file\n" );
1708 ok(
res != 0,
"failed to create temp file\n" );
1712 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1718 pRtlFreeUnicodeString( &name_str );
1720 io.Status = 0xdeadbeef;
1722 todo_wine ok(
io.Status == 0xdeadbeef,
"io.Status expected 0xdeadbeef, got %lx\n",
io.Status );
1725 ok( !fileDeleted,
"file should exist\n" );
1727 ok( !fileDeleted,
"file should exist\n" );
1737 ok(
res != 0,
"failed to create temp file\n" );
1742 ok(
res != 0,
"failed to create temp file\n" );
1746 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1752 pRtlFreeUnicodeString( &name_str );
1754 io.Status = 0xdeadbeef;
1756 todo_wine ok(
io.Status == 0xdeadbeef,
"io.Status expected 0xdeadbeef, got %lx\n",
io.Status );
1759 ok( !fileDeleted,
"file should exist\n" );
1761 ok( !fileDeleted,
"file should exist\n" );
1771 ok(
res != 0,
"failed to create temp file\n" );
1774 ok(
success != 0,
"failed to create temp directory\n" );
1779 ok(
res != 0,
"failed to create temp file\n" );
1780 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1787 pRtlFreeUnicodeString( &name_str );
1789 io.Status = 0xdeadbeef;
1794 ok( fileDeleted,
"file should not exist\n" );
1796 ok( !fileDeleted,
"file should exist\n" );
1813 ok(
res != 0,
"failed to create temp file\n" );
1816 ok(
success != 0,
"failed to create temp directory\n" );
1826 ok(
res != 0,
"failed to create temp file\n" );
1827 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1834 pRtlFreeUnicodeString( &name_str );
1836 io.Status = 0xdeadbeef;
1841 todo_wine ok( !fileDeleted,
"file should exist\n" );
1843 todo_wine ok( fileDeleted,
"file should not exist\n" );
1859 ok(
res != 0,
"failed to create temp file\n" );
1862 ok(
success != 0,
"failed to create temp directory\n" );
1867 ok(
res != 0,
"failed to create temp file\n" );
1868 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1874 pRtlFreeUnicodeString( &name_str );
1876 io.Status = 0xdeadbeef;
1881 ok( !fileDeleted,
"file should exist\n" );
1883 ok( !fileDeleted,
"file should exist\n" );
1892 ok(
res != 0,
"failed to create temp file\n" );
1895 ok(
success != 0,
"failed to create temp directory\n" );
1900 ok(
res != 0,
"failed to create temp file\n" );
1904 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1910 pRtlFreeUnicodeString( &name_str );
1912 io.Status = 0xdeadbeef;
1917 ok( !fileDeleted,
"file should exist\n" );
1919 ok( !fileDeleted,
"file should exist\n" );
1929 ok(
res != 0,
"failed to create temp file\n" );
1932 ok(
success != 0,
"failed to create temp directory\n" );
1937 ok(
res != 0,
"failed to create temp file\n" );
1938 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1944 pRtlFreeUnicodeString( &name_str );
1946 io.Status = 0xdeadbeef;
1951 ok( fileDeleted,
"file should not exist\n" );
1953 ok( !fileDeleted,
"file should exist\n" );
1962 ok(
res != 0,
"failed to create temp file\n" );
1965 ok(
success != 0,
"failed to create temp directory\n" );
1970 ok(
res != 0,
"failed to create temp file\n" );
1974 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
1980 pRtlFreeUnicodeString( &name_str );
1982 io.Status = 0xdeadbeef;
1987 ok( !fileDeleted,
"file should exist\n" );
1989 ok( !fileDeleted,
"file should exist\n" );
1999 ok(
res != 0,
"failed to create temp file\n" );
2002 ok(
success != 0,
"failed to create temp directory\n" );
2007 ok(
res != 0,
"failed to create temp file\n" );
2010 ok(
success != 0,
"failed to create temp directory\n" );
2011 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2017 pRtlFreeUnicodeString( &name_str );
2019 io.Status = 0xdeadbeef;
2024 ok( !fileDeleted,
"file should exist\n" );
2026 ok( !fileDeleted,
"file should exist\n" );
2035 ok(
res != 0,
"failed to create temp file\n" );
2038 ok(
success != 0,
"failed to create temp directory\n" );
2043 ok(
res != 0,
"failed to create temp file\n" );
2046 ok(
success != 0,
"failed to create temp directory\n" );
2047 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2053 pRtlFreeUnicodeString( &name_str );
2055 io.Status = 0xdeadbeef;
2060 ok( !fileDeleted,
"file should exist\n" );
2062 ok( !fileDeleted,
"file should exist\n" );
2071 ok(
res != 0,
"failed to create temp file\n" );
2074 ok(
success != 0,
"failed to create temp directory\n" );
2079 ok(
res != 0,
"failed to create temp file\n" );
2082 ok(
success != 0,
"failed to create temp directory\n" );
2086 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2092 pRtlFreeUnicodeString( &name_str );
2094 io.Status = 0xdeadbeef;
2099 ok( !fileDeleted,
"file should exist\n" );
2101 ok( !fileDeleted,
"file should exist\n" );
2111 ok(
res != 0,
"failed to create temp file\n" );
2116 ok(
res != 0,
"failed to create temp file\n" );
2119 ok(
success != 0,
"failed to create temp directory\n" );
2120 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2126 pRtlFreeUnicodeString( &name_str );
2128 io.Status = 0xdeadbeef;
2130 todo_wine ok(
io.Status == 0xdeadbeef,
"io.Status expected 0xdeadbeef, got %lx\n",
io.Status );
2133 ok( !fileDeleted,
"file should exist\n" );
2135 ok( !fileDeleted,
"file should exist\n" );
2144 ok(
res != 0,
"failed to create temp file\n" );
2149 ok(
res != 0,
"failed to create temp file\n" );
2152 ok(
success != 0,
"failed to create temp directory\n" );
2153 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2159 pRtlFreeUnicodeString( &name_str );
2161 io.Status = 0xdeadbeef;
2163 todo_wine ok(
io.Status == 0xdeadbeef,
"io.Status expected 0xdeadbeef, got %lx\n",
io.Status );
2166 ok( !fileDeleted,
"file should exist\n" );
2168 ok( !fileDeleted,
"file should exist\n" );
2177 ok(
res != 0,
"failed to create temp file\n" );
2182 ok(
res != 0,
"failed to create temp file\n" );
2195 io.Status = 0xdeadbeef;
2200 ok( fileDeleted,
"file should not exist\n" );
2202 ok( !fileDeleted,
"file should exist\n" );
2220 ok(
res != 0,
"failed to create temp file\n" );
2224 pRtlDosPathNameToNtPathName_U( oldpath, &name_str,
NULL,
NULL );
2230 pRtlFreeUnicodeString( &name_str );
2232 io.Status = 0xdeadbeef;
2245 static const WCHAR fooW[] = {
'f',
'o',
'o',0};
2258 ok(
res != 0,
"failed to create temp file\n" );
2263 ok(
res != 0,
"failed to create temp file\n" );
2268 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2274 pRtlFreeUnicodeString( &name_str );
2276 io.Status = 0xdeadbeef;
2281 win_skip(
"FileRenameInformationEx not supported\n" );
2288 todo_wine ok(
io.Status == 0xdeadbeef,
"io.Status expected 0xdeadbeef, got %lx\n",
io.Status );
2291 ok( !fileDeleted,
"file should exist\n" );
2293 ok( !fileDeleted,
"file should exist\n" );
2302 ok(
res != 0,
"failed to create temp file\n" );
2307 ok(
res != 0,
"failed to create temp file\n" );
2312 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2318 pRtlFreeUnicodeString( &name_str );
2320 io.Status = 0xdeadbeef;
2323 "io.Status expected STATUS_SUCCESS or 0xdeadbeef, got %lx\n",
io.Status );
2325 "res expected STATUS_SUCCESS or STATUS_NOT_SUPPORTED, got %lx\n",
res );
2330 ok( fileDeleted,
"file should not exist\n" );
2332 ok( !fileDeleted,
"file should exist\n" );
2343 static const WCHAR foo_txtW[] = {
'\\',
'f',
'o',
'o',
'.',
't',
'x',
't',0};
2344 static const WCHAR fooW[] = {
'f',
'o',
'o',0};
2359 ok(
res != 0,
"failed to create temp file\n" );
2364 ok(
res != 0,
"failed to create temp file\n" );
2365 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2372 pRtlFreeUnicodeString( &name_str );
2374 io.Status = 0xdeadbeef;
2379 win_skip(
"FileLinkInformationEx not supported\n" );
2389 ok( !fileDeleted,
"file should exist\n" );
2391 ok( !fileDeleted,
"file should exist\n" );
2408 ok(
res != 0,
"failed to create temp file\n" );
2413 ok(
res != 0,
"failed to create temp file\n" );
2414 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2420 pRtlFreeUnicodeString( &name_str );
2422 io.Status = 0xdeadbeef;
2424 todo_wine ok(
io.Status == 0xdeadbeef,
"io.Status expected 0xdeadbeef, got %lx\n",
io.Status );
2427 ok( !fileDeleted,
"file should exist\n" );
2429 ok( !fileDeleted,
"file should exist\n" );
2438 ok(
res != 0,
"failed to create temp file\n" );
2443 ok(
res != 0,
"failed to create temp file\n" );
2444 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2450 pRtlFreeUnicodeString( &name_str );
2452 io.Status = 0xdeadbeef;
2457 ok( !fileDeleted,
"file should exist\n" );
2459 ok( !fileDeleted,
"file should exist\n" );
2468 ok(
res != 0,
"failed to create temp file\n" );
2473 ok(
res != 0,
"failed to create temp file\n" );
2474 wcsrchr( newpath,
'\\' )[1] =
'F';
2475 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2481 pRtlFreeUnicodeString( &name_str );
2483 io.Status = 0xdeadbeef;
2488 ok( !fileDeleted,
"file should exist\n" );
2490 ok( !fileDeleted,
"file should exist\n" );
2508 ok(
res != 0,
"failed to create temp file\n" );
2513 ok(
res != 0,
"failed to create temp file\n" );
2517 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2523 pRtlFreeUnicodeString( &name_str );
2525 io.Status = 0xdeadbeef;
2527 todo_wine ok(
io.Status == 0xdeadbeef,
"io.Status expected 0xdeadbeef, got %lx\n",
io.Status );
2530 ok( !fileDeleted,
"file should exist\n" );
2532 ok( !fileDeleted,
"file should exist\n" );
2542 ok(
res != 0,
"failed to create temp file\n" );
2547 ok(
res != 0,
"failed to create temp file\n" );
2551 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2557 pRtlFreeUnicodeString( &name_str );
2559 io.Status = 0xdeadbeef;
2561 todo_wine ok(
io.Status == 0xdeadbeef,
"io.Status expected 0xdeadbeef, got %lx\n",
io.Status );
2564 ok( !fileDeleted,
"file should exist\n" );
2566 ok( !fileDeleted,
"file should exist\n" );
2576 ok(
res != 0,
"failed to create temp file\n" );
2579 ok(
success != 0,
"failed to create temp directory\n" );
2584 ok(
res != 0,
"failed to create temp file\n" );
2585 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2592 pRtlFreeUnicodeString( &name_str );
2594 io.Status = 0xdeadbeef;
2597 "io.Status expected 0xdeadbeef or STATUS_FILE_IS_A_DIRECTORY, got %lx\n",
io.Status );
2600 ok( !fileDeleted,
"file should exist\n" );
2602 ok( fileDeleted,
"file should not exist\n" );
2619 ok(
res != 0,
"failed to create temp file\n" );
2622 ok(
success != 0,
"failed to create temp directory\n" );
2632 ok(
res != 0,
"failed to create temp file\n" );
2633 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2640 pRtlFreeUnicodeString( &name_str );
2642 io.Status = 0xdeadbeef;
2645 "io.Status expected 0xdeadbeef or STATUS_FILE_IS_A_DIRECTORY, got %lx\n",
io.Status );
2648 ok( !fileDeleted,
"file should exist\n" );
2650 ok( fileDeleted,
"file should not exist\n" );
2660 ok(
res != 0,
"failed to create temp file\n" );
2663 ok(
success != 0,
"failed to create temp directory\n" );
2668 ok(
res != 0,
"failed to create temp file\n" );
2669 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2675 pRtlFreeUnicodeString( &name_str );
2677 io.Status = 0xdeadbeef;
2680 "io.Status expected 0xdeadbeef or STATUS_FILE_IS_A_DIRECTORY, got %lx\n",
io.Status );
2682 "res expected STATUS_OBJECT_NAME_COLLISION or STATUS_FILE_IS_A_DIRECTORY, got %lx\n",
res );
2684 ok( !fileDeleted,
"file should exist\n" );
2686 ok( !fileDeleted,
"file should exist\n" );
2695 ok(
res != 0,
"failed to create temp file\n" );
2698 ok(
success != 0,
"failed to create temp directory\n" );
2703 ok(
res != 0,
"failed to create temp file\n" );
2707 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2713 pRtlFreeUnicodeString( &name_str );
2715 io.Status = 0xdeadbeef;
2718 "io.Status expected 0xdeadbeef or STATUS_FILE_IS_A_DIRECTORY, got %lx\n",
io.Status );
2720 "res expected STATUS_OBJECT_NAME_COLLISION or STATUS_FILE_IS_A_DIRECTORY, got %lx\n",
res );
2722 ok( !fileDeleted,
"file should exist\n" );
2724 ok( !fileDeleted,
"file should exist\n" );
2734 ok(
res != 0,
"failed to create temp file\n" );
2737 ok(
success != 0,
"failed to create temp directory\n" );
2742 ok(
res != 0,
"failed to create temp file\n" );
2743 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2749 pRtlFreeUnicodeString( &name_str );
2751 io.Status = 0xdeadbeef;
2754 "io.Status expected 0xdeadbeef or STATUS_FILE_IS_A_DIRECTORY, got %lx\n",
io.Status );
2757 ok( !fileDeleted,
"file should exist\n" );
2759 ok( !fileDeleted,
"file should exist\n" );
2768 ok(
res != 0,
"failed to create temp file\n" );
2771 ok(
success != 0,
"failed to create temp directory\n" );
2776 ok(
res != 0,
"failed to create temp file\n" );
2780 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2786 pRtlFreeUnicodeString( &name_str );
2788 io.Status = 0xdeadbeef;
2791 "io.Status expected 0xdeadbeef or STATUS_FILE_IS_A_DIRECTORY, got %lx\n",
io.Status );
2794 ok( !fileDeleted,
"file should exist\n" );
2796 ok( !fileDeleted,
"file should exist\n" );
2806 ok(
res != 0,
"failed to create temp file\n" );
2809 ok(
success != 0,
"failed to create temp directory\n" );
2814 ok(
res != 0,
"failed to create temp file\n" );
2817 ok(
success != 0,
"failed to create temp directory\n" );
2818 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2824 pRtlFreeUnicodeString( &name_str );
2826 io.Status = 0xdeadbeef;
2829 "io.Status expected 0xdeadbeef or STATUS_FILE_IS_A_DIRECTORY, got %lx\n",
io.Status );
2831 "res expected STATUS_OBJECT_NAME_COLLISION or STATUS_FILE_IS_A_DIRECTORY, got %lx\n",
res );
2833 ok( !fileDeleted,
"file should exist\n" );
2835 ok( !fileDeleted,
"file should exist\n" );
2844 ok(
res != 0,
"failed to create temp file\n" );
2847 ok(
success != 0,
"failed to create temp directory\n" );
2852 ok(
res != 0,
"failed to create temp file\n" );
2855 ok(
success != 0,
"failed to create temp directory\n" );
2856 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2862 pRtlFreeUnicodeString( &name_str );
2864 io.Status = 0xdeadbeef;
2867 "io.Status expected 0xdeadbeef or STATUS_FILE_IS_A_DIRECTORY, got %lx\n",
io.Status );
2870 ok( !fileDeleted,
"file should exist\n" );
2872 ok( !fileDeleted,
"file should exist\n" );
2881 ok(
res != 0,
"failed to create temp file\n" );
2884 ok(
success != 0,
"failed to create temp directory\n" );
2889 ok(
res != 0,
"failed to create temp file\n" );
2892 ok(
success != 0,
"failed to create temp directory\n" );
2896 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2902 pRtlFreeUnicodeString( &name_str );
2904 io.Status = 0xdeadbeef;
2907 "io.Status expected 0xdeadbeef or STATUS_FILE_IS_A_DIRECTORY, got %lx\n",
io.Status );
2910 ok( !fileDeleted,
"file should exist\n" );
2912 ok( !fileDeleted,
"file should exist\n" );
2922 ok(
res != 0,
"failed to create temp file\n" );
2927 ok(
res != 0,
"failed to create temp file\n" );
2930 ok(
success != 0,
"failed to create temp directory\n" );
2931 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2937 pRtlFreeUnicodeString( &name_str );
2939 io.Status = 0xdeadbeef;
2941 todo_wine ok(
io.Status == 0xdeadbeef,
"io.Status expected 0xdeadbeef, got %lx\n",
io.Status );
2944 ok( !fileDeleted,
"file should exist\n" );
2946 ok( !fileDeleted,
"file should exist\n" );
2955 ok(
res != 0,
"failed to create temp file\n" );
2960 ok(
res != 0,
"failed to create temp file\n" );
2963 ok(
success != 0,
"failed to create temp directory\n" );
2964 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
2970 pRtlFreeUnicodeString( &name_str );
2972 io.Status = 0xdeadbeef;
2974 todo_wine ok(
io.Status == 0xdeadbeef,
"io.Status expected 0xdeadbeef, got %lx\n",
io.Status );
2977 ok( !fileDeleted,
"file should exist\n" );
2979 ok( !fileDeleted,
"file should exist\n" );
2988 ok(
res != 0,
"failed to create temp file\n" );
2993 ok(
res != 0,
"failed to create temp file\n" );
3006 io.Status = 0xdeadbeef;
3011 ok( !fileDeleted,
"file should exist\n" );
3013 ok( !fileDeleted,
"file should exist\n" );
3031 ok(
res != 0,
"failed to create temp file\n" );
3035 pRtlDosPathNameToNtPathName_U( oldpath, &name_str,
NULL,
NULL );
3041 pRtlFreeUnicodeString( &name_str );
3043 io.Status = 0xdeadbeef;
3045 todo_wine ok(
io.Status == 0xdeadbeef,
"got io status %#lx\n",
io.Status );
3049 io.Status = 0xdeadbeef;
3061 ok(
res != 0,
"failed to create temp file\n" );
3065 wcsrchr( oldpath,
'\\' )[1] =
'F';
3066 pRtlDosPathNameToNtPathName_U( oldpath, &name_str,
NULL,
NULL );
3072 pRtlFreeUnicodeString( &name_str );
3074 io.Status = 0xdeadbeef;
3076 todo_wine ok(
io.Status == 0xdeadbeef,
"got io status %#lx\n",
io.Status );
3080 io.Status = 0xdeadbeef;
3102 static const WCHAR fooW[] = {
'f',
'o',
'o',0};
3115 ok(
res != 0,
"failed to create temp file\n" );
3120 ok(
res != 0,
"failed to create temp file\n" );
3125 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
3131 pRtlFreeUnicodeString( &name_str );
3133 io.Status = 0xdeadbeef;
3138 win_skip(
"FileLinkInformationEx not supported\n" );
3145 todo_wine ok(
io.Status == 0xdeadbeef,
"io.Status expected 0xdeadbeef, got %lx\n",
io.Status );
3148 ok( !fileDeleted,
"file should exist\n" );
3150 ok( !fileDeleted,
"file should exist\n" );
3159 ok(
res != 0,
"failed to create temp file\n" );
3164 ok(
res != 0,
"failed to create temp file\n" );
3169 pRtlDosPathNameToNtPathName_U( newpath, &name_str,
NULL,
NULL );
3175 pRtlFreeUnicodeString( &name_str );
3177 io.Status = 0xdeadbeef;
3182 ok( !fileDeleted,
"file should exist\n" );
3184 ok( !fileDeleted,
"file should exist\n" );
3201 memset(&fbi, 0,
sizeof(fbi));
3220 if (!pRtlDosPathNameToNtPathName_U(
nameW, &nt_name,
NULL,
NULL ))
3224 attr.RootDirectory = 0;
3226 attr.ObjectName = &nt_name;
3228 attr.SecurityQualityOfService =
NULL;
3231 pRtlFreeUnicodeString( &nt_name );
3234 *attrs =
info.FileAttributes;
3267 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
3281 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
3290 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %lx)\n",
res );
3297 ok( fileDeleted,
"File should have been deleted\n" );
3307 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %lx)\n",
res );
3326 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
3329 ok( fileDeleted,
"File should have been deleted\n" );
3346 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
3349 ok( fileDeleted,
"File should have been deleted\n" );
3361 "unexpected FileDispositionInformationEx result (expected STATUS_SUCCESS or SSTATUS_INVALID_INFO_CLASS, got %lx)\n",
res );
3366 ok( fileDeleted,
"File should have been deleted\n" );
3380 "unexpected FileDispositionInformationEx result (expected STATUS_SUCCESS or SSTATUS_INVALID_INFO_CLASS, got %lx)\n",
res );
3383 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
3388 ok( fileDeleted,
"File should have been deleted\n" );
3401 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
3416 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
3431 "unexpected FileDispositionInformationEx result (expected STATUS_SUCCESS or SSTATUS_INVALID_INFO_CLASS, got %lx)\n",
res );
3436 ok( fileDeleted,
"File should have been deleted\n" );
3447 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %lx)\n",
res );
3450 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %lx)\n",
res );
3453 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
3462 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %lx)\n",
res );
3465 ok( fileDeleted,
"File should have been deleted\n" );
3474 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
3477 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %lx)\n",
res );
3480 ok( fileDeleted,
"File should have been deleted\n" );
3490 "unexpected FileDispositionInformationEx result (expected STATUS_SUCCESS or SSTATUS_INVALID_INFO_CLASS, got %lx)\n",
res );
3495 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
3504 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
3508 ok( !fileDeleted,
"File shouldn't have been deleted\n" );
3519 ok( fileDeleted,
"File should have been deleted\n" );
3537 ok( fileDeleted,
"File should have been deleted\n" );
3547 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %lx)\n",
res );
3550 ok( fileDeleted,
"Directory should have been deleted\n" );
3559 ok( !fileDeleted,
"Directory shouldn't have been deleted\n" );
3563 ok( !fileDeleted,
"Directory shouldn't have been deleted\n" );
3576 ok( fileDeleted,
"Directory should have been deleted\n" );
3593 ok( fileDeleted,
"Directory should have been deleted\n" );
3605 ok(
res ==
STATUS_SUCCESS,
"unexpected FileDispositionInformation result (expected STATUS_SUCCESS, got %lx)\n",
res );
3624 ok( !fileDeleted,
"Directory shouldn't have been deleted\n" );
3627 ok( fileDeleted,
"Directory should have been deleted\n" );
3644 ok( !fileDeleted,
"Directory shouldn't have been deleted\n" );
3647 ok( fileDeleted,
"Directory should have been deleted\n" );
3664 ok( !fileDeleted,
"Directory shouldn't have been deleted\n" );
3667 ok( fileDeleted,
"File should have been deleted\n" );
3670 ok( fileDeleted,
"Directory should have been deleted\n" );
3686 ok( fileDeleted,
"File should have been deleted\n" );
3690 ok( !fileDeleted,
"Directory shouldn't have been deleted\n" );
3692 ok( fileDeleted,
"Directory should have been deleted\n" );
3732 ok( !
res,
"expected failure\n" );
3779 ok( !
res,
"expected failure\n" );
3849 ULONG old_redir = 1, tmp;
3850 UINT file_name_size;
3858 if (!pGetVolumePathNameW) {
3859 win_skip(
"GetVolumePathNameW not found\n");
3869 ok(
len == file_name_size - 1,
3870 "GetSystemDirectoryW returned %u, expected %u.\n",
3871 len, file_name_size - 1);
3873 len = pGetVolumePathNameW(
file_name, volume_prefix, file_name_size );
3874 ok(
len,
"GetVolumePathNameW failed.\n");
3877 if (
len && volume_prefix[
len - 1] ==
'\\') --
len;
3882 info_size =
sizeof(*info) + (file_name_size *
sizeof(
WCHAR));
3885 if (pRtlWow64EnableFsRedirectionEx) pRtlWow64EnableFsRedirectionEx(
TRUE, &old_redir );
3889 if (pRtlWow64EnableFsRedirectionEx) pRtlWow64EnableFsRedirectionEx( old_redir, &tmp );
3902 ok(
info->FileName[2] == 0xcccc,
"info->FileName[2] is %#x, expected 0xcccc.\n",
info->FileName[2]);
3904 "info->FileName[1] is %p, expected %p.\n",
3906 ok(
io.Information ==
sizeof(*
info),
"io.Information is %Iu\n",
io.Information);
3913 ok(
info->FileName[
info->FileNameLength /
sizeof(
WCHAR)] == 0xcccc,
"info->FileName[len] is %#x, expected 0xcccc.\n",
3915 info->FileName[
info->FileNameLength /
sizeof(
WCHAR)] =
'\0';
3919 "io.Information is %Iu, expected %lu.\n",
3927 if (old_redir || !pGetSystemWow64DirectoryW || !(file_name_size = pGetSystemWow64DirectoryW(
NULL, 0 )))
3929 skip(
"Not running on WoW64, skipping test.\n");
3944 len = pGetSystemWow64DirectoryW(
file_name, file_name_size );
3945 ok(
len == file_name_size - 1,
3946 "GetSystemWow64DirectoryW returned %u, expected %u.\n",
3947 len, file_name_size - 1);
3949 len = pGetVolumePathNameW(
file_name, volume_prefix, file_name_size );
3950 ok(
len,
"GetVolumePathNameW failed.\n");
3953 if (
len && volume_prefix[
len - 1] ==
'\\') --
len;
3957 info_size =
sizeof(*info) + (file_name_size *
sizeof(
WCHAR));
3963 info->FileName[
info->FileNameLength /
sizeof(
WCHAR)] =
'\0';
3978 ULONG old_redir = 1, tmp;
3979 UINT file_name_size;
3987 if (!pGetVolumePathNameW) {
3988 win_skip(
"GetVolumePathNameW not found\n");
3998 ok(
len == file_name_size - 1,
3999 "GetSystemDirectoryW returned %u, expected %u.\n",
4000 len, file_name_size - 1);
4002 len = pGetVolumePathNameW(
file_name, volume_prefix, file_name_size );
4003 ok(
len,
"GetVolumePathNameW failed.\n");
4006 if (
len && volume_prefix[
len - 1] ==
'\\') --
len;
4011 info_size =
sizeof(*info) + (file_name_size *
sizeof(
WCHAR));
4014 if (pRtlWow64EnableFsRedirectionEx) pRtlWow64EnableFsRedirectionEx(
TRUE, &old_redir );
4018 if (pRtlWow64EnableFsRedirectionEx) pRtlWow64EnableFsRedirectionEx( old_redir, &tmp );
4032 "info->NameInformation.FileNameLength is %lu\n",
info->NameInformation.FileNameLength );
4033 ok(
info->NameInformation.FileName[2] == 0xcccc,
4034 "info->NameInformation.FileName[2] is %#x, expected 0xcccc.\n",
info->NameInformation.FileName[2]);
4036 "info->NameInformation.FileName[1] is %p, expected %p.\n",
4038 ok(
io.Information ==
sizeof(*
info),
"io.Information is %Iu\n",
io.Information);
4045 "info->NameInformation.FileNameLength is %lu\n",
info->NameInformation.FileNameLength );
4046 ok(
info->NameInformation.FileName[
info->NameInformation.FileNameLength /
sizeof(
WCHAR)] == 0xcccc,
4047 "info->NameInformation.FileName[len] is %#x, expected 0xcccc.\n",
4048 info->NameInformation.FileName[
info->NameInformation.FileNameLength /
sizeof(
WCHAR)]);
4049 info->NameInformation.FileName[
info->NameInformation.FileNameLength /
sizeof(
WCHAR)] =
'\0';
4051 "info->NameInformation.FileName is %s, expected %s.\n",
4054 +
info->NameInformation.FileNameLength,
4055 "io.Information is %Iu\n",
io.Information );
4062 if (old_redir || !pGetSystemWow64DirectoryW || !(file_name_size = pGetSystemWow64DirectoryW(
NULL, 0 )))
4064 skip(
"Not running on WoW64, skipping test.\n");
4079 len = pGetSystemWow64DirectoryW(
file_name, file_name_size );
4080 ok(
len == file_name_size - 1,
4081 "GetSystemWow64DirectoryW returned %u, expected %u.\n",
4082 len, file_name_size - 1);
4084 len = pGetVolumePathNameW(
file_name, volume_prefix, file_name_size );
4085 ok(
len,
"GetVolumePathNameW failed.\n");
4088 if (
len && volume_prefix[
len - 1] ==
'\\') --
len;
4092 info_size =
sizeof(*info) + (file_name_size *
sizeof(
WCHAR));
4098 info->NameInformation.FileName[
info->NameInformation.FileNameLength /
sizeof(
WCHAR)] =
'\0';
4099 ok(!
lstrcmpiW(
info->NameInformation.FileName,
expected ),
"info->NameInformation.FileName is %s, expected %s.\n",
4109#define test_completion_flags(a,b) _test_completion_flags(__LINE__,a,b)
4116 info.Flags = 0xdeadbeef;
4121 ok_(__FILE__,
line)(
io.Information ==
sizeof(
info),
"Information = %Iu\n",
io.Information);
4122 ok_(__FILE__,
line)((
info.Flags & expected_flags) == expected_flags,
"got %08lx\n",
info.Flags);
4128 static const char pipe_name[] =
"\\\\.\\pipe\\test_file_completion_information";
4129 static const char buf[] =
"testdata";
4146 "expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n",
status);
4149 win_skip(
"FileIoCompletionNotificationInformation class not supported\n");
4181 info.Flags = 0xdeadbeef;
4190 memset(&ov, 0,
sizeof(ov));
4195 for (
i = 0;
i < 10;
i++)
4210 ok(num_bytes ==
sizeof(
buf),
"expected sizeof(buf), got %lu\n", num_bytes);
4216 ok(
key == 0xdeadbeef,
"expected 0xdeadbeef, got %Ix\n",
key);
4217 ok(pov == &ov,
"expected %p, got %p\n", &ov, pov);
4225 for (
i = 0;
i < 10;
i++)
4238 ok(num_bytes ==
sizeof(
buf),
"expected sizeof(buf), got %lu\n", num_bytes);
4240 pov = (
void *)0xdeadbeef;
4242 ok(!
ret,
"GetQueuedCompletionStatus succeeded\n");
4243 ok(pov ==
NULL,
"expected NULL, got %p\n", pov);
4251 for (
i = 0;
i < 10;
i++)
4266 ok(num_bytes ==
sizeof(
buf),
"expected sizeof(buf), got %lu\n", num_bytes);
4268 pov = (
void *)0xdeadbeef;
4270 ok(!
ret,
"GetQueuedCompletionStatus succeeded\n");
4271 ok(pov ==
NULL,
"expected NULL, got %p\n", pov);
4288 ret =
WriteFile(
h, aligned_buf,
sizeof(aligned_buf), &num_bytes, &ov);
4293 ok(num_bytes ==
sizeof(aligned_buf),
"expected sizeof(aligned_buf), got %lu.\n", num_bytes);
4297 ok(num_bytes ==
sizeof(aligned_buf),
"expected sizeof(buf), got %lu.\n", num_bytes);
4300 ret =
ReadFile(
h, aligned_buf,
sizeof(aligned_buf), &num_bytes, &ov);
4328 memset(&ov, 0,
sizeof(ov));
4350 io.Status = 0xdeadbeef;
4385 memset( &fid, 0x11,
sizeof(fid) );
4389 win_skip(
"FileIdInformation not supported\n" );
4396 ok(
ret,
"GetFileInformationByHandle failed\n" );
4399 ok( dwords[0] ==
info.dwVolumeSerialNumber,
"expected %08lx, got %08lx\n",
4400 info.dwVolumeSerialNumber, dwords[0] );
4401 ok( dwords[1] != 0x11111111,
"expected != 0x11111111\n" );
4404 ok( dwords[0] ==
info.nFileIndexLow,
"expected %08lx, got %08lx\n",
info.nFileIndexLow, dwords[0] );
4405 ok( dwords[1] ==
info.nFileIndexHigh,
"expected %08lx, got %08lx\n",
info.nFileIndexHigh, dwords[1] );
4406 ok( dwords[2] == 0,
"expected 0, got %08lx\n", dwords[2] );
4407 ok( dwords[3] == 0,
"expected 0, got %08lx\n", dwords[3] );
4430 ok(
info.AccessFlags == 0x13019f,
"got %08lx\n",
info.AccessFlags );
4454 info.FileAttributes &= ~FILE_ATTRIBUTE_NOT_CONTENT_INDEXED;
4456 ok( !
info.ReparseTag,
"got reparse tag %#lx\n",
info.ReparseTag );
4466 ok( !
info.ReparseTag,
"got reparse tag %#lx\n",
info.ReparseTag );
4476 ok( !
info.ReparseTag,
"got reparse tag %#lx\n",
info.ReparseTag );
4492 memset( &fsd, 0x11,
sizeof(fsd) );
4496 win_skip(
"FileStatInformation not supported\n" );
4504 ok(
ret,
"GetFileInformationByHandle failed\n" );
4506 ok( fsd.
FileId.
u.LowPart ==
info.nFileIndexLow,
"expected %08lx, got %08lx\n",
info.nFileIndexLow, fsd.
FileId.
u.LowPart );
4507 ok( fsd.
FileId.
u.HighPart ==
info.nFileIndexHigh,
"expected %08lx, got %08lx\n",
info.nFileIndexHigh, fsd.
FileId.
u.HighPart );
4508 ok( fsd.
CreationTime.
u.LowPart ==
info.ftCreationTime.dwLowDateTime,
"expected %08lx, got %08lx\n",
4510 ok( fsd.
CreationTime.
u.HighPart ==
info.ftCreationTime.dwHighDateTime,
"expected %08lx, got %08lx\n",
4512 ok( fsd.
LastAccessTime.
u.LowPart ==
info.ftLastAccessTime.dwLowDateTime,
"expected %08lx, got %08lx\n",
4514 ok( fsd.
LastAccessTime.
u.HighPart ==
info.ftLastAccessTime.dwHighDateTime,
"expected %08lx, got %08lx\n",
4516 ok( fsd.
LastWriteTime.
u.LowPart ==
info.ftLastWriteTime.dwLowDateTime,
"expected %08lx, got %08lx\n",
4518 ok( fsd.
LastWriteTime.
u.HighPart ==
info.ftLastWriteTime.dwHighDateTime,
"expected %08lx, got %08lx\n",
4542 ok(
ret,
"RtlDosPathNameToNtPathName_U failed\n" );
4546 ok( fri !=
NULL,
"HeapAlloc failed\n" );
4551 pRtlFreeUnicodeString( &ntpath );
4639 } option_tests[] = {
4649 { &pipe_dev_name, 0, 0 },
4651 { &mailslot_dev_name, 0, 0 },
4653 { &mountmgr_dev_name, 0, 0 },
4657 static WCHAR pipe_devW[] = {
'\\',
'?',
'?',
'\\',
'P',
'I',
'P',
'E',
'\\'};
4658 static WCHAR mailslot_devW[] = {
'\\',
'?',
'?',
'\\',
'M',
'A',
'I',
'L',
'S',
'L',
'O',
'T',
'\\'};
4659 static WCHAR mountmgr_devW[] =
4660 {
'\\',
'?',
'?',
'\\',
'M',
'o',
'u',
'n',
't',
'P',
'o',
'i',
'n',
't',
'M',
'a',
'n',
'a',
'g',
'e',
'r'};
4667 pipe_dev_name.
Buffer = pipe_devW;
4668 pipe_dev_name.
Length =
sizeof(pipe_devW);
4671 mailslot_dev_name.
Buffer = mailslot_devW;
4672 mailslot_dev_name.
Length =
sizeof(mailslot_devW);
4675 mountmgr_dev_name.
Buffer = mountmgr_devW;
4676 mountmgr_dev_name.
Length =
sizeof(mountmgr_devW);
4680 attr.RootDirectory = 0;
4683 attr.SecurityQualityOfService =
NULL;
4687 attr.ObjectName = option_tests[
i].file_name;
4704 ok(
mode.Mode == option_tests[
i].mode,
"[%u] Mode = %lx, expected %lx\n",
4705 i,
mode.Mode, option_tests[
i].mode);
4729 attr.RootDirectory = 0;
4733 attr.SecurityQualityOfService =
NULL;
4738 pRtlFreeUnicodeString( &
nameW );
4741 io.Status = 0xdadadada;
4742 io.Information = 0xcacacaca;
4779 attr.RootDirectory = 0;
4783 attr.SecurityQualityOfService =
NULL;
4788 pRtlFreeUnicodeString( &
nameW );
4791 io.Status = 0xdadadada;
4792 io.Information = 0xcacacaca;
4804 trace(
"FileSystemAttributes: %lx MaximumComponentNameLength: %lx FileSystemName: %s\n",
4838 static const WCHAR fooW[] = {
'f',
'o',
'o',0};
4857 attr.SecurityQualityOfService =
NULL;
4863 td[
i].disposition, 0,
NULL, 0);
4869 ok(
io.Information == td[
i].result,
"%ld: expected %#lx got %#Ix\n",
i, td[
i].result,
io.Information);
4872 ret &= ~FILE_ATTRIBUTE_NOT_CONTENT_INDEXED;
4874 if (
ret != td[
i].attrib_out)
4877 ok(
ret == td[
i].attrib_out,
"%ld: expected %#lx got %#lx\n",
i, td[
i].attrib_out,
ret);
4881 ok(
ret == td[
i].attrib_out,
"%ld: expected %#lx got %#lx\n",
i, td[
i].attrib_out,
ret);
4886 if (td[
i].needs_cleanup)
4893 pRtlFreeUnicodeString( &
nameW );
4912 static const char contents[14] =
"1234567890abcd";
5017 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %lu\n", off);
5022 ok(!
ret,
"ReadFile should fail\n");
5049 for (
i = -20;
i < -1;
i++)
5051 if (
i == -2)
continue;
5073 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %lu\n", off);
5093 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %lu\n", off);
5104 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %lu\n", off);
5136 ok(!
ret,
"ReadFile should fail\n");
5202 for (
i = -20;
i < 0;
i++)
5204 if (
i == -2)
continue;
5225 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %lu\n", off);
5237 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %lu\n", off);
5248 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %lu\n", off);
5261 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %lu\n", off);
5273 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %lu\n", off);
5291 ok(off ==
sizeof(
contents),
"expected sizeof(contents), got %lu\n", off);
5301 ok(!
ret,
"ReadFile should fail\n");
5321 ok(!
ret,
"WriteFile should fail\n");
5332 for (
i = -20;
i < -1;
i++)
5348 "expected STATUS_PENDING, got %#lx.\n",
status);
5358 ok(off == 0,
"expected 0, got %lu\n", off);
5363 ok(!
ret,
"ReadFile should fail\n");
5374 for (
i = -20;
i < 0;
i++)
5386 ok(off == 0,
"expected 0, got %lu\n", off);
5398 ok(!
ret,
"ReadFile should fail\n");
5401 "expected ERROR_IO_PENDING, got %ld\n",
ret);
5405 ok(off == 0,
"expected 0, got %lu\n", off);
5412 ok(!
ret,
"GetOverlappedResult should report FALSE\n");
5420 ok(off == 0,
"expected 0, got %lu\n", off);
5432 "Unexpected result, ret %#lx, GetLastError() %lu.\n",
ret,
GetLastError());
5437 ok(off == 0,
"expected 0, got %lu\n", off);
5444 ok(
ret,
"GetOverlappedResult returned FALSE with %lu (expected TRUE)\n",
GetLastError());
5460 "Unexpected result, ret %#lx, GetLastError() %lu.\n",
ret,
GetLastError());
5465 ok(off == 0,
"expected 0, got %lu\n", off);
5472 ok(
ret,
"GetOverlappedResult returned FALSE with %lu (expected TRUE)\n",
GetLastError());
5497 ok(off == 0,
"expected 0, got %lu\n", off);
5504 "expected STATUS_PENDING, got %#lx.\n",
status);
5519 ok(off == 0,
"expected 0, got %lu\n", off);
5530 "Unexpected result, ret %#lx, GetLastError() %lu.\n",
ret,
GetLastError());
5539 ok(off == 0,
"expected 0, got %lu\n", off);
5550 ok(off == 0,
"expected 0, got %lu\n", off);
5561 "expected STATUS_PENDING, got %#lx.\n",
status);
5571 ok(off == 0,
"expected 0, got %lu\n", off);
5578 "expected STATUS_PENDING, got %#lx.\n",
status);
5588 ok(off == 0,
"expected 0, got %lu\n", off);
5594 ok(off == 0,
"expected 0, got %lu\n", off);
5605 "Unexpected result %#lx, GetLastError() %lu.\n",
ret,
GetLastError());
5617 ok(off == 0,
"expected 0, got %lu\n", off);
5627 ok(off == 0,
"expected 0, got %lu\n", off);
5638 "Unexpected result %#lx, GetLastError() %lu.\n",
ret,
GetLastError());
5650 ok(off == 0,
"expected 0, got %lu\n", off);
5662 ok(off == 0,
"expected 0, got %lu\n", off);
5690 &peek_buf,
sizeof(peek_buf));
5723 io_status_block.
Status = 0xdeadbeef;
5724 status = pNtFlushBuffersFile(hfile, &io_status_block);
5728 ok(!io_status_block.
Information,
"Got unexpected io_status_block.Information %#Ix.\n",
5731 status = pNtFlushBuffersFile(hfileread, &io_status_block);
5735 io_status_block.
Status = 0xdeadbeef;
5736 status = pNtFlushBuffersFile(
NULL, &io_status_block);
5738 ok(io_status_block.
Status == 0xdeadbeef,
"Got unexpected io_status_block.Status %#lx.\n",
5740 ok(io_status_block.
Information == 0xdeadbeef,
"Got unexpected io_status_block.Information %#Ix.\n",
5749 status = pNtFlushBuffersFile(hfile, &io_status_block);
5753 io_status_block.
Status = 0xdeadbeef;
5754 status = pNtFlushBuffersFile((
HANDLE)0xdeadbeef, &io_status_block);
5756 ok(io_status_block.
Status == 0xdeadbeef,
"Got unexpected io_status_block.Status %#lx.\n",
5758 ok(io_status_block.
Information == 0xdeadbeef,
"Got unexpected io_status_block.Information %#Ix.\n",
5767#define EA_BUFFER_SIZE 4097
5778 io.Status = 0xdeadbeef;
5779 io.Information = 0xdeadbeef;
5784 ok(
io.Status == 0xdeadbeef,
"expected 0xdeadbeef, got %#lx\n",
io.Status);
5785 ok(
io.Information == 0xdeadbeef,
"expected 0xdeadbeef, got %#Ix\n",
io.Information);
5786 ok(
buffer[0] == 0xcc,
"data at position 0 overwritten\n");
5789 io.Status = 0xdeadbeef;
5790 io.Information = 0xdeadbeef;
5795 ok(
io.Status == 0xdeadbeef,
"expected 0xdeadbeef, got %#lx\n",
io.Status);
5796 ok(
io.Information == 0xdeadbeef,
"expected 0xdeadbeef, got %#Ix\n",
io.Information);
5797 ok(
buffer[0] == 0xcc,
"data at position 0 overwritten\n");
5800 io.Status = 0xdeadbeef;
5801 io.Information = 0xdeadbeef;
5804 ok(
io.Status == 0xdeadbeef,
"expected 0xdeadbeef, got %#lx\n",
io.Status);
5805 ok(
io.Information == 0xdeadbeef,
"expected 0xdeadbeef, got %#Ix\n",
io.Information);
5808 io.Status = 0xdeadbeef;
5809 io.Information = 0xdeadbeef;
5812 ok(
io.Status == 0xdeadbeef,
"expected 0xdeadbeef, got %#lx\n",
io.Status);
5813 ok(
io.Information == 0xdeadbeef,
"expected 0xdeadbeef, got %#Ix\n",
io.Information);
5816 io.Status = 0xdeadbeef;
5817 io.Information = 0xdeadbeef;
5822 ok(
io.Status == 0xdeadbeef,
"expected 0xdeadbeef, got %#lx\n",
io.Status);
5823 ok(
io.Information == 0xdeadbeef,
"expected 0xdeadbeef, got %#Ix\n",
io.Information);
5824 for (
i = 0;
i < buffer_len && !
buffer[
i];
i++);
5825 ok(
i == buffer_len,
"expected %lu bytes filled with 0x00, got %lu bytes\n", buffer_len,
i);
5829 io.Status = 0xdeadbeef;
5830 io.Information = 0xdeadbeef;
5835 ok(
io.Status == 0xdeadbeef,
"expected 0xdeadbeef, got %#lx\n",
io.Status);
5836 ok(
io.Information == 0xdeadbeef,
"expected 0xdeadbeef, got %#Ix\n",
io.Information);
5837 for (
i = 0;
i < buffer_len && !
buffer[
i];
i++);
5838 ok(
i == buffer_len,
"expected %lu bytes filled with 0x00, got %lu bytes\n", buffer_len,
i);
5842#undef EA_BUFFER_SIZE
5848 static const WCHAR fooW[] = {
'f',
'o',
'o', 0};
5868 attr.SecurityQualityOfService =
NULL;
5908 pRtlFreeUnicodeString(&
nameW);
5933 ok(
name->FileNameLength == 18,
"got length %lu\n",
name->FileNameLength);
5943 ok(
name->FileNameLength == 18,
"got length %lu\n",
name->FileNameLength);
5958 ok(
name->FileNameLength == 18,
"got length %lu\n",
name->FileNameLength);
5985 unsigned char reparse_data[1];
5987 pRtlInitUnicodeString( &
nameW,
L"\\??\\C:\\" );
6015 if (!pNtSetIoCompletionEx || !pNtAllocateReserveObject)
6017 win_skip(
"NtSetIoCompletionEx() or NtAllocateReserveObject() is unavailable.\n");
6068 skip(
"not running on NT, skipping test\n");
6077 pRtlDosPathNameToNtPathName_U = (
void *)
GetProcAddress(
hntdll,
"RtlDosPathNameToNtPathName_U");
6078 pRtlWow64EnableFsRedirectionEx = (
void *)
GetProcAddress(
hntdll,
"RtlWow64EnableFsRedirectionEx");
6101 pNtQueryVolumeInformationFile = (
void *)
GetProcAddress(
hntdll,
"NtQueryVolumeInformationFile");
void CALLBACK completion(DWORD dwError, DWORD cbTransferred, LPWSAOVERLAPPED lpOverlapped, DWORD dwFlags)
static unsigned char bytes[4]
static const WCHAR nameW[]
#define FILE_DIRECTORY_FILE
#define FILE_NON_DIRECTORY_FILE
#define FILE_DELETE_ON_CLOSE
void restart(int argc, const char *argv[])
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define STATUS_INVALID_HANDLE
#define STATUS_NOT_SUPPORTED
#define STATUS_NOT_IMPLEMENTED
#define STATUS_OBJECT_TYPE_MISMATCH
static int find_data(const struct Vector *v, const BYTE *pData, int size)
#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 MultiByteToWideChar
#define ERROR_ACCESS_DENIED
HANDLE WINAPI CreateMailslotA(IN LPCSTR lpName, IN DWORD nMaxMessageSize, IN DWORD lReadTimeout, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
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 QueueUserAPC(IN PAPCFUNC pfnAPC, IN HANDLE hThread, IN ULONG_PTR dwData)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
DWORD WINAPI DECLSPEC_HOTPATCH GetTempPathA(DWORD count, LPSTR path)
UINT WINAPI DECLSPEC_HOTPATCH GetTempFileNameW(LPCWSTR path, LPCWSTR prefix, UINT unique, LPWSTR buffer)
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 SetFileAttributesA(LPCSTR name, DWORD attributes)
BOOL WINAPI DECLSPEC_HOTPATCH GetOverlappedResult(HANDLE file, LPOVERLAPPED overlapped, LPDWORD result, BOOL wait)
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)
HANDLE WINAPI DECLSPEC_HOTPATCH FindFirstFileW(const WCHAR *filename, WIN32_FIND_DATAW *data)
UINT WINAPI DECLSPEC_HOTPATCH GetTempFileNameA(LPCSTR path, LPCSTR prefix, UINT unique, LPSTR buffer)
BOOL WINAPI DECLSPEC_HOTPATCH RemoveDirectoryA(LPCSTR path)
DWORD WINAPI DECLSPEC_HOTPATCH GetFileAttributesA(LPCSTR name)
UINT WINAPI DECLSPEC_HOTPATCH GetWindowsDirectoryW(LPWSTR path, UINT count)
BOOL WINAPI DECLSPEC_HOTPATCH SetFileAttributesW(LPCWSTR name, DWORD attributes)
UINT WINAPI DECLSPEC_HOTPATCH GetSystemDirectoryW(LPWSTR path, UINT count)
BOOL WINAPI DECLSPEC_HOTPATCH CreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sa)
BOOL WINAPI DECLSPEC_HOTPATCH CreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sa)
BOOL WINAPI DECLSPEC_HOTPATCH RemoveDirectoryW(LPCWSTR path)
BOOL WINAPI DECLSPEC_HOTPATCH FindClose(HANDLE handle)
BOOL WINAPI DECLSPEC_HOTPATCH SetEndOfFile(HANDLE file)
DWORD WINAPI DECLSPEC_HOTPATCH GetFileAttributesW(LPCWSTR name)
LPWSTR WINAPI CharLowerW(WCHAR *str)
FILE *CDECL tmpfile(void)
#define DECLSPEC_ALIGN(x)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP size_t __cdecl strlen(const char *)
static const WCHAR systemrootW[]
#define FileStatInformation
#define FILE_RENAME_IGNORE_READONLY_ATTRIBUTE
#define FILE_LINK_IGNORE_READONLY_ATTRIBUTE
#define FILE_DISPOSITION_POSIX_SEMANTICS
#define FILE_DISPOSITION_ON_CLOSE
#define FileIdInformation
#define FileRenameInformationEx
#define FileDispositionInformationEx
#define FILE_DISPOSITION_DELETE
#define FILE_RENAME_REPLACE_IF_EXISTS
#define FileLinkInformationEx
#define FILE_LINK_REPLACE_IF_EXISTS
struct _IO_STATUS_BLOCK * PIO_STATUS_BLOCK
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
#define STATUS_ACCESS_VIOLATION
#define FILE_OPEN_BY_FILE_ID
@ FileAttributeTagInformation
@ FileIdBothDirectoryInformation
@ FileIoCompletionNotificationInformation
@ FileCompletionInformation
@ FileDispositionInformation
@ FileBothDirectoryInformation
#define FILE_NO_COMPRESSION
enum _FILE_INFORMATION_CLASS FILE_INFORMATION_CLASS
#define FILE_OVERWRITE_IF
#define FILE_SYNCHRONOUS_IO_NONALERT
struct _FILE_FS_ATTRIBUTE_INFORMATION FILE_FS_ATTRIBUTE_INFORMATION
@ FileFsAttributeInformation
@ FileFsVolumeInformation
#define FILE_NO_INTERMEDIATE_BUFFERING
#define FILE_RANDOM_ACCESS
#define FILE_WRITE_THROUGH
#define FILE_SEQUENTIAL_ONLY
#define FILE_SYNCHRONOUS_IO_ALERT
#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
GLuint GLint GLboolean GLint GLenum access
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 flag
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
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 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)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
#define memcpy(s1, s2, n)
#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 const WCHAR filenameW[]
static HANDLE PIO_APC_ROUTINE void PIO_STATUS_BLOCK io_status
static HANDLE PIO_APC_ROUTINE void * apc_user
static POBJECT_ATTRIBUTES
static char filename[MAX_PATH]
#define TEST_OVERLAPPED_READ_SIZE
static void test_file_readonly_access(void)
static PWSTR CURDIR *static BOOLEAN
static OVERLAPPED_ENTRY ULONG BOOL
static void test_read_write(void)
static const WCHAR pathW[]
static HINSTANCE hkernel32
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_mode(void)
static void test_file_all_name_information(void)
static void test_file_stat_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_completion_flags(unsigned line, HANDLE handle, DWORD expected_flags)
static void test_set_io_completion_ex(void)
static void test_file_link_information(FILE_INFORMATION_CLASS class)
static NTSTATUS nt_get_file_attrs(const char *name, DWORD *attrs)
static FS_INFORMATION_CLASS
static HANDLE PIO_APC_ROUTINE apc
static void test_reparse_points(void)
static void test_file_access_information(void)
static void test_NtCreateFile(void)
static void open_file_test(void)
static PWSTR CURDIR *static ULONG *static const OBJECT_ATTRIBUTES MEMORY_RESERVE_OBJECT_TYPE
#define test_completion_flags(a, b)
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_file_name_information(void)
static BOOL is_signaled(HANDLE obj)
static void test_mailslot_name(void)
static void test_file_io_completion(void)
static void test_file_rename_information_ex(void)
static void test_file_link_information_ex(void)
static void test_file_disposition_information(void)
static void test_set_io_completion(void)
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_attribute_tag_information(void)
static void test_file_id_information(void)
static void test_ioctl(void)
static FILE_INFORMATION_CLASS
static void test_file_rename_information(FILE_INFORMATION_CLASS class)
static void delete_file_test(void)
static void test_dotfile_file_attributes(void)
static void rename_file(HANDLE h, const WCHAR *filename)
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK ULONG PVOID in_buffer
static void test_file_all_information(void)
static void WINAPI user_apc_proc(ULONG_PTR arg)
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)
#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)
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
#define FILE_ATTRIBUTE_READONLY
#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_ATTRIBUTE_ARCHIVE
#define FILE_ATTRIBUTE_DIRECTORY
#define FILE_GENERIC_WRITE
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define FileFsFullSizeInformation
#define STATUS_DELETE_PENDING
#define STATUS_OBJECT_PATH_SYNTAX_BAD
#define STATUS_NO_EAS_ON_FILE
#define STATUS_PIPE_BROKEN
#define STATUS_NOT_A_REPARSE_POINT
#define STATUS_INVALID_INFO_CLASS
#define FSCTL_GET_REPARSE_POINT
#define OBJ_CASE_INSENSITIVE
#define offsetof(TYPE, MEMBER)
#define _WIN32_WINNT_VISTA
#define FileAccessInformation
#define FileStandardInformation
#define STATUS_CANNOT_DELETE
#define STATUS_END_OF_FILE
#define STATUS_BUFFER_OVERFLOW
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_NOT_A_DIRECTORY
#define STATUS_ACCESS_DENIED
#define STATUS_OBJECT_PATH_NOT_FOUND
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_OBJECT_NAME_COLLISION
#define STATUS_INVALID_USER_BUFFER
#define STATUS_INFO_LENGTH_MISMATCH
#define STATUS_OBJECT_NAME_INVALID
#define STATUS_OBJECT_NAME_NOT_FOUND
struct _LARGE_INTEGER::@2500 u
#define INVALID_FILE_ATTRIBUTES
static rfbScreenInfoPtr server
_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)
HANDLE WINAPI GetCurrentThread(void)
#define PIPE_READMODE_MESSAGE
#define PIPE_TYPE_MESSAGE
struct _FILE_FS_VOLUME_INFORMATION FILE_FS_VOLUME_INFORMATION
@ MemoryReserveObjectTypeIoCompletion
@ MemoryReserveObjectTypeUserApc
#define FILE_SKIP_SET_USER_EVENT_ON_FAST_IO
#define FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE
struct _FILE_ALL_INFORMATION FILE_ALL_INFORMATION
#define ERROR_SHARING_VIOLATION
#define DUPLICATE_SAME_ACCESS