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;