Commit 59ee798d authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll/tests: Use nameless unions/structs.

parent 490aee03
......@@ -86,15 +86,15 @@ static void test_ntncdf(void)
filter |= FILE_NOTIFY_CHANGE_CREATION;
filter |= FILE_NOTIFY_CHANGE_SECURITY;
U(iosb).Status = 1;
iosb.Status = 1;
iosb.Information = 1;
r = pNtNotifyChangeDirectoryFile(hdir,hEvent,NULL,NULL,&iosb,buffer,sizeof buffer,-1,0);
ok(r==STATUS_INVALID_PARAMETER, "should return invalid parameter\n");
ok( U(iosb).Status == 1, "information wrong\n");
ok( iosb.Status == 1, "information wrong\n");
ok( iosb.Information == 1, "information wrong\n");
U(iosb).Status = 1;
iosb.Status = 1;
iosb.Information = 0;
r = pNtNotifyChangeDirectoryFile(hdir,hEvent,NULL,NULL,&iosb,buffer,sizeof buffer,filter,0);
ok(r==STATUS_PENDING, "should return status pending\n");
......@@ -114,7 +114,7 @@ static void test_ntncdf(void)
r = WaitForSingleObject( hEvent, 100 );
ok( r == WAIT_OBJECT_0, "event should be ready\n" );
ok( U(iosb).Status == STATUS_SUCCESS, "information wrong\n");
ok( iosb.Status == STATUS_SUCCESS, "information wrong\n");
ok( iosb.Information == 0x12, "information wrong\n");
pfni = (PFILE_NOTIFY_INFORMATION) buffer;
......@@ -131,12 +131,12 @@ static void test_ntncdf(void)
filter = FILE_NOTIFY_CHANGE_SIZE;
U(iosb).Status = 1;
iosb.Status = 1;
iosb.Information = 1;
r = pNtNotifyChangeDirectoryFile(hdir,0,NULL,NULL,&iosb,NULL,0,filter,0);
ok(r==STATUS_PENDING, "should status pending\n");
ok( U(iosb).Status == 1, "information wrong\n");
ok( iosb.Status == 1, "information wrong\n");
ok( iosb.Information == 1, "information wrong\n");
r = WaitForSingleObject( hdir, 0 );
......@@ -151,7 +151,7 @@ static void test_ntncdf(void)
r = WaitForSingleObject( hdir, 100 );
ok( r == WAIT_OBJECT_0, "should be ready\n" );
ok( U(iosb).Status == STATUS_NOTIFY_ENUM_DIR, "information wrong\n");
ok( iosb.Status == STATUS_NOTIFY_ENUM_DIR, "information wrong\n");
ok( iosb.Information == 0, "information wrong\n");
CloseHandle(hdir);
......@@ -209,11 +209,11 @@ static void test_ntncdf_async(void)
filter |= FILE_NOTIFY_CHANGE_SECURITY;
U(iosb).Status = 0x01234567;
iosb.Status = 0x01234567;
iosb.Information = 0x12345678;
r = pNtNotifyChangeDirectoryFile(hdir,0,NULL,NULL,&iosb,buffer,sizeof buffer,filter,0);
ok(r==STATUS_PENDING, "should status pending\n");
ok(U(iosb).Status == 0x01234567, "status set too soon\n");
ok(iosb.Status == 0x01234567, "status set too soon\n");
ok(iosb.Information == 0x12345678, "info set too soon\n");
r = CreateDirectoryW( subdir, NULL );
......@@ -222,7 +222,7 @@ static void test_ntncdf_async(void)
r = WaitForSingleObject( hdir, 100 );
ok( r == WAIT_OBJECT_0, "should be ready\n" );
ok(U(iosb).Status == STATUS_SUCCESS, "status not successful\n");
ok(iosb.Status == STATUS_SUCCESS, "status not successful\n");
ok(iosb.Information == 0x12, "info not set\n");
pfni = (PFILE_NOTIFY_INFORMATION) buffer;
......@@ -240,7 +240,7 @@ static void test_ntncdf_async(void)
r = WaitForSingleObject( hdir, 0 );
ok( r == WAIT_OBJECT_0, "should be ready\n" );
ok(U(iosb).Status == STATUS_SUCCESS, "status not successful\n");
ok(iosb.Status == STATUS_SUCCESS, "status not successful\n");
ok(iosb.Information == 0x12, "info not set\n");
ok( pfni->NextEntryOffset == 0, "offset wrong\n" );
......@@ -249,7 +249,7 @@ static void test_ntncdf_async(void)
ok( !memcmp(pfni->FileName,&szHoo[1],6), "name wrong\n" );
/* check APCs */
U(iosb).Status = 0;
iosb.Status = 0;
iosb.Information = 0;
r = pNtNotifyChangeDirectoryFile(hdir,0,NULL,NULL,&iosb,NULL,0,filter,0);
......@@ -261,10 +261,10 @@ static void test_ntncdf_async(void)
r = WaitForSingleObject( hdir, 0 );
ok( r == WAIT_OBJECT_0, "should be ready\n" );
ok(U(iosb).Status == STATUS_NOTIFY_ENUM_DIR, "status not successful\n");
ok(iosb.Status == STATUS_NOTIFY_ENUM_DIR, "status not successful\n");
ok(iosb.Information == 0, "info not set\n");
U(iosb).Status = 0;
iosb.Status = 0;
iosb.Information = 0;
r = pNtNotifyChangeDirectoryFile(hdir,hEvent,NULL,NULL,&iosb,buffer,sizeof buffer,filter,0);
......@@ -276,24 +276,24 @@ static void test_ntncdf_async(void)
r = WaitForSingleObject( hEvent, 0 );
ok( r == WAIT_OBJECT_0, "should be ready\n" );
ok(U(iosb).Status == STATUS_SUCCESS, "status not successful\n");
ok(iosb.Status == STATUS_SUCCESS, "status not successful\n");
ok(iosb.Information == 0x12, "info not set\n");
U(iosb).Status = 0x01234567;
iosb.Status = 0x01234567;
iosb.Information = 0x12345678;
r = pNtNotifyChangeDirectoryFile(hdir,0,NULL,NULL,&iosb,buffer,sizeof buffer,filter,0);
ok(r==STATUS_PENDING, "should status pending\n");
U(iosb2).Status = 0x01234567;
iosb2.Status = 0x01234567;
iosb2.Information = 0x12345678;
r = pNtNotifyChangeDirectoryFile(hdir,0,NULL,NULL,&iosb2,buffer,sizeof buffer,filter,0);
ok(r==STATUS_PENDING, "should status pending\n");
ok(U(iosb).Status == 0x01234567, "status set too soon\n");
ok(iosb.Status == 0x01234567, "status set too soon\n");
ok(iosb.Information == 0x12345678, "info set too soon\n");
U(iosb3).Status = 0x111111;
iosb3.Status = 0x111111;
iosb3.Information = 0x222222;
r = pNtCancelIoFile(hdir, &iosb3);
......@@ -301,19 +301,19 @@ static void test_ntncdf_async(void)
CloseHandle(hdir);
ok(U(iosb).Status == STATUS_CANCELLED, "status wrong %lx\n",U(iosb).Status);
ok(U(iosb2).Status == STATUS_CANCELLED, "status wrong %lx\n",U(iosb2).Status);
ok(U(iosb3).Status == STATUS_SUCCESS, "status wrong %lx\n",U(iosb3).Status);
ok(iosb.Status == STATUS_CANCELLED, "status wrong %lx\n",iosb.Status);
ok(iosb2.Status == STATUS_CANCELLED, "status wrong %lx\n",iosb2.Status);
ok(iosb3.Status == STATUS_SUCCESS, "status wrong %lx\n",iosb3.Status);
ok(iosb.Information == 0, "info wrong\n");
ok(iosb2.Information == 0, "info wrong\n");
ok(iosb3.Information == 0, "info wrong\n");
U(iosb3).Status = 0x111111;
iosb3.Status = 0x111111;
iosb3.Information = 0x222222;
r = pNtCancelIoFile(hdir, &iosb3);
ok( r == STATUS_INVALID_HANDLE, "cancel failed %lx\n", r);
ok(U(iosb3).Status == 0x111111, "status wrong %lx\n",U(iosb3).Status);
ok(iosb3.Status == 0x111111, "status wrong %lx\n",iosb3.Status);
ok(iosb3.Information == 0x222222, "info wrong\n");
r = RemoveDirectoryW( path );
......
......@@ -200,11 +200,11 @@ static void test_flags_NtQueryDirectoryFile(OBJECT_ATTRIBUTES *attr, const char
return;
}
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( dirh, NULL, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, single_entry, mask, restart_flag );
ok (status == STATUS_SUCCESS, "failed to query directory; status %lx\n", status);
ok (U(io).Status == STATUS_SUCCESS, "failed to query directory; status %lx\n", U(io).Status);
ok (io.Status == STATUS_SUCCESS, "failed to query directory; status %lx\n", io.Status);
data_len = io.Information;
ok (data_len >= sizeof(FILE_BOTH_DIRECTORY_INFORMATION), "not enough data in directory\n");
......@@ -220,10 +220,10 @@ static void test_flags_NtQueryDirectoryFile(OBJECT_ATTRIBUTES *attr, const char
tally_test_file(dir_info);
if (dir_info->NextEntryOffset == 0) {
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( new_dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, single_entry, &dummy_mask, FALSE );
ok (U(io).Status == status, "wrong status %lx / %lx\n", status, U(io).Status);
ok (io.Status == status, "wrong status %lx / %lx\n", status, io.Status);
if (status == STATUS_NO_MORE_FILES) break;
ok (status == STATUS_SUCCESS, "failed to query directory; status %lx\n", status);
data_len = io.Information;
......@@ -274,11 +274,11 @@ static void test_directory_sort( const WCHAR *testdir )
FILE_SYNCHRONOUS_IO_NONALERT | FILE_OPEN_FOR_BACKUP_INTENT | FILE_DIRECTORY_FILE );
ok(status == STATUS_SUCCESS, "failed to open dir %s\n", wine_dbgstr_w(testdir) );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( handle, NULL, NULL, NULL, &io, data, sizeof(data),
FileBothDirectoryInformation, FALSE, NULL, TRUE );
ok( status == STATUS_SUCCESS, "failed to query directory; status %lx\n", status );
ok( U(io).Status == STATUS_SUCCESS, "failed to query directory; status %lx\n", U(io).Status );
ok( io.Status == STATUS_SUCCESS, "failed to query directory; status %lx\n", io.Status );
data_len = io.Information;
ok( data_len >= sizeof(FILE_BOTH_DIRECTORY_INFORMATION), "not enough data in directory\n" );
data_pos = 0;
......@@ -312,10 +312,10 @@ static void test_directory_sort( const WCHAR *testdir )
if (info->NextEntryOffset == 0)
{
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( handle, 0, NULL, NULL, &io, data, sizeof(data),
FileBothDirectoryInformation, FALSE, NULL, FALSE );
ok (U(io).Status == status, "wrong status %lx / %lx\n", status, U(io).Status);
ok (io.Status == status, "wrong status %lx / %lx\n", status, io.Status);
if (status == STATUS_NO_MORE_FILES) break;
ok( status == STATUS_SUCCESS, "failed to query directory; status %lx\n", status );
data_len = io.Information;
......@@ -338,15 +338,15 @@ static void test_NtQueryDirectoryFile_classes( HANDLE handle, UNICODE_STRING *ma
for (class = 0; class < FileMaximumInformation; class++)
{
U(io).Status = 0xdeadbeef;
U(io).Information = 0xdeadbeef;
io.Status = 0xdeadbeef;
io.Information = 0xdeadbeef;
data_size = 0;
memset( data, 0x55, sizeof(data) );
status = pNtQueryDirectoryFile( handle, 0, NULL, NULL, &io, data, data_size,
class, FALSE, mask, TRUE );
ok( U(io).Status == 0xdeadbeef, "%u: wrong status %lx\n", class, U(io).Status );
ok( U(io).Information == 0xdeadbeef, "%u: wrong info %Ix\n", class, U(io).Information );
ok( io.Status == 0xdeadbeef, "%u: wrong status %lx\n", class, io.Status );
ok( io.Information == 0xdeadbeef, "%u: wrong info %Ix\n", class, io.Information );
ok(data[0] == 0x55555555, "%u: wrong offset %lx\n", class, data[0] );
switch (class)
......@@ -379,15 +379,15 @@ static void test_NtQueryDirectoryFile_classes( HANDLE handle, UNICODE_STRING *ma
class, FALSE, mask, TRUE );
if (status == STATUS_BUFFER_OVERFLOW)
{
ok( U(io).Status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, U(io).Status );
ok( U(io).Information == data_size || broken(!U(io).Information), /* win10 1709 */
"%u: wrong info %Ix\n", class, U(io).Information );
if (U(io).Information) ok(data[0] == 0, "%u: wrong offset %lx\n", class, data[0] );
ok( io.Status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, io.Status );
ok( io.Information == data_size || broken(!io.Information), /* win10 1709 */
"%u: wrong info %Ix\n", class, io.Information );
if (io.Information) ok(data[0] == 0, "%u: wrong offset %lx\n", class, data[0] );
}
else
{
ok( U(io).Status == 0xdeadbeef, "%u: wrong status %lx\n", class, U(io).Status );
ok( U(io).Information == 0xdeadbeef, "%u: wrong info %Ix\n", class, U(io).Information );
ok( io.Status == 0xdeadbeef, "%u: wrong status %lx\n", class, io.Status );
ok( io.Information == 0xdeadbeef, "%u: wrong info %Ix\n", class, io.Information );
ok(data[0] == 0x55555555, "%u: wrong offset %lx\n", class, data[0] );
}
if (status != STATUS_INFO_LENGTH_MISMATCH) break;
......@@ -519,11 +519,11 @@ static void test_NtQueryDirectoryFile(void)
mask.Buffer = testfiles[0].name;
mask.Length = mask.MaximumLength = lstrlenW(testfiles[0].name) * sizeof(WCHAR);
data_size = offsetof(FILE_BOTH_DIRECTORY_INFORMATION, FileName[256]);
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, FALSE);
ok(status == STATUS_SUCCESS, "failed to query directory; status %lx\n", status);
ok(U(io).Status == STATUS_SUCCESS, "failed to query directory; status %lx\n", U(io).Status);
ok(io.Status == STATUS_SUCCESS, "failed to query directory; status %lx\n", io.Status);
ok(fbdi->ShortName[0], "ShortName is empty\n");
status = pNtQueryInformationFile( dirh, &io, &pos_info, sizeof(pos_info), FilePositionInformation );
......@@ -534,14 +534,14 @@ static void test_NtQueryDirectoryFile(void)
mask.Length = mask.MaximumLength = fbdi->ShortNameLength;
memcpy(short_name, fbdi->ShortName, mask.Length);
mask.Buffer = short_name;
U(io).Status = 0xdeadbeef;
U(io).Information = 0xdeadbeef;
io.Status = 0xdeadbeef;
io.Information = 0xdeadbeef;
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, TRUE);
ok(status == STATUS_SUCCESS, "failed to query directory status %lx\n", status);
ok(U(io).Status == STATUS_SUCCESS, "failed to query directory status %lx\n", U(io).Status);
ok(U(io).Information == offsetof(FILE_BOTH_DIRECTORY_INFORMATION, FileName[lstrlenW(testfiles[0].name)]),
"wrong info %Ix\n", U(io).Information);
ok(io.Status == STATUS_SUCCESS, "failed to query directory status %lx\n", io.Status);
ok(io.Information == offsetof(FILE_BOTH_DIRECTORY_INFORMATION, FileName[lstrlenW(testfiles[0].name)]),
"wrong info %Ix\n", io.Information);
ok(fbdi->FileNameLength == lstrlenW(testfiles[0].name)*sizeof(WCHAR) &&
!memcmp(fbdi->FileName, testfiles[0].name, fbdi->FileNameLength),
"incorrect long file name: %s\n", wine_dbgstr_wn(fbdi->FileName,
......@@ -554,15 +554,15 @@ static void test_NtQueryDirectoryFile(void)
/* tests with short buffer */
memset( data, 0x55, data_size );
U(io).Status = 0xdeadbeef;
U(io).Information = 0xdeadbeef;
io.Status = 0xdeadbeef;
io.Information = 0xdeadbeef;
data_size = offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] );
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, TRUE);
ok( status == STATUS_BUFFER_OVERFLOW, "wrong status %lx\n", status );
ok( U(io).Status == STATUS_BUFFER_OVERFLOW, "wrong status %lx\n", U(io).Status );
ok( U(io).Information == data_size || broken( U(io).Information == 0),
"wrong info %Ix\n", U(io).Information );
ok( io.Status == STATUS_BUFFER_OVERFLOW, "wrong status %lx\n", io.Status );
ok( io.Information == data_size || broken( io.Information == 0),
"wrong info %Ix\n", io.Information );
ok( fbdi->NextEntryOffset == 0 || fbdi->NextEntryOffset == 0x55555555, /* win10 >= 1709 */
"wrong offset %lx\n", fbdi->NextEntryOffset );
if (!fbdi->NextEntryOffset)
......@@ -579,12 +579,12 @@ static void test_NtQueryDirectoryFile(void)
/* mask may or may not be ignored when restarting the search */
pRtlInitUnicodeString( &mask, dummyW );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
data_size = offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[256] );
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, TRUE);
ok( status == STATUS_SUCCESS || status == STATUS_NO_MORE_FILES, "wrong status %lx\n", status );
ok( U(io).Status == status, "wrong status %lx / %lx\n", U(io).Status, status );
ok( io.Status == status, "wrong status %lx / %lx\n", io.Status, status );
if (!status)
ok( fbdi->FileNameLength == lstrlenW(testfiles[0].name)*sizeof(WCHAR) &&
!memcmp(fbdi->FileName, testfiles[0].name, fbdi->FileNameLength),
......@@ -599,13 +599,13 @@ static void test_NtQueryDirectoryFile(void)
memset( data, 0x55, data_size );
data_size = sizeof(data);
U(io).Status = 0xdeadbeef;
U(io).Information = 0xdeadbeef;
io.Status = 0xdeadbeef;
io.Information = 0xdeadbeef;
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, FALSE, NULL, TRUE);
ok(status == STATUS_SUCCESS, "wrong status %lx\n", status);
ok(U(io).Status == STATUS_SUCCESS, "wrong status %lx\n", U(io).Status);
ok(U(io).Information > 0 && U(io).Information < data_size, "wrong info %Ix\n", U(io).Information);
ok(io.Status == STATUS_SUCCESS, "wrong status %lx\n", io.Status);
ok(io.Information > 0 && io.Information < data_size, "wrong info %Ix\n", io.Information);
ok( fbdi->NextEntryOffset == ((offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7),
"wrong offset %lx\n", fbdi->NextEntryOffset );
ok( fbdi->FileNameLength == sizeof(WCHAR), "wrong length %lx\n", fbdi->FileNameLength );
......@@ -621,14 +621,14 @@ static void test_NtQueryDirectoryFile(void)
data_size = fbdi->NextEntryOffset + offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] );
memset( data, 0x55, data_size );
U(io).Status = 0xdeadbeef;
U(io).Information = 0xdeadbeef;
io.Status = 0xdeadbeef;
io.Information = 0xdeadbeef;
status = pNtQueryDirectoryFile( dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, FALSE, NULL, TRUE );
ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
ok( U(io).Status == STATUS_SUCCESS, "wrong status %lx\n", U(io).Status );
ok( U(io).Information == offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ),
"wrong info %Ix\n", U(io).Information );
ok( io.Status == STATUS_SUCCESS, "wrong status %lx\n", io.Status );
ok( io.Information == offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ),
"wrong info %Ix\n", io.Information );
ok( fbdi->NextEntryOffset == 0, "wrong offset %lx\n", fbdi->NextEntryOffset );
ok( fbdi->FileNameLength == sizeof(WCHAR), "wrong length %lx\n", fbdi->FileNameLength );
ok( fbdi->FileName[0] == '.', "incorrect long file name: %s\n",
......@@ -638,27 +638,27 @@ static void test_NtQueryDirectoryFile(void)
data_size = fbdi->NextEntryOffset + offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[2] );
memset( data, 0x55, data_size );
U(io).Status = 0xdeadbeef;
U(io).Information = 0xdeadbeef;
io.Status = 0xdeadbeef;
io.Information = 0xdeadbeef;
status = pNtQueryDirectoryFile( dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, FALSE, NULL, TRUE );
ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
ok( U(io).Status == STATUS_SUCCESS, "wrong status %lx\n", U(io).Status );
ok( U(io).Information == offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ),
"wrong info %Ix\n", U(io).Information );
ok( io.Status == STATUS_SUCCESS, "wrong status %lx\n", io.Status );
ok( io.Information == offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ),
"wrong info %Ix\n", io.Information );
ok( fbdi->NextEntryOffset == 0, "wrong offset %lx\n", fbdi->NextEntryOffset );
data_size = ((offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7) +
offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[2] );
memset( data, 0x55, data_size );
U(io).Status = 0xdeadbeef;
U(io).Information = 0xdeadbeef;
io.Status = 0xdeadbeef;
io.Information = 0xdeadbeef;
status = pNtQueryDirectoryFile( dirh, 0, NULL, NULL, &io, data, (data_size + 7) & ~7,
FileBothDirectoryInformation, FALSE, NULL, TRUE );
ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
ok( U(io).Status == STATUS_SUCCESS, "wrong status %lx\n", U(io).Status );
ok( U(io).Information == data_size || U(io).Information == ((data_size + 7) & ~7),
"wrong info %Ix / %x\n", U(io).Information, data_size );
ok( io.Status == STATUS_SUCCESS, "wrong status %lx\n", io.Status );
ok( io.Information == data_size || io.Information == ((data_size + 7) & ~7),
"wrong info %Ix / %x\n", io.Information, data_size );
ok( fbdi->NextEntryOffset == ((offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7),
"wrong offset %lx\n", fbdi->NextEntryOffset );
ok( fbdi->FileNameLength == sizeof(WCHAR), "wrong length %lx\n", fbdi->FileNameLength );
......@@ -674,13 +674,13 @@ static void test_NtQueryDirectoryFile(void)
data_size = ((offsetof( FILE_NAMES_INFORMATION, FileName[1] ) + 7) & ~7) +
offsetof( FILE_NAMES_INFORMATION, FileName[2] );
memset( data, 0x55, data_size );
U(io).Status = 0xdeadbeef;
U(io).Information = 0xdeadbeef;
io.Status = 0xdeadbeef;
io.Information = 0xdeadbeef;
status = pNtQueryDirectoryFile( dirh, 0, NULL, NULL, &io, data, data_size,
FileNamesInformation, FALSE, NULL, TRUE );
ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
ok( U(io).Status == STATUS_SUCCESS, "wrong status %lx\n", U(io).Status );
ok( U(io).Information == data_size, "wrong info %Ix / %x\n", U(io).Information, data_size );
ok( io.Status == STATUS_SUCCESS, "wrong status %lx\n", io.Status );
ok( io.Information == data_size, "wrong info %Ix / %x\n", io.Information, data_size );
names = (FILE_NAMES_INFORMATION *)data;
ok( names->NextEntryOffset == ((offsetof( FILE_NAMES_INFORMATION, FileName[1] ) + 7) & ~7),
"wrong offset %lx\n", names->NextEntryOffset );
......@@ -702,42 +702,42 @@ static void test_NtQueryDirectoryFile(void)
ok(status == STATUS_SUCCESS, "failed to open dir '%s'\n", testdirA);
pRtlInitUnicodeString( &mask, dummyW );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
data_size = sizeof(data);
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, TRUE);
ok(status == STATUS_NO_SUCH_FILE, "wrong status %lx\n", status);
ok(U(io).Status == 0xdeadbeef, "wrong status %lx\n", U(io).Status);
ok(io.Status == 0xdeadbeef, "wrong status %lx\n", io.Status);
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, NULL, FALSE);
ok(status == STATUS_NO_MORE_FILES, "wrong status %lx\n", status);
ok(U(io).Status == STATUS_NO_MORE_FILES, "wrong status %lx\n", U(io).Status);
ok(io.Status == STATUS_NO_MORE_FILES, "wrong status %lx\n", io.Status);
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, NULL, TRUE);
ok(status == STATUS_NO_MORE_FILES, "wrong status %lx\n", status);
ok(U(io).Status == STATUS_NO_MORE_FILES, "wrong status %lx\n", U(io).Status);
ok(io.Status == STATUS_NO_MORE_FILES, "wrong status %lx\n", io.Status);
pNtClose(dirh);
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( (HANDLE)0xbeef, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, NULL, TRUE );
ok(status == STATUS_INVALID_HANDLE, "wrong status %lx\n", status);
ok(U(io).Status == 0xdeadbeef, "wrong status %lx\n", U(io).Status);
ok(io.Status == 0xdeadbeef, "wrong status %lx\n", io.Status);
GetModuleFileNameA( 0, buffer, sizeof(buffer) );
h = CreateFileA( buffer, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 );
if (h != INVALID_HANDLE_VALUE)
{
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( h, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, NULL, TRUE );
ok(status == STATUS_INVALID_PARAMETER, "wrong status %lx\n", status);
ok(U(io).Status == 0xdeadbeef, "wrong status %lx\n", U(io).Status);
ok(io.Status == 0xdeadbeef, "wrong status %lx\n", io.Status);
CloseHandle ( h );
}
......@@ -824,7 +824,7 @@ static void test_NtQueryDirectoryFile_case(void)
mask.Length = mask.MaximumLength = sizeof(testmask);
pNtQueryDirectoryFile(dirh, NULL, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, FALSE);
ok(U(io).Status == STATUS_SUCCESS, "failed to query directory; status %lx\n", U(io).Status);
ok(io.Status == STATUS_SUCCESS, "failed to query directory; status %lx\n", io.Status);
data_len = io.Information;
ok(data_len >= sizeof(FILE_BOTH_DIRECTORY_INFORMATION), "not enough data in directory\n");
......
......@@ -129,7 +129,7 @@ static void WINAPI apc( void *arg, IO_STATUS_BLOCK *iosb, ULONG reserved )
int *count = arg;
trace( "apc called block %p iosb.status %lx iosb.info %Iu\n",
iosb, U(*iosb).Status, iosb->Information );
iosb, iosb->Status, iosb->Information );
(*count)++;
ok( !reserved, "reserved is not 0: %lx\n", reserved );
}
......@@ -169,7 +169,7 @@ static void create_file_test(void)
FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN, FILE_DIRECTORY_FILE, NULL, 0 );
ok( !status, "open %s failed %lx\n", wine_dbgstr_w(nameW.Buffer), status );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
offset.QuadPart = 0;
status = pNtReadFile( dir, NULL, NULL, NULL, &io, buf, sizeof(buf), &offset, NULL );
ok( status == STATUS_INVALID_DEVICE_REQUEST || status == STATUS_PENDING, "NtReadFile error %08lx\n", status );
......@@ -177,11 +177,11 @@ static void create_file_test(void)
{
ret = WaitForSingleObject( dir, 1000 );
ok( ret == WAIT_OBJECT_0, "WaitForSingleObject error %lu\n", ret );
ok( U(io).Status == STATUS_INVALID_DEVICE_REQUEST,
"expected STATUS_INVALID_DEVICE_REQUEST, got %08lx\n", U(io).Status );
ok( io.Status == STATUS_INVALID_DEVICE_REQUEST,
"expected STATUS_INVALID_DEVICE_REQUEST, got %08lx\n", io.Status );
}
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
offset.QuadPart = 0;
status = pNtWriteFile( dir, NULL, NULL, NULL, &io, testdata, sizeof(testdata), &offset, NULL);
todo_wine
......@@ -190,8 +190,8 @@ static void create_file_test(void)
{
ret = WaitForSingleObject( dir, 1000 );
ok( ret == WAIT_OBJECT_0, "WaitForSingleObject error %lu\n", ret );
ok( U(io).Status == STATUS_INVALID_DEVICE_REQUEST,
"expected STATUS_INVALID_DEVICE_REQUEST, got %08lx\n", U(io).Status );
ok( io.Status == STATUS_INVALID_DEVICE_REQUEST,
"expected STATUS_INVALID_DEVICE_REQUEST, got %08lx\n", io.Status );
}
CloseHandle( dir );
......@@ -637,7 +637,7 @@ static void read_file_test(void)
if (!(handle = create_temp_file( FILE_FLAG_OVERLAPPED ))) return;
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
offset.QuadPart = 0;
ResetEvent( event );
......@@ -645,7 +645,7 @@ static void read_file_test(void)
ok( status == STATUS_PENDING || broken(status == STATUS_SUCCESS) /* before Vista */,
"wrong status %lx.\n", status );
if (status == STATUS_PENDING) WaitForSingleObject( event, 1000 );
ok( U(iosb).Status == STATUS_SUCCESS, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_SUCCESS, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == strlen(text), "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
......@@ -653,7 +653,7 @@ static void read_file_test(void)
ok( apc_count == 1, "apc was not called\n" );
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
offset.QuadPart = 0;
ResetEvent( event );
......@@ -662,7 +662,7 @@ static void read_file_test(void)
|| broken(status == STATUS_SUCCESS) /* before Vista */,
"wrong status %lx.\n", status);
if (status == STATUS_PENDING) WaitForSingleObject( event, 1000 );
ok( U(iosb).Status == STATUS_SUCCESS, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_SUCCESS, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == strlen(text), "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
......@@ -671,7 +671,7 @@ static void read_file_test(void)
/* read beyond eof */
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
offset.QuadPart = strlen(text) + 2;
status = pNtReadFile( handle, event, apc, &apc_count, &iosb, buffer, 2, &offset, NULL );
......@@ -680,7 +680,7 @@ static void read_file_test(void)
if (status == STATUS_PENDING) /* vista */
{
WaitForSingleObject( event, 1000 );
ok( U(iosb).Status == STATUS_END_OF_FILE, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_END_OF_FILE, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
......@@ -692,7 +692,7 @@ static void read_file_test(void)
/* now a non-overlapped file */
if (!(handle = create_temp_file(0))) return;
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
offset.QuadPart = 0;
status = pNtWriteFile( handle, event, apc, &apc_count, &iosb, text, strlen(text), &offset, NULL );
......@@ -701,7 +701,7 @@ static void read_file_test(void)
status == STATUS_PENDING, /* vista */
"wrong status %lx\n", status );
if (status == STATUS_PENDING) WaitForSingleObject( event, 1000 );
ok( U(iosb).Status == STATUS_SUCCESS, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_SUCCESS, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == strlen(text), "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
......@@ -709,13 +709,13 @@ static void read_file_test(void)
ok( apc_count == 1, "apc was not called\n" );
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
offset.QuadPart = 0;
ResetEvent( event );
status = pNtReadFile( handle, event, apc, &apc_count, &iosb, buffer, strlen(text) + 10, &offset, NULL );
ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
ok( U(iosb).Status == STATUS_SUCCESS, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_SUCCESS, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == strlen(text), "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
......@@ -724,13 +724,13 @@ static void read_file_test(void)
/* read beyond eof */
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
offset.QuadPart = strlen(text) + 2;
ResetEvent( event );
status = pNtReadFile( handle, event, apc, &apc_count, &iosb, buffer, 2, &offset, NULL );
ok( status == STATUS_END_OF_FILE, "wrong status %lx\n", status );
ok( U(iosb).Status == STATUS_END_OF_FILE, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_END_OF_FILE, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
......@@ -744,7 +744,7 @@ static void read_file_test(void)
apc_count = 0;
offset.QuadPart = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
offset.QuadPart = 0;
ResetEvent(event);
......@@ -753,7 +753,7 @@ static void read_file_test(void)
ok(status == STATUS_END_OF_FILE || status == STATUS_PENDING
|| broken(status == STATUS_SUCCESS) /* before Vista */,
"Wrong status %lx.\n", status);
ok(U(iosb).Status == STATUS_SUCCESS, "Wrong status %lx.\n", U(iosb).Status);
ok(iosb.Status == STATUS_SUCCESS, "Wrong status %lx.\n", iosb.Status);
ok(iosb.Information == sizeof(aligned_buffer), "Wrong info %Iu.\n", iosb.Information);
ok(is_signaled(event), "event is not signaled.\n");
ok(!apc_count, "apc was called.\n");
......@@ -762,7 +762,7 @@ static void read_file_test(void)
apc_count = 0;
offset.QuadPart = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
offset.QuadPart = 0;
ResetEvent(event);
......@@ -770,7 +770,7 @@ static void read_file_test(void)
aligned_buffer, sizeof(aligned_buffer), &offset, NULL);
ok(status == STATUS_PENDING, "Wrong status %lx.\n", status);
WaitForSingleObject(event, 1000);
ok(U(iosb).Status == STATUS_SUCCESS, "Wrong status %lx.\n", U(iosb).Status);
ok(iosb.Status == STATUS_SUCCESS, "Wrong status %lx.\n", iosb.Status);
ok(iosb.Information == sizeof(aligned_buffer), "Wrong info %Iu.\n", iosb.Information);
ok(is_signaled(event), "event is not signaled.\n");
ok(!apc_count, "apc was called.\n");
......@@ -797,11 +797,11 @@ static void append_file_test(void)
handle = CreateFileA(buffer, FILE_WRITE_DATA, 0, NULL, CREATE_ALWAYS, 0, 0);
ok(handle != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError());
U(iosb).Status = -1;
iosb.Status = -1;
iosb.Information = -1;
status = pNtWriteFile(handle, NULL, NULL, NULL, &iosb, text, 2, NULL, NULL);
ok(status == STATUS_SUCCESS, "NtWriteFile error %#lx\n", status);
ok(U(iosb).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iosb).Status);
ok(iosb.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iosb.Status);
ok(iosb.Information == 2, "expected 2, got %Iu\n", iosb.Information);
CloseHandle(handle);
......@@ -811,23 +811,23 @@ static void append_file_test(void)
handle = CreateFileA(buffer, FILE_APPEND_DATA, 0, NULL, OPEN_EXISTING, 0, 0);
ok(handle != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError());
U(iosb).Status = -1;
iosb.Status = -1;
iosb.Information = -1;
offset.QuadPart = 1;
status = pNtWriteFile(handle, NULL, NULL, NULL, &iosb, text + 2, 2, &offset, NULL);
ok(status == STATUS_SUCCESS, "NtWriteFile error %#lx\n", status);
ok(U(iosb).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iosb).Status);
ok(iosb.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iosb.Status);
ok(iosb.Information == 2, "expected 2, got %Iu\n", iosb.Information);
ret = SetFilePointer(handle, 0, NULL, FILE_CURRENT);
ok(ret == 4, "expected 4, got %lu\n", ret);
U(iosb).Status = -1;
iosb.Status = -1;
iosb.Information = -1;
offset.QuadPart = 3;
status = pNtWriteFile(handle, NULL, NULL, NULL, &iosb, text + 4, 2, &offset, NULL);
ok(status == STATUS_SUCCESS, "NtWriteFile error %#lx\n", status);
ok(U(iosb).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iosb).Status);
ok(iosb.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iosb.Status);
ok(iosb.Information == 2, "expected 2, got %Iu\n", iosb.Information);
ret = SetFilePointer(handle, 0, NULL, FILE_CURRENT);
......@@ -839,31 +839,31 @@ static void append_file_test(void)
ok(handle != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError());
memset(buf, 0, sizeof(buf));
U(iosb).Status = -1;
iosb.Status = -1;
iosb.Information = -1;
offset.QuadPart = 0;
status = pNtReadFile(handle, 0, NULL, NULL, &iosb, buf, sizeof(buf), &offset, NULL);
ok(status == STATUS_SUCCESS, "NtReadFile error %#lx\n", status);
ok(U(iosb).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iosb).Status);
ok(iosb.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iosb.Status);
ok(iosb.Information == 6, "expected 6, got %Iu\n", iosb.Information);
buf[6] = 0;
ok(memcmp(buf, text, 6) == 0, "wrong file contents: %s\n", buf);
U(iosb).Status = -1;
iosb.Status = -1;
iosb.Information = -1;
offset.QuadPart = 0;
status = pNtWriteFile(handle, NULL, NULL, NULL, &iosb, text + 3, 3, &offset, NULL);
ok(status == STATUS_SUCCESS, "NtWriteFile error %#lx\n", status);
ok(U(iosb).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iosb).Status);
ok(iosb.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iosb.Status);
ok(iosb.Information == 3, "expected 3, got %Iu\n", iosb.Information);
memset(buf, 0, sizeof(buf));
U(iosb).Status = -1;
iosb.Status = -1;
iosb.Information = -1;
offset.QuadPart = 0;
status = pNtReadFile(handle, 0, NULL, NULL, &iosb, buf, sizeof(buf), &offset, NULL);
ok(status == STATUS_SUCCESS, "NtReadFile error %#lx\n", status);
ok(U(iosb).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iosb).Status);
ok(iosb.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iosb.Status);
ok(iosb.Information == 6, "expected 6, got %Iu\n", iosb.Information);
buf[6] = 0;
ok(memcmp(buf, "barbar", 6) == 0, "wrong file contents: %s\n", buf);
......@@ -970,7 +970,7 @@ static void test_set_io_completion(void)
ok( res == STATUS_SUCCESS, "NtRemoveIoCompletion failed: %#lx\n", res );
ok( key == CKEY_FIRST, "Invalid completion key: %#Ix\n", key );
ok( iosb.Information == size, "Invalid iosb.Information: %Iu\n", iosb.Information );
ok( U(iosb).Status == STATUS_INVALID_DEVICE_REQUEST, "Invalid iosb.Status: %#lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_INVALID_DEVICE_REQUEST, "Invalid iosb.Status: %#lx\n", iosb.Status );
ok( value == CVALUE_FIRST, "Invalid completion value: %#Ix\n", value );
count = get_pending_msgs(h);
......@@ -999,7 +999,7 @@ static void test_set_io_completion(void)
ok( info[0].CompletionValue == 456, "wrong value %#Ix\n", info[0].CompletionValue );
ok( info[0].IoStatusBlock.Information == size, "wrong information %#Ix\n",
info[0].IoStatusBlock.Information );
ok( U(info[0].IoStatusBlock).Status == 789, "wrong status %#lx\n", U(info[0].IoStatusBlock).Status);
ok( info[0].IoStatusBlock.Status == 789, "wrong status %#lx\n", info[0].IoStatusBlock.Status);
res = pNtSetIoCompletion( h, 123, 456, 789, size );
ok( res == STATUS_SUCCESS, "NtSetIoCompletion failed: %#lx\n", res );
......@@ -1015,12 +1015,12 @@ static void test_set_io_completion(void)
ok( info[0].CompletionValue == 456, "wrong value %#Ix\n", info[0].CompletionValue );
ok( info[0].IoStatusBlock.Information == size, "wrong information %#Ix\n",
info[0].IoStatusBlock.Information );
ok( U(info[0].IoStatusBlock).Status == 789, "wrong status %#lx\n", U(info[0].IoStatusBlock).Status);
ok( info[0].IoStatusBlock.Status == 789, "wrong status %#lx\n", info[0].IoStatusBlock.Status);
ok( info[1].CompletionKey == 12, "wrong key %#Ix\n", info[1].CompletionKey );
ok( info[1].CompletionValue == 34, "wrong value %#Ix\n", info[1].CompletionValue );
ok( info[1].IoStatusBlock.Information == size, "wrong information %#Ix\n",
info[1].IoStatusBlock.Information );
ok( U(info[1].IoStatusBlock).Status == 56, "wrong status %#lx\n", U(info[1].IoStatusBlock).Status);
ok( info[1].IoStatusBlock.Status == 56, "wrong status %#lx\n", info[1].IoStatusBlock.Status);
res = pNtSetIoCompletion( h, 123, 456, 789, size );
ok( res == STATUS_SUCCESS, "NtSetIoCompletion failed: %#lx\n", res );
......@@ -1036,7 +1036,7 @@ static void test_set_io_completion(void)
ok( info[0].CompletionValue == 456, "wrong value %#Ix\n", info[0].CompletionValue );
ok( info[0].IoStatusBlock.Information == size, "wrong information %#Ix\n",
info[0].IoStatusBlock.Information );
ok( U(info[0].IoStatusBlock).Status == 789, "wrong status %#lx\n", U(info[0].IoStatusBlock).Status);
ok( info[0].IoStatusBlock.Status == 789, "wrong status %#lx\n", info[0].IoStatusBlock.Status);
count = 0xdeadbeef;
res = pNtRemoveIoCompletionEx( h, info, 1, &count, NULL, FALSE );
......@@ -1046,7 +1046,7 @@ static void test_set_io_completion(void)
ok( info[0].CompletionValue == 34, "wrong value %#Ix\n", info[0].CompletionValue );
ok( info[0].IoStatusBlock.Information == size, "wrong information %#Ix\n",
info[0].IoStatusBlock.Information );
ok( U(info[0].IoStatusBlock).Status == 56, "wrong status %#lx\n", U(info[0].IoStatusBlock).Status);
ok( info[0].IoStatusBlock.Status == 56, "wrong status %#lx\n", info[0].IoStatusBlock.Status);
apc_count = 0;
QueueUserAPC( user_apc_proc, GetCurrentThread(), (ULONG_PTR)&apc_count );
......@@ -1109,11 +1109,11 @@ static void test_file_io_completion(void)
FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED, NULL );
ok( client != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError() );
U(iosb).Status = 0xdeadbeef;
iosb.Status = 0xdeadbeef;
res = pNtSetInformationFile( server, &iosb, &fci, sizeof(fci), FileCompletionInformation );
ok( res == STATUS_INVALID_PARAMETER, "NtSetInformationFile failed: %#lx\n", res );
todo_wine
ok( U(iosb).Status == 0xdeadbeef, "wrong status %#lx\n", U(iosb).Status );
ok( iosb.Status == 0xdeadbeef, "wrong status %#lx\n", iosb.Status );
CloseHandle( client );
CloseHandle( server );
......@@ -1125,10 +1125,10 @@ static void test_file_io_completion(void)
FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED, NULL );
ok( client != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError() );
U(iosb).Status = 0xdeadbeef;
iosb.Status = 0xdeadbeef;
res = pNtSetInformationFile( server, &iosb, &fci, sizeof(fci), FileCompletionInformation );
ok( res == STATUS_SUCCESS, "NtSetInformationFile failed: %#lx\n", res );
ok( U(iosb).Status == STATUS_SUCCESS, "wrong status %#lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_SUCCESS, "wrong status %#lx\n", iosb.Status );
memset( send_buf, 0, TEST_BUF_LEN );
memset( recv_buf, 0xde, TEST_BUF_LEN );
......@@ -1143,7 +1143,7 @@ static void test_file_io_completion(void)
ok( res == STATUS_SUCCESS, "NtRemoveIoCompletion failed: %#lx\n", res );
ok( key == CKEY_SECOND, "Invalid completion key: %#Ix\n", key );
ok( iosb.Information == 3, "Invalid iosb.Information: %Id\n", iosb.Information );
ok( U(iosb).Status == STATUS_SUCCESS, "Invalid iosb.Status: %#lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_SUCCESS, "Invalid iosb.Status: %#lx\n", iosb.Status );
ok( value == (ULONG_PTR)&o, "Invalid completion value: %#Ix\n", value );
ok( !memcmp( send_buf, recv_buf, TEST_BUF_LEN ),
"Receive buffer (%02x %02x %02x) did not match send buffer (%02x %02x %02x)\n",
......@@ -1164,7 +1164,7 @@ static void test_file_io_completion(void)
ok( res == STATUS_SUCCESS, "NtRemoveIoCompletion failed: %#lx\n", res );
ok( key == CKEY_SECOND, "Invalid completion key: %#Ix\n", key );
ok( iosb.Information == 2, "Invalid iosb.Information: %Id\n", iosb.Information );
ok( U(iosb).Status == STATUS_SUCCESS, "Invalid iosb.Status: %#lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_SUCCESS, "Invalid iosb.Status: %#lx\n", iosb.Status );
ok( value == (ULONG_PTR)&o, "Invalid completion value: %#Ix\n", value );
ok( !memcmp( send_buf, recv_buf, 2 ),
"Receive buffer (%02x %02x) did not match send buffer (%02x %02x)\n",
......@@ -1179,7 +1179,7 @@ static void test_file_io_completion(void)
ok( res == STATUS_SUCCESS, "NtRemoveIoCompletion failed: %#lx\n", res );
ok( key == CKEY_SECOND, "Invalid completion key: %Ix\n", key );
ok( iosb.Information == 0, "Invalid iosb.Information: %Id\n", iosb.Information );
ok( U(iosb).Status == STATUS_PIPE_BROKEN, "Invalid iosb.Status: %lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_PIPE_BROKEN, "Invalid iosb.Status: %lx\n", iosb.Status );
ok( value == (ULONG_PTR)&o, "Invalid completion value: %Ix\n", value );
CloseHandle( client );
......@@ -1199,10 +1199,10 @@ static void test_file_io_completion(void)
ok( !count, "Unexpected msg count: %ld\n", count );
ReadFile( server, recv_buf, TEST_BUF_LEN, &read, &o);
U(iosb).Status = 0xdeadbeef;
iosb.Status = 0xdeadbeef;
res = pNtSetInformationFile( server, &iosb, &fci, sizeof(fci), FileCompletionInformation );
ok( res == STATUS_SUCCESS, "NtSetInformationFile failed: %lx\n", res );
ok( U(iosb).Status == STATUS_SUCCESS, "iosb.Status invalid: %lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_SUCCESS, "iosb.Status invalid: %lx\n", iosb.Status );
count = get_pending_msgs(h);
ok( !count, "Unexpected msg count: %ld\n", count );
......@@ -1212,7 +1212,7 @@ static void test_file_io_completion(void)
ok( res == STATUS_SUCCESS, "NtRemoveIoCompletion failed: %#lx\n", res );
ok( key == CKEY_SECOND, "Invalid completion key: %#Ix\n", key );
ok( iosb.Information == 3, "Invalid iosb.Information: %Id\n", iosb.Information );
ok( U(iosb).Status == STATUS_SUCCESS, "Invalid iosb.Status: %#lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_SUCCESS, "Invalid iosb.Status: %#lx\n", iosb.Status );
ok( value == (ULONG_PTR)&o, "Invalid completion value: %#Ix\n", value );
ok( !memcmp( send_buf, recv_buf, TEST_BUF_LEN ),
"Receive buffer (%02x %02x %02x) did not match send buffer (%02x %02x %02x)\n",
......@@ -1246,10 +1246,10 @@ static void test_file_io_completion(void)
res = pNtReadFile( server, NULL, apc, &apc_count, &iosb, recv_buf, sizeof(recv_buf), NULL, NULL );
ok(res == STATUS_PENDING, "NtReadFile returned %lx\n", res);
U(iosb).Status = 0xdeadbeef;
iosb.Status = 0xdeadbeef;
res = pNtSetInformationFile( server, &iosb, &fci, sizeof(fci), FileCompletionInformation );
ok( res == STATUS_SUCCESS, "NtSetInformationFile failed: %lx\n", res );
ok( U(iosb).Status == STATUS_SUCCESS, "iosb.Status invalid: %lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_SUCCESS, "iosb.Status invalid: %lx\n", iosb.Status );
count = get_pending_msgs(h);
ok( !count, "Unexpected msg count: %ld\n", count );
......@@ -1348,20 +1348,20 @@ static void test_file_basic_information(void)
memset(&fbi2, 0, sizeof(fbi2));
fbi2.LastWriteTime.QuadPart = -1;
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile(h, &io, &fbi2, sizeof fbi2, FileBasicInformation);
ok ( res == STATUS_SUCCESS, "can't set system attribute, NtSetInformationFile returned %x\n", res );
ok ( U(io).Status == STATUS_SUCCESS, "can't set system attribute, io.Status is %lx\n", U(io).Status );
ok ( io.Status == STATUS_SUCCESS, "can't set system attribute, io.Status is %lx\n", io.Status );
memset(&fbi2, 0, sizeof(fbi2));
fbi2.LastAccessTime.QuadPart = 0x200deadcafebeef;
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile(h, &io, &fbi2, sizeof(fbi2), FileBasicInformation);
ok ( res == STATUS_SUCCESS, "can't set system attribute, NtSetInformationFile returned %x\n", res );
ok ( U(io).Status == STATUS_SUCCESS, "can't set system attribute, io.Status is %lx\n", U(io).Status );
ok ( io.Status == STATUS_SUCCESS, "can't set system attribute, io.Status is %lx\n", io.Status );
res = pNtQueryInformationFile(h, &io, &fbi, sizeof(fbi), FileBasicInformation);
ok ( res == STATUS_SUCCESS, "can't get system attribute, NtQueryInformationFile returned %x\n", res );
ok ( U(io).Status == STATUS_SUCCESS, "can't get system attribute, io.Status is %lx\n", U(io).Status );
ok ( io.Status == STATUS_SUCCESS, "can't get system attribute, io.Status is %lx\n", io.Status );
ok ( fbi2.LastAccessTime.QuadPart == fbi.LastAccessTime.QuadPart,
"large access time set/get does not match.\n" );
......@@ -1371,10 +1371,10 @@ static void test_file_basic_information(void)
ok ( fbi2.LastWriteTime.QuadPart == fbi.LastWriteTime.QuadPart, "unexpected write time.\n");
memset(&fbi2, 0, sizeof(fbi2));
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile(h, &io, &fbi2, sizeof fbi2, FileBasicInformation);
ok ( res == STATUS_SUCCESS, "can't set system attribute, NtSetInformationFile returned %x\n", res );
ok ( U(io).Status == STATUS_SUCCESS, "can't set system attribute, io.Status is %lx\n", U(io).Status );
ok ( io.Status == STATUS_SUCCESS, "can't set system attribute, io.Status is %lx\n", io.Status );
memset(&fbi2, 0, sizeof(fbi2));
res = pNtQueryInformationFile(h, &io, &fbi2, sizeof fbi2, FileBasicInformation);
......@@ -1385,10 +1385,10 @@ static void test_file_basic_information(void)
/* Clear fbi to avoid setting times */
memset(&fbi, 0, sizeof(fbi));
fbi.FileAttributes = FILE_ATTRIBUTE_SYSTEM;
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation);
ok ( res == STATUS_SUCCESS, "can't set system attribute, NtSetInformationFile returned %x\n", res );
ok ( U(io).Status == STATUS_SUCCESS, "can't set system attribute, io.Status is %lx\n", U(io).Status );
ok ( io.Status == STATUS_SUCCESS, "can't set system attribute, io.Status is %lx\n", io.Status );
memset(&fbi, 0, sizeof(fbi));
res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation);
......@@ -1398,10 +1398,10 @@ static void test_file_basic_information(void)
/* Then HIDDEN */
memset(&fbi, 0, sizeof(fbi));
fbi.FileAttributes = FILE_ATTRIBUTE_HIDDEN;
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation);
ok ( res == STATUS_SUCCESS, "can't set system attribute, NtSetInformationFile returned %x\n", res );
ok ( U(io).Status == STATUS_SUCCESS, "can't set system attribute, io.Status is %lx\n", U(io).Status );
ok ( io.Status == STATUS_SUCCESS, "can't set system attribute, io.Status is %lx\n", io.Status );
memset(&fbi, 0, sizeof(fbi));
res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation);
......@@ -1411,10 +1411,10 @@ static void test_file_basic_information(void)
/* Check NORMAL last of all (to make sure we can clear attributes) */
memset(&fbi, 0, sizeof(fbi));
fbi.FileAttributes = FILE_ATTRIBUTE_NORMAL;
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation);
ok ( res == STATUS_SUCCESS, "can't set normal attribute, NtSetInformationFile returned %x\n", res );
ok ( U(io).Status == STATUS_SUCCESS, "can't set normal attribute, io.Status is %lx\n", U(io).Status );
ok ( io.Status == STATUS_SUCCESS, "can't set normal attribute, io.Status is %lx\n", io.Status );
memset(&fbi, 0, sizeof(fbi));
res = pNtQueryInformationFile(h, &io, &fbi, sizeof fbi, FileBasicInformation);
......@@ -1451,14 +1451,14 @@ static void test_file_all_information(void)
/* Clear fbi to avoid setting times */
memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation));
fai_buf.fai.BasicInformation.FileAttributes = FILE_ATTRIBUTE_SYSTEM;
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation);
ok ( res == STATUS_INVALID_INFO_CLASS || broken(res == STATUS_NOT_IMPLEMENTED), "shouldn't be able to set FileAllInformation, res %x\n", res);
todo_wine ok ( U(io).Status == 0xdeadbeef, "shouldn't be able to set FileAllInformation, io.Status is %lx\n", U(io).Status);
U(io).Status = 0xdeadbeef;
todo_wine ok ( io.Status == 0xdeadbeef, "shouldn't be able to set FileAllInformation, io.Status is %lx\n", io.Status);
io.Status = 0xdeadbeef;
res = pNtSetInformationFile(h, &io, &fai_buf.fai.BasicInformation, sizeof fai_buf.fai.BasicInformation, FileBasicInformation);
ok ( res == STATUS_SUCCESS, "can't set system attribute, res: %x\n", res );
ok ( U(io).Status == STATUS_SUCCESS, "can't set system attribute, io.Status: %lx\n", U(io).Status );
ok ( io.Status == STATUS_SUCCESS, "can't set system attribute, io.Status: %lx\n", io.Status );
memset(&fai_buf.fai, 0, sizeof(fai_buf.fai));
res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation);
......@@ -1468,10 +1468,10 @@ static void test_file_all_information(void)
/* Then HIDDEN */
memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation));
fai_buf.fai.BasicInformation.FileAttributes = FILE_ATTRIBUTE_HIDDEN;
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile(h, &io, &fai_buf.fai.BasicInformation, sizeof fai_buf.fai.BasicInformation, FileBasicInformation);
ok ( res == STATUS_SUCCESS, "can't set system attribute, res: %x\n", res );
ok ( U(io).Status == STATUS_SUCCESS, "can't set system attribute, io.Status: %lx\n", U(io).Status );
ok ( io.Status == STATUS_SUCCESS, "can't set system attribute, io.Status: %lx\n", io.Status );
memset(&fai_buf.fai, 0, sizeof(fai_buf.fai));
res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation);
......@@ -1481,10 +1481,10 @@ static void test_file_all_information(void)
/* Check NORMAL last of all (to make sure we can clear attributes) */
memset(&fai_buf.fai.BasicInformation, 0, sizeof(fai_buf.fai.BasicInformation));
fai_buf.fai.BasicInformation.FileAttributes = FILE_ATTRIBUTE_NORMAL;
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile(h, &io, &fai_buf.fai.BasicInformation, sizeof fai_buf.fai.BasicInformation, FileBasicInformation);
ok ( res == STATUS_SUCCESS, "can't set system attribute, res: %x\n", res );
ok ( U(io).Status == STATUS_SUCCESS, "can't set system attribute, io.Status: %lx\n", U(io).Status );
ok ( io.Status == STATUS_SUCCESS, "can't set system attribute, io.Status: %lx\n", io.Status );
memset(&fai_buf.fai, 0, sizeof(fai_buf.fai));
res = pNtQueryInformationFile(h, &io, &fai_buf.fai, sizeof fai_buf, FileAllInformation);
......@@ -1538,9 +1538,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
ok( U(io).Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", U(io).Status );
ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status );
ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( fileDeleted, "file should not exist\n" );
......@@ -1576,9 +1576,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_OBJECT_NAME_COLLISION, "res expected STATUS_OBJECT_NAME_COLLISION, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -1606,9 +1606,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
ok( U(io).Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", U(io).Status );
ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status );
ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( fileDeleted, "file should not exist\n" );
......@@ -1639,9 +1639,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_OBJECT_NAME_COLLISION, "res expected STATUS_OBJECT_NAME_COLLISION, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -1673,9 +1673,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_ACCESS_DENIED, "res expected STATUS_ACCESS_DENIED, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -1708,9 +1708,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
ok( U(io).Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", U(io).Status );
ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status );
ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( fileDeleted, "file should not exist\n" );
......@@ -1755,9 +1755,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
todo_wine ok( res == STATUS_ACCESS_DENIED, "res expected STATUS_ACCESS_DENIED, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
todo_wine ok( !fileDeleted, "file should exist\n" );
......@@ -1795,9 +1795,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_OBJECT_NAME_COLLISION, "res expected STATUS_OBJECT_NAME_COLLISION, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -1831,9 +1831,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_OBJECT_NAME_COLLISION, "res expected STATUS_OBJECT_NAME_COLLISION, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -1865,9 +1865,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
ok( U(io).Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", U(io).Status );
ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status );
ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( fileDeleted, "file should not exist\n" );
......@@ -1901,9 +1901,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_ACCESS_DENIED, "res expected STATUS_ACCESS_DENIED, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -1938,9 +1938,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_OBJECT_NAME_COLLISION, "res expected STATUS_OBJECT_NAME_COLLISION, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -1974,9 +1974,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_ACCESS_DENIED, "res expected STATUS_ACCESS_DENIED, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2013,9 +2013,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_ACCESS_DENIED, "res expected STATUS_ACCESS_DENIED, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2047,9 +2047,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_OBJECT_NAME_COLLISION, "res expected STATUS_OBJECT_NAME_COLLISION, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2080,9 +2080,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_ACCESS_DENIED, "res expected STATUS_ACCESS_DENIED, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2114,9 +2114,9 @@ static void test_file_rename_information(void)
fri->FileNameLength = lstrlenW(filename) * sizeof(WCHAR);
memcpy( fri->FileName, filename, fri->FileNameLength );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
ok( U(io).Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", U(io).Status );
ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status );
ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( fileDeleted, "file should not exist\n" );
......@@ -2151,9 +2151,9 @@ static void test_file_rename_information(void)
memcpy( fri->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation );
ok( U(io).Status == STATUS_SUCCESS, "got io status %#lx\n", U(io).Status );
ok( io.Status == STATUS_SUCCESS, "got io status %#lx\n", io.Status );
ok( res == STATUS_SUCCESS, "got status %lx\n", res );
ok( GetFileAttributesW( oldpath ) != INVALID_FILE_ATTRIBUTES, "file should exist\n" );
......@@ -2195,9 +2195,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
ok( U(io).Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", U(io).Status );
ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status );
ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2233,9 +2233,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_OBJECT_NAME_COLLISION, "res expected STATUS_OBJECT_NAME_COLLISION, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2263,9 +2263,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
ok( U(io).Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", U(io).Status );
ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status );
ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2294,9 +2294,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
ok( U(io).Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", U(io).Status );
ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status );
ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2336,9 +2336,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_OBJECT_NAME_COLLISION, "res expected STATUS_OBJECT_NAME_COLLISION, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2370,9 +2370,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_ACCESS_DENIED, "res expected STATUS_ACCESS_DENIED, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2405,9 +2405,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
todo_wine ok( U(io).Status == 0xdeadbeef , "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef , "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_FILE_IS_A_DIRECTORY, "res expected STATUS_FILE_IS_A_DIRECTORY, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2452,9 +2452,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_FILE_IS_A_DIRECTORY, "res expected STATUS_FILE_IS_A_DIRECTORY, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2486,9 +2486,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_OBJECT_NAME_COLLISION || res == STATUS_FILE_IS_A_DIRECTORY /* > Win XP */,
"res expected STATUS_OBJECT_NAME_COLLISION or STATUS_FILE_IS_A_DIRECTORY, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
......@@ -2523,9 +2523,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_OBJECT_NAME_COLLISION || res == STATUS_FILE_IS_A_DIRECTORY /* > Win XP */,
"res expected STATUS_OBJECT_NAME_COLLISION or STATUS_FILE_IS_A_DIRECTORY, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
......@@ -2558,9 +2558,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_FILE_IS_A_DIRECTORY, "res expected STATUS_FILE_IS_A_DIRECTORY, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2594,9 +2594,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_FILE_IS_A_DIRECTORY, "res expected STATUS_FILE_IS_A_DIRECTORY, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2631,9 +2631,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_OBJECT_NAME_COLLISION || res == STATUS_FILE_IS_A_DIRECTORY /* > Win XP */,
"res expected STATUS_OBJECT_NAME_COLLISION or STATUS_FILE_IS_A_DIRECTORY, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
......@@ -2668,9 +2668,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_FILE_IS_A_DIRECTORY, "res expected STATUS_FILE_IS_A_DIRECTORY, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2707,9 +2707,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_FILE_IS_A_DIRECTORY, "res expected STATUS_FILE_IS_A_DIRECTORY, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2741,9 +2741,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_OBJECT_NAME_COLLISION, "res expected STATUS_OBJECT_NAME_COLLISION, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2774,9 +2774,9 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "io.Status expected 0xdeadbeef, got %lx\n", io.Status );
ok( res == STATUS_ACCESS_DENIED, "res expected STATUS_ACCESS_DENIED, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2808,9 +2808,9 @@ static void test_file_link_information(void)
fli->FileNameLength = lstrlenW(filename) * sizeof(WCHAR);
memcpy( fli->FileName, filename, fli->FileNameLength );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
ok( U(io).Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", U(io).Status );
ok( io.Status == STATUS_SUCCESS, "io.Status expected STATUS_SUCCESS, got %lx\n", io.Status );
ok( res == STATUS_SUCCESS, "res expected STATUS_SUCCESS, got %lx\n", res );
fileDeleted = GetFileAttributesW( oldpath ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( !fileDeleted, "file should exist\n" );
......@@ -2845,15 +2845,15 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "got io status %#lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "got io status %#lx\n", io.Status );
ok( res == STATUS_OBJECT_NAME_COLLISION, "got status %lx\n", res );
fli->ReplaceIfExists = TRUE;
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
ok( U(io).Status == STATUS_SUCCESS, "got io status %#lx\n", U(io).Status );
ok( io.Status == STATUS_SUCCESS, "got io status %#lx\n", io.Status );
ok( res == STATUS_SUCCESS, "got status %lx\n", res );
ok( GetFileAttributesW( oldpath ) != INVALID_FILE_ATTRIBUTES, "file should exist\n" );
......@@ -2876,15 +2876,15 @@ static void test_file_link_information(void)
memcpy( fli->FileName, name_str.Buffer, name_str.Length );
pRtlFreeUnicodeString( &name_str );
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
todo_wine ok( U(io).Status == 0xdeadbeef, "got io status %#lx\n", U(io).Status );
todo_wine ok( io.Status == 0xdeadbeef, "got io status %#lx\n", io.Status );
ok( res == STATUS_OBJECT_NAME_COLLISION, "got status %lx\n", res );
fli->ReplaceIfExists = TRUE;
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
res = pNtSetInformationFile( handle, &io, fli, sizeof(FILE_LINK_INFORMATION) + fli->FileNameLength, FileLinkInformation );
ok( U(io).Status == STATUS_SUCCESS, "got io status %#lx\n", U(io).Status );
ok( io.Status == STATUS_SUCCESS, "got io status %#lx\n", io.Status );
ok( res == STATUS_SUCCESS, "got status %lx\n", res );
ok( GetFileAttributesW( oldpath ) != INVALID_FILE_ATTRIBUTES, "file should exist\n" );
......@@ -3607,8 +3607,8 @@ static void test_file_name_information(void)
hr = pNtQueryInformationFile( h, &io, info, sizeof(*info), FileNameInformation );
ok(hr == STATUS_BUFFER_OVERFLOW, "NtQueryInformationFile returned %#lx, expected %#lx.\n",
hr, STATUS_BUFFER_OVERFLOW);
ok(U(io).Status == STATUS_BUFFER_OVERFLOW, "io.Status is %#lx, expected %#lx.\n",
U(io).Status, STATUS_BUFFER_OVERFLOW);
ok(io.Status == STATUS_BUFFER_OVERFLOW, "io.Status is %#lx, expected %#lx.\n",
io.Status, STATUS_BUFFER_OVERFLOW);
ok(info->FileNameLength == lstrlenW( expected ) * sizeof(WCHAR), "info->FileNameLength is %lu\n", info->FileNameLength);
ok(info->FileName[2] == 0xcccc, "info->FileName[2] is %#x, expected 0xcccc.\n", info->FileName[2]);
ok(CharLowerW((LPWSTR)(UINT_PTR)info->FileName[1]) == CharLowerW((LPWSTR)(UINT_PTR)expected[1]),
......@@ -3619,7 +3619,7 @@ static void test_file_name_information(void)
memset( info, 0xcc, info_size );
hr = pNtQueryInformationFile( h, &io, info, info_size, FileNameInformation );
ok(hr == STATUS_SUCCESS, "NtQueryInformationFile returned %#lx, expected %#lx.\n", hr, STATUS_SUCCESS);
ok(U(io).Status == STATUS_SUCCESS, "io.Status is %#lx, expected %#lx.\n", U(io).Status, STATUS_SUCCESS);
ok(io.Status == STATUS_SUCCESS, "io.Status is %#lx, expected %#lx.\n", io.Status, STATUS_SUCCESS);
ok(info->FileNameLength == lstrlenW( expected ) * sizeof(WCHAR), "info->FileNameLength is %lu\n", info->FileNameLength);
ok(info->FileName[info->FileNameLength / sizeof(WCHAR)] == 0xcccc, "info->FileName[len] is %#x, expected 0xcccc.\n",
info->FileName[info->FileNameLength / sizeof(WCHAR)]);
......@@ -3737,8 +3737,8 @@ static void test_file_all_name_information(void)
hr = pNtQueryInformationFile( h, &io, info, sizeof(*info), FileAllInformation );
ok(hr == STATUS_BUFFER_OVERFLOW, "NtQueryInformationFile returned %#lx, expected %#lx.\n",
hr, STATUS_BUFFER_OVERFLOW);
ok(U(io).Status == STATUS_BUFFER_OVERFLOW, "io.Status is %#lx, expected %#lx.\n",
U(io).Status, STATUS_BUFFER_OVERFLOW);
ok(io.Status == STATUS_BUFFER_OVERFLOW, "io.Status is %#lx, expected %#lx.\n",
io.Status, STATUS_BUFFER_OVERFLOW);
ok(info->NameInformation.FileNameLength == lstrlenW( expected ) * sizeof(WCHAR),
"info->NameInformation.FileNameLength is %lu\n", info->NameInformation.FileNameLength );
ok(info->NameInformation.FileName[2] == 0xcccc,
......@@ -3751,7 +3751,7 @@ static void test_file_all_name_information(void)
memset( info, 0xcc, info_size );
hr = pNtQueryInformationFile( h, &io, info, info_size, FileAllInformation );
ok(hr == STATUS_SUCCESS, "NtQueryInformationFile returned %#lx, expected %#lx.\n", hr, STATUS_SUCCESS);
ok(U(io).Status == STATUS_SUCCESS, "io.Status is %#lx, expected %#lx.\n", U(io).Status, STATUS_SUCCESS);
ok(io.Status == STATUS_SUCCESS, "io.Status is %#lx, expected %#lx.\n", io.Status, STATUS_SUCCESS);
ok(info->NameInformation.FileNameLength == lstrlenW( expected ) * sizeof(WCHAR),
"info->NameInformation.FileNameLength is %lu\n", info->NameInformation.FileNameLength );
ok(info->NameInformation.FileName[info->NameInformation.FileNameLength / sizeof(WCHAR)] == 0xcccc,
......@@ -4337,7 +4337,7 @@ static void test_query_volume_information_file(void)
pRtlFreeUnicodeString( &nameW );
ZeroMemory( buf, sizeof(buf) );
U(io).Status = 0xdadadada;
io.Status = 0xdadadada;
io.Information = 0xcacacaca;
status = pNtQueryVolumeInformationFile( dir, &io, buf, sizeof(buf), FileFsVolumeInformation );
......@@ -4345,7 +4345,7 @@ static void test_query_volume_information_file(void)
ffvi = (FILE_FS_VOLUME_INFORMATION *)buf;
ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %ld\n", status);
ok(U(io).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %ld\n", U(io).Status);
ok(io.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %ld\n", io.Status);
ok(io.Information == (FIELD_OFFSET(FILE_FS_VOLUME_INFORMATION, VolumeLabel) + ffvi->VolumeLabelLength),
"expected %ld, got %Iu\n", (FIELD_OFFSET(FILE_FS_VOLUME_INFORMATION, VolumeLabel) + ffvi->VolumeLabelLength),
......@@ -4387,7 +4387,7 @@ static void test_query_attribute_information_file(void)
pRtlFreeUnicodeString( &nameW );
ZeroMemory( buf, sizeof(buf) );
U(io).Status = 0xdadadada;
io.Status = 0xdadadada;
io.Information = 0xcacacaca;
status = pNtQueryVolumeInformationFile( dir, &io, buf, sizeof(buf), FileFsAttributeInformation );
......@@ -4395,7 +4395,7 @@ static void test_query_attribute_information_file(void)
ffai = (FILE_FS_ATTRIBUTE_INFORMATION *)buf;
ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %ld\n", status);
ok(U(io).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %ld\n", U(io).Status);
ok(io.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %ld\n", io.Status);
ok(ffai->FileSystemAttributes != 0, "Missing FileSystemAttributes\n");
ok(ffai->MaximumComponentNameLength != 0, "Missing MaximumComponentNameLength\n");
ok(ffai->FileSystemNameLength != 0, "Missing FileSystemNameLength\n");
......@@ -4519,97 +4519,97 @@ static void test_read_write(void)
event = CreateEventA( NULL, TRUE, FALSE, NULL );
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = 0;
status = pNtReadFile(INVALID_HANDLE_VALUE, 0, NULL, NULL, &iob, buf, sizeof(buf), &offset, NULL);
ok(status == STATUS_OBJECT_TYPE_MISMATCH || status == STATUS_INVALID_HANDLE, "expected STATUS_OBJECT_TYPE_MISMATCH, got %#lx\n", status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Iu\n", iob.Information);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = 0;
status = pNtReadFile(INVALID_HANDLE_VALUE, 0, NULL, NULL, &iob, NULL, sizeof(buf), &offset, NULL);
ok(status == STATUS_OBJECT_TYPE_MISMATCH || status == STATUS_INVALID_HANDLE, "expected STATUS_OBJECT_TYPE_MISMATCH, got %#lx\n", status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Iu\n", iob.Information);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = 0;
status = pNtWriteFile(INVALID_HANDLE_VALUE, 0, NULL, NULL, &iob, buf, sizeof(buf), &offset, NULL);
ok(status == STATUS_OBJECT_TYPE_MISMATCH || status == STATUS_INVALID_HANDLE, "expected STATUS_OBJECT_TYPE_MISMATCH, got %#lx\n", status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Iu\n", iob.Information);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = 0;
status = pNtWriteFile(INVALID_HANDLE_VALUE, 0, NULL, NULL, &iob, buf, sizeof(buf), &offset, NULL);
ok(status == STATUS_OBJECT_TYPE_MISMATCH || status == STATUS_INVALID_HANDLE, "expected STATUS_OBJECT_TYPE_MISMATCH, got %#lx\n", status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Iu\n", iob.Information);
hfile = create_temp_file(0);
if (!hfile) return;
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
status = pNtWriteFile(hfile, 0, NULL, NULL, &iob, NULL, sizeof(contents), NULL, NULL);
ok(status == STATUS_INVALID_USER_BUFFER, "expected STATUS_INVALID_USER_BUFFER, got %#lx\n", status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Iu\n", iob.Information);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
SetEvent(event);
status = pNtWriteFile(hfile, event, NULL, NULL, &iob, NULL, sizeof(contents), NULL, NULL);
ok(status == STATUS_INVALID_USER_BUFFER, "expected STATUS_INVALID_USER_BUFFER, got %#lx\n", status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Iu\n", iob.Information);
ok(!is_signaled(event), "event is not signaled\n");
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
status = pNtReadFile(hfile, 0, NULL, NULL, &iob, NULL, sizeof(contents), NULL, NULL);
ok(status == STATUS_ACCESS_VIOLATION, "expected STATUS_ACCESS_VIOLATION, got %#lx\n", status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Iu\n", iob.Information);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
SetEvent(event);
status = pNtReadFile(hfile, event, NULL, NULL, &iob, NULL, sizeof(contents), NULL, NULL);
ok(status == STATUS_ACCESS_VIOLATION, "expected STATUS_ACCESS_VIOLATION, got %#lx\n", status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Iu\n", iob.Information);
ok(is_signaled(event), "event is not signaled\n");
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
SetEvent(event);
status = pNtReadFile(hfile, event, NULL, NULL, &iob, (void*)0xdeadbeef, sizeof(contents), NULL, NULL);
ok(status == STATUS_ACCESS_VIOLATION, "expected STATUS_ACCESS_VIOLATION, got %#lx\n", status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Iu\n", iob.Information);
ok(is_signaled(event), "event is not signaled\n");
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
status = pNtWriteFile(hfile, 0, NULL, NULL, &iob, contents, 7, NULL, NULL);
ok(status == STATUS_SUCCESS, "NtWriteFile error %#lx\n", status);
ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iob.Status);
ok(iob.Information == 7, "expected 7, got %Iu\n", iob.Information);
SetFilePointer(hfile, 0, NULL, FILE_BEGIN);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = (LONGLONG)-1 /* FILE_WRITE_TO_END_OF_FILE */;
status = pNtWriteFile(hfile, 0, NULL, NULL, &iob, contents + 7, sizeof(contents) - 7, &offset, NULL);
ok(status == STATUS_SUCCESS, "NtWriteFile error %#lx\n", status);
ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iob.Status);
ok(iob.Information == sizeof(contents) - 7, "expected sizeof(contents)-7, got %Iu\n", iob.Information);
off = SetFilePointer(hfile, 0, NULL, FILE_CURRENT);
......@@ -4649,33 +4649,33 @@ static void test_read_write(void)
{
if (i == -2) continue;
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = (LONGLONG)i;
status = pNtWriteFile(hfile, 0, NULL, NULL, &iob, contents, sizeof(contents), &offset, NULL);
ok(status == STATUS_INVALID_PARAMETER, "%ld: expected STATUS_INVALID_PARAMETER, got %#lx\n", i, status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Id\n", iob.Information);
}
SetFilePointer(hfile, sizeof(contents) - 4, NULL, FILE_BEGIN);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = (LONGLONG)-2 /* FILE_USE_FILE_POINTER_POSITION */;
status = pNtWriteFile(hfile, 0, NULL, NULL, &iob, "DCBA", 4, &offset, NULL);
ok(status == STATUS_SUCCESS, "NtWriteFile error %#lx\n", status);
ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iob.Status);
ok(iob.Information == 4, "expected 4, got %Iu\n", iob.Information);
off = SetFilePointer(hfile, 0, NULL, FILE_CURRENT);
ok(off == sizeof(contents), "expected sizeof(contents), got %lu\n", off);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, sizeof(buf), NULL, NULL);
ok(status == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#lx\n", status);
ok(U(iob).Status == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#lx\n", iob.Status);
ok(iob.Information == 0, "expected 0, got %Iu\n", iob.Information);
SetFilePointer(hfile, 0, NULL, FILE_BEGIN);
......@@ -4724,8 +4724,8 @@ static void test_read_write(void)
ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %ld\n", GetLastError());
ok(bytes == 0, "bytes %lu\n", bytes);
S(U(ovl)).Offset = sizeof(contents);
S(U(ovl)).OffsetHigh = 0;
ovl.Offset = sizeof(contents);
ovl.OffsetHigh = 0;
ovl.Internal = -1;
ovl.InternalHigh = -1;
ovl.hEvent = 0;
......@@ -4738,8 +4738,8 @@ static void test_read_write(void)
ok((NTSTATUS)ovl.Internal == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#Ix\n", ovl.Internal);
ok(ovl.InternalHigh == 0, "expected 0, got %Iu\n", ovl.InternalHigh);
S(U(ovl)).Offset = sizeof(contents);
S(U(ovl)).OffsetHigh = 0;
ovl.Offset = sizeof(contents);
ovl.OffsetHigh = 0;
ovl.Internal = -1;
ovl.InternalHigh = -1;
ovl.hEvent = 0;
......@@ -4752,62 +4752,62 @@ static void test_read_write(void)
ok((NTSTATUS)ovl.Internal == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#Ix\n", ovl.Internal);
ok(ovl.InternalHigh == 0, "expected 0, got %Iu\n", ovl.InternalHigh);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, sizeof(buf), NULL, NULL);
ok(status == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#lx\n", status);
ok(U(iob).Status == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#lx\n", iob.Status);
ok(iob.Information == 0, "expected 0, got %Iu\n", iob.Information);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, 0, NULL, NULL);
ok(status == STATUS_SUCCESS, "NtReadFile error %#lx\n", status);
ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iob.Status);
ok(iob.Information == 0, "expected 0, got %Iu\n", iob.Information);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = sizeof(contents);
status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, sizeof(buf), &offset, NULL);
ok(status == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#lx\n", status);
ok(U(iob).Status == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#lx\n", iob.Status);
ok(iob.Information == 0, "expected 0, got %Iu\n", iob.Information);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = sizeof(contents);
status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, 0, &offset, NULL);
ok(status == STATUS_SUCCESS, "NtReadFile error %#lx\n", status);
ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iob.Status);
ok(iob.Information == 0, "expected 0, got %Iu\n", iob.Information);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = (LONGLONG)-2 /* FILE_USE_FILE_POINTER_POSITION */;
status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, sizeof(buf), &offset, NULL);
ok(status == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#lx\n", status);
ok(U(iob).Status == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#lx\n", iob.Status);
ok(iob.Information == 0, "expected 0, got %Iu\n", iob.Information);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = (LONGLONG)-2 /* FILE_USE_FILE_POINTER_POSITION */;
status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, 0, &offset, NULL);
ok(status == STATUS_SUCCESS, "NtReadFile error %#lx\n", status);
ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iob.Status);
ok(iob.Information == 0, "expected 0, got %Iu\n", iob.Information);
for (i = -20; i < 0; i++)
{
if (i == -2) continue;
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = (LONGLONG)i;
status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, sizeof(buf), &offset, NULL);
ok(status == STATUS_INVALID_PARAMETER, "%ld: expected STATUS_INVALID_PARAMETER, got %#lx\n", i, status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Id\n", iob.Information);
}
......@@ -4823,35 +4823,35 @@ static void test_read_write(void)
off = SetFilePointer(hfile, 0, NULL, FILE_CURRENT);
ok(off == sizeof(contents), "expected sizeof(contents), got %lu\n", off);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = 0;
status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, sizeof(buf), &offset, NULL);
ok(status == STATUS_SUCCESS, "NtReadFile error %#lx\n", status);
ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iob.Status);
ok(iob.Information == sizeof(contents), "expected sizeof(contents), got %Iu\n", iob.Information);
ok(!memcmp(contents, buf, sizeof(contents)), "file contents mismatch\n");
off = SetFilePointer(hfile, 0, NULL, FILE_CURRENT);
ok(off == sizeof(contents), "expected sizeof(contents), got %lu\n", off);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = sizeof(contents) - 4;
status = pNtWriteFile(hfile, 0, NULL, NULL, &iob, "DCBA", 4, &offset, NULL);
ok(status == STATUS_SUCCESS, "NtWriteFile error %#lx\n", status);
ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iob.Status);
ok(iob.Information == 4, "expected 4, got %Iu\n", iob.Information);
off = SetFilePointer(hfile, 0, NULL, FILE_CURRENT);
ok(off == sizeof(contents), "expected sizeof(contents), got %lu\n", off);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = 0;
status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, sizeof(buf), &offset, NULL);
ok(status == STATUS_SUCCESS, "NtReadFile error %#lx\n", status);
ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iob.Status);
ok(iob.Information == sizeof(contents), "expected sizeof(contents), got %Iu\n", iob.Information);
ok(!memcmp(contents, buf, sizeof(contents) - 4), "file contents mismatch\n");
ok(!memcmp(buf + sizeof(contents) - 4, "DCBA", 4), "file contents mismatch\n");
......@@ -4859,8 +4859,8 @@ static void test_read_write(void)
off = SetFilePointer(hfile, 0, NULL, FILE_CURRENT);
ok(off == sizeof(contents), "expected sizeof(contents), got %lu\n", off);
S(U(ovl)).Offset = sizeof(contents) - 4;
S(U(ovl)).OffsetHigh = 0;
ovl.Offset = sizeof(contents) - 4;
ovl.OffsetHigh = 0;
ovl.hEvent = 0;
bytes = 0;
SetLastError(0xdeadbeef);
......@@ -4871,8 +4871,8 @@ static void test_read_write(void)
off = SetFilePointer(hfile, 0, NULL, FILE_CURRENT);
ok(off == sizeof(contents), "expected sizeof(contents), got %lu\n", off);
S(U(ovl)).Offset = 0;
S(U(ovl)).OffsetHigh = 0;
ovl.Offset = 0;
ovl.OffsetHigh = 0;
ovl.Internal = -1;
ovl.InternalHigh = -1;
ovl.hEvent = 0;
......@@ -4901,8 +4901,8 @@ static void test_read_write(void)
ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
ok(bytes == 0, "bytes %lu\n", bytes);
S(U(ovl)).Offset = 0;
S(U(ovl)).OffsetHigh = 0;
ovl.Offset = 0;
ovl.OffsetHigh = 0;
ovl.Internal = -1;
ovl.InternalHigh = -1;
ovl.hEvent = 0;
......@@ -4921,25 +4921,25 @@ static void test_read_write(void)
ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(bytes == 0, "bytes %lu\n", bytes);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
status = pNtWriteFile(hfile, 0, NULL, NULL, &iob, contents, sizeof(contents), NULL, NULL);
ok(status == STATUS_INVALID_PARAMETER, "expected STATUS_INVALID_PARAMETER, got %#lx\n", status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Id\n", iob.Information);
for (i = -20; i < -1; i++)
{
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = (LONGLONG)i;
status = pNtWriteFile(hfile, 0, NULL, NULL, &iob, contents, sizeof(contents), &offset, NULL);
ok(status == STATUS_INVALID_PARAMETER, "%ld: expected STATUS_INVALID_PARAMETER, got %#lx\n", i, status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Id\n", iob.Information);
}
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = 0;
status = pNtWriteFile(hfile, 0, NULL, NULL, &iob, contents, sizeof(contents), &offset, NULL);
......@@ -4950,7 +4950,7 @@ static void test_read_write(void)
ret = WaitForSingleObject(hfile, 3000);
ok(ret == WAIT_OBJECT_0, "WaitForSingleObject error %ld\n", ret);
}
ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iob.Status);
ok(iob.Information == sizeof(contents), "expected sizeof(contents), got %Iu\n", iob.Information);
off = SetFilePointer(hfile, 0, NULL, FILE_CURRENT);
......@@ -4963,21 +4963,21 @@ static void test_read_write(void)
ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(bytes == 0, "bytes %lu\n", bytes);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, sizeof(buf), NULL, NULL);
ok(status == STATUS_INVALID_PARAMETER, "expected STATUS_INVALID_PARAMETER, got %#lx\n", status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Id\n", iob.Information);
for (i = -20; i < 0; i++)
{
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = (LONGLONG)i;
status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, sizeof(buf), &offset, NULL);
ok(status == STATUS_INVALID_PARAMETER, "%ld: expected STATUS_INVALID_PARAMETER, got %#lx\n", i, status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Id\n", iob.Information);
}
......@@ -4986,8 +4986,8 @@ static void test_read_write(void)
/* test reading beyond EOF */
offset.QuadPart = sizeof(contents);
S(U(ovl)).Offset = offset.u.LowPart;
S(U(ovl)).OffsetHigh = offset.u.HighPart;
ovl.Offset = offset.u.LowPart;
ovl.OffsetHigh = offset.u.HighPart;
ovl.Internal = -1;
ovl.InternalHigh = -1;
ovl.hEvent = 0;
......@@ -5019,8 +5019,8 @@ static void test_read_write(void)
ok(off == 0, "expected 0, got %lu\n", off);
offset.QuadPart = sizeof(contents);
S(U(ovl)).Offset = offset.u.LowPart;
S(U(ovl)).OffsetHigh = offset.u.HighPart;
ovl.Offset = offset.u.LowPart;
ovl.OffsetHigh = offset.u.HighPart;
ovl.Internal = -1;
ovl.InternalHigh = -1;
ovl.hEvent = 0;
......@@ -5047,8 +5047,8 @@ static void test_read_write(void)
}
offset.QuadPart = sizeof(contents);
S(U(ovl)).Offset = offset.u.LowPart;
S(U(ovl)).OffsetHigh = offset.u.HighPart;
ovl.Offset = offset.u.LowPart;
ovl.OffsetHigh = offset.u.HighPart;
ovl.Internal = -1;
ovl.InternalHigh = -1;
ovl.hEvent = 0;
......@@ -5074,7 +5074,7 @@ static void test_read_write(void)
ok(ovl.InternalHigh == 0, "expected 0, got %Iu\n", ovl.InternalHigh);
}
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = sizeof(contents);
status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, sizeof(buf), &offset, NULL);
......@@ -5082,20 +5082,20 @@ static void test_read_write(void)
{
ret = WaitForSingleObject(hfile, 3000);
ok(ret == WAIT_OBJECT_0, "WaitForSingleObject error %ld\n", ret);
ok(U(iob).Status == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#lx\n", iob.Status);
ok(iob.Information == 0, "expected 0, got %Iu\n", iob.Information);
}
else
{
ok(status == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#lx\n", status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Iu\n", iob.Information);
}
off = SetFilePointer(hfile, 0, NULL, FILE_CURRENT);
ok(off == 0, "expected 0, got %lu\n", off);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = sizeof(contents);
status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, 0, &offset, NULL);
......@@ -5105,20 +5105,20 @@ static void test_read_write(void)
{
ret = WaitForSingleObject(hfile, 3000);
ok(ret == WAIT_OBJECT_0, "WaitForSingleObject error %ld\n", ret);
ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iob.Status);
ok(iob.Information == 0, "expected 0, got %Iu\n", iob.Information);
}
else
{
ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iob.Status);
ok(iob.Information == 0, "expected 0, got %Iu\n", iob.Information);
}
off = SetFilePointer(hfile, 0, NULL, FILE_CURRENT);
ok(off == 0, "expected 0, got %lu\n", off);
S(U(ovl)).Offset = 0;
S(U(ovl)).OffsetHigh = 0;
ovl.Offset = 0;
ovl.OffsetHigh = 0;
ovl.Internal = -1;
ovl.InternalHigh = -1;
ovl.hEvent = 0;
......@@ -5152,7 +5152,7 @@ static void test_read_write(void)
SetEndOfFile(hfile);
SetFilePointer(hfile, 0, NULL, FILE_BEGIN);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = (LONGLONG)-1 /* FILE_WRITE_TO_END_OF_FILE */;
status = pNtWriteFile(hfile, 0, NULL, NULL, &iob, "DCBA", 4, &offset, NULL);
......@@ -5163,13 +5163,13 @@ static void test_read_write(void)
ret = WaitForSingleObject(hfile, 3000);
ok(ret == WAIT_OBJECT_0, "WaitForSingleObject error %ld\n", ret);
}
ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iob.Status);
ok(iob.Information == 4, "expected 4, got %Iu\n", iob.Information);
off = SetFilePointer(hfile, 0, NULL, FILE_CURRENT);
ok(off == 0, "expected 0, got %lu\n", off);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = 0;
status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, sizeof(buf), &offset, NULL);
......@@ -5180,7 +5180,7 @@ static void test_read_write(void)
ret = WaitForSingleObject(hfile, 3000);
ok(ret == WAIT_OBJECT_0, "WaitForSingleObject error %ld\n", ret);
}
ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iob.Status);
ok(iob.Information == sizeof(contents), "expected sizeof(contents), got %Iu\n", iob.Information);
off = SetFilePointer(hfile, 0, NULL, FILE_CURRENT);
......@@ -5192,8 +5192,8 @@ static void test_read_write(void)
off = SetFilePointer(hfile, 0, NULL, FILE_CURRENT);
ok(off == 0, "expected 0, got %lu\n", off);
S(U(ovl)).Offset = sizeof(contents) - 4;
S(U(ovl)).OffsetHigh = 0;
ovl.Offset = sizeof(contents) - 4;
ovl.OffsetHigh = 0;
ovl.Internal = -1;
ovl.InternalHigh = -1;
ovl.hEvent = 0;
......@@ -5225,8 +5225,8 @@ static void test_read_write(void)
off = SetFilePointer(hfile, 0, NULL, FILE_CURRENT);
ok(off == 0, "expected 0, got %lu\n", off);
S(U(ovl)).Offset = 0;
S(U(ovl)).OffsetHigh = 0;
ovl.Offset = 0;
ovl.OffsetHigh = 0;
ovl.Internal = -1;
ovl.InternalHigh = -1;
ovl.hEvent = 0;
......@@ -5374,64 +5374,64 @@ static void test_query_ea(void)
if (!(handle = create_temp_file(0))) return;
/* test with INVALID_HANDLE_VALUE */
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
io.Information = 0xdeadbeef;
memset(buffer, 0xcc, EA_BUFFER_SIZE);
buffer_len = EA_BUFFER_SIZE - 1;
status = pNtQueryEaFile(INVALID_HANDLE_VALUE, &io, buffer, buffer_len, TRUE, NULL, 0, NULL, FALSE);
ok(status == STATUS_OBJECT_TYPE_MISMATCH, "expected STATUS_OBJECT_TYPE_MISMATCH, got %#lx\n", status);
ok(U(io).Status == 0xdeadbeef, "expected 0xdeadbeef, got %#lx\n", U(io).Status);
ok(io.Status == 0xdeadbeef, "expected 0xdeadbeef, got %#lx\n", io.Status);
ok(io.Information == 0xdeadbeef, "expected 0xdeadbeef, got %#Ix\n", io.Information);
ok(buffer[0] == 0xcc, "data at position 0 overwritten\n");
/* test with 0xdeadbeef */
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
io.Information = 0xdeadbeef;
memset(buffer, 0xcc, EA_BUFFER_SIZE);
buffer_len = EA_BUFFER_SIZE - 1;
status = pNtQueryEaFile((void *)0xdeadbeef, &io, buffer, buffer_len, TRUE, NULL, 0, NULL, FALSE);
ok(status == STATUS_INVALID_HANDLE, "expected STATUS_INVALID_HANDLE, got %#lx\n", status);
ok(U(io).Status == 0xdeadbeef, "expected 0xdeadbeef, got %#lx\n", U(io).Status);
ok(io.Status == 0xdeadbeef, "expected 0xdeadbeef, got %#lx\n", io.Status);
ok(io.Information == 0xdeadbeef, "expected 0xdeadbeef, got %#Ix\n", io.Information);
ok(buffer[0] == 0xcc, "data at position 0 overwritten\n");
/* test without buffer */
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
io.Information = 0xdeadbeef;
status = pNtQueryEaFile(handle, &io, NULL, 0, TRUE, NULL, 0, NULL, FALSE);
ok(status == STATUS_NO_EAS_ON_FILE, "expected STATUS_NO_EAS_ON_FILE, got %#lx\n", status);
ok(U(io).Status == 0xdeadbeef, "expected 0xdeadbeef, got %#lx\n", U(io).Status);
ok(io.Status == 0xdeadbeef, "expected 0xdeadbeef, got %#lx\n", io.Status);
ok(io.Information == 0xdeadbeef, "expected 0xdeadbeef, got %#Ix\n", io.Information);
/* test with zero buffer */
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
io.Information = 0xdeadbeef;
status = pNtQueryEaFile(handle, &io, buffer, 0, TRUE, NULL, 0, NULL, FALSE);
ok(status == STATUS_NO_EAS_ON_FILE, "expected STATUS_NO_EAS_ON_FILE, got %#lx\n", status);
ok(U(io).Status == 0xdeadbeef, "expected 0xdeadbeef, got %#lx\n", U(io).Status);
ok(io.Status == 0xdeadbeef, "expected 0xdeadbeef, got %#lx\n", io.Status);
ok(io.Information == 0xdeadbeef, "expected 0xdeadbeef, got %#Ix\n", io.Information);
/* test with very small buffer */
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
io.Information = 0xdeadbeef;
memset(buffer, 0xcc, EA_BUFFER_SIZE);
buffer_len = 4;
status = pNtQueryEaFile(handle, &io, buffer, buffer_len, TRUE, NULL, 0, NULL, FALSE);
ok(status == STATUS_NO_EAS_ON_FILE, "expected STATUS_NO_EAS_ON_FILE, got %#lx\n", status);
ok(U(io).Status == 0xdeadbeef, "expected 0xdeadbeef, got %#lx\n", U(io).Status);
ok(io.Status == 0xdeadbeef, "expected 0xdeadbeef, got %#lx\n", io.Status);
ok(io.Information == 0xdeadbeef, "expected 0xdeadbeef, got %#Ix\n", io.Information);
for (i = 0; i < buffer_len && !buffer[i]; i++);
ok(i == buffer_len, "expected %lu bytes filled with 0x00, got %lu bytes\n", buffer_len, i);
ok(buffer[i] == 0xcc, "data at position %u overwritten\n", buffer[i]);
/* test with very big buffer */
U(io).Status = 0xdeadbeef;
io.Status = 0xdeadbeef;
io.Information = 0xdeadbeef;
memset(buffer, 0xcc, EA_BUFFER_SIZE);
buffer_len = EA_BUFFER_SIZE - 1;
status = pNtQueryEaFile(handle, &io, buffer, buffer_len, TRUE, NULL, 0, NULL, FALSE);
ok(status == STATUS_NO_EAS_ON_FILE, "expected STATUS_NO_EAS_ON_FILE, got %#lx\n", status);
ok(U(io).Status == 0xdeadbeef, "expected 0xdeadbeef, got %#lx\n", U(io).Status);
ok(io.Status == 0xdeadbeef, "expected 0xdeadbeef, got %#lx\n", io.Status);
ok(io.Information == 0xdeadbeef, "expected 0xdeadbeef, got %#Ix\n", io.Information);
for (i = 0; i < buffer_len && !buffer[i]; i++);
ok(i == buffer_len, "expected %lu bytes filled with 0x00, got %lu bytes\n", buffer_len, i);
......
......@@ -393,12 +393,12 @@ static void test_overlapped(void)
memset(&iosb, 0x55, sizeof(iosb));
res = listen_pipe(hPipe, hEvent, &iosb, TRUE);
ok(res == STATUS_PENDING, "NtFsControlFile returned %lx\n", res);
ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %lx\n", U(iosb).Status);
ok(iosb.Status == 0x55555555, "iosb.Status got changed to %lx\n", iosb.Status);
hClient = CreateFileW(testpipe, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0);
ok(hClient != INVALID_HANDLE_VALUE, "can't open pipe, GetLastError: %lx\n", GetLastError());
ok(U(iosb).Status == 0, "Wrong iostatus %lx\n", U(iosb).Status);
ok(iosb.Status == 0, "Wrong iostatus %lx\n", iosb.Status);
ok(WaitForSingleObject(hEvent, 0) == 0, "hEvent not signaled\n");
ok(!ioapc_called, "IOAPC ran too early\n");
......@@ -423,7 +423,7 @@ static void test_overlapped(void)
memset(&iosb, 0x55, sizeof(iosb));
res = listen_pipe(hPipe, hEvent, &iosb, TRUE);
ok(res == STATUS_PIPE_CONNECTED, "NtFsControlFile returned %lx\n", res);
ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %lx\n", U(iosb).Status);
ok(iosb.Status == 0x55555555, "iosb.Status got changed to %lx\n", iosb.Status);
ok(!is_signaled(hEvent), "hEvent not signaled\n");
CloseHandle(hClient);
......@@ -494,7 +494,7 @@ static void test_alertable(void)
todo_wine ok(res == STATUS_CANCELLED, "NtFsControlFile returned %lx\n", res);
ok(userapc_called, "user apc didn't run\n");
ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %lx\n", U(iosb).Status);
ok(iosb.Status == 0x55555555, "iosb.Status got changed to %lx\n", iosb.Status);
ok(WaitForSingleObjectEx(hEvent, 0, TRUE) == WAIT_TIMEOUT, "hEvent signaled\n");
ok(!ioapc_called, "IOAPC ran\n");
......@@ -508,7 +508,7 @@ static void test_alertable(void)
todo_wine ok(res == STATUS_CANCELLED, "NtFsControlFile returned %lx\n", res);
ok(userapc_called, "user apc didn't run\n");
ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %lx\n", U(iosb).Status);
ok(iosb.Status == 0x55555555, "iosb.Status got changed to %lx\n", iosb.Status);
ok(WaitForSingleObjectEx(hEvent, 0, TRUE) == WAIT_TIMEOUT, "hEvent signaled\n");
ok(!ioapc_called, "IOAPC ran\n");
......@@ -529,7 +529,7 @@ static void test_alertable(void)
ok(!res, "NtFsControlFile returned %lx\n", res);
ok(open_succeeded, "couldn't open client side pipe\n");
ok(!U(iosb).Status, "Wrong iostatus %lx\n", U(iosb).Status);
ok(!iosb.Status, "Wrong iostatus %lx\n", iosb.Status);
ok(WaitForSingleObject(hEvent, 0) == 0, "hEvent not signaled\n");
WaitForSingleObject(hThread, INFINITE);
......@@ -566,7 +566,7 @@ static void test_nonalertable(void)
ok(!res, "NtFsControlFile returned %lx\n", res);
ok(open_succeeded, "couldn't open client side pipe\n");
ok(!U(iosb).Status, "Wrong iostatus %lx\n", U(iosb).Status);
ok(!iosb.Status, "Wrong iostatus %lx\n", iosb.Status);
ok(WaitForSingleObject(hEvent, 0) == 0, "hEvent not signaled\n");
ok(!ioapc_called, "IOAPC ran too early\n");
......@@ -605,7 +605,7 @@ static void test_cancelio(void)
res = pNtCancelIoFile(hPipe, &cancel_sb);
ok(!res, "NtCancelIoFile returned %lx\n", res);
ok(U(iosb).Status == STATUS_CANCELLED, "Wrong iostatus %lx\n", U(iosb).Status);
ok(iosb.Status == STATUS_CANCELLED, "Wrong iostatus %lx\n", iosb.Status);
ok(WaitForSingleObject(hEvent, 0) == 0, "hEvent not signaled\n");
ok(!ioapc_called, "IOAPC ran too early\n");
......@@ -628,7 +628,7 @@ static void test_cancelio(void)
res = pNtCancelIoFileEx(hPipe, &iosb, &cancel_sb);
ok(!res, "NtCancelIoFileEx returned %lx\n", res);
ok(U(iosb).Status == STATUS_CANCELLED, "Wrong iostatus %lx\n", U(iosb).Status);
ok(iosb.Status == STATUS_CANCELLED, "Wrong iostatus %lx\n", iosb.Status);
ok(WaitForSingleObject(hEvent, 0) == 0, "hEvent not signaled\n");
CloseHandle(hPipe);
......@@ -678,8 +678,8 @@ static void test_cancelsynchronousio(void)
"NtCancelSynchronousIoFile returned %lx\n", res);
if (res != STATUS_ACCESS_VIOLATION)
{
ok(U(iosb).Status == STATUS_NOT_FOUND, "iosb.Status got changed to %lx\n", U(iosb).Status);
ok(U(iosb).Information == 0, "iosb.Information got changed to %Iu\n", U(iosb).Information);
ok(iosb.Status == STATUS_NOT_FOUND, "iosb.Status got changed to %lx\n", iosb.Status);
ok(iosb.Information == 0, "iosb.Information got changed to %Iu\n", iosb.Information);
}
/* synchronous i/o */
......@@ -687,7 +687,7 @@ static void test_cancelsynchronousio(void)
ok(!res, "NtCreateNamedPipeFile returned %lx\n", res);
/* NULL io */
U(ctx.iosb).Status = 0xdeadbabe;
ctx.iosb.Status = 0xdeadbabe;
ctx.iosb.Information = 0xdeadbeef;
thread = CreateThread(NULL, 0, synchronousio_thread, &ctx, 0, 0);
/* wait for I/O to start, which transitions the pipe handle from signaled to nonsignaled state. */
......@@ -696,20 +696,20 @@ static void test_cancelsynchronousio(void)
memset(&iosb, 0x55, sizeof(iosb));
res = pNtCancelSynchronousIoFile(thread, NULL, &iosb);
ok(res == STATUS_SUCCESS, "Failed to cancel I/O\n");
ok(U(iosb).Status == STATUS_SUCCESS, "iosb.Status got changed to %lx\n", U(iosb).Status);
ok(U(iosb).Information == 0, "iosb.Information got changed to %Iu\n", U(iosb).Information);
ok(iosb.Status == STATUS_SUCCESS, "iosb.Status got changed to %lx\n", iosb.Status);
ok(iosb.Information == 0, "iosb.Information got changed to %Iu\n", iosb.Information);
ret = WaitForSingleObject(thread, 1000);
ok(ret == WAIT_OBJECT_0, "wait returned %lx\n", ret);
CloseHandle(thread);
CloseHandle(ctx.pipe);
ok(U(ctx.iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(ctx.iosb).Status);
ok(ctx.iosb.Status == 0xdeadbabe, "wrong status %lx\n", ctx.iosb.Status);
ok(ctx.iosb.Information == 0xdeadbeef, "wrong info %Iu\n", ctx.iosb.Information);
/* specified io */
res = create_pipe(&ctx.pipe, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SYNCHRONOUS_IO_NONALERT);
ok(!res, "NtCreateNamedPipeFile returned %lx\n", res);
U(ctx.iosb).Status = 0xdeadbabe;
ctx.iosb.Status = 0xdeadbabe;
ctx.iosb.Information = 0xdeadbeef;
thread = CreateThread(NULL, 0, synchronousio_thread, &ctx, 0, 0);
/* wait for I/O to start, which transitions the pipe handle from signaled to nonsignaled state. */
......@@ -723,24 +723,24 @@ static void test_cancelsynchronousio(void)
res = pNtCancelSynchronousIoFile(thread, &ctx.iosb, &iosb);
ok(res == STATUS_SUCCESS || broken(is_wow64 && res == STATUS_NOT_FOUND),
"Failed to cancel I/O\n");
ok(U(iosb).Status == STATUS_SUCCESS || broken(is_wow64 && U(iosb).Status == STATUS_NOT_FOUND),
"iosb.Status got changed to %lx\n", U(iosb).Status);
ok(U(iosb).Information == 0, "iosb.Information got changed to %Iu\n", U(iosb).Information);
ok(iosb.Status == STATUS_SUCCESS || broken(is_wow64 && iosb.Status == STATUS_NOT_FOUND),
"iosb.Status got changed to %lx\n", iosb.Status);
ok(iosb.Information == 0, "iosb.Information got changed to %Iu\n", iosb.Information);
if (res == STATUS_NOT_FOUND)
{
res = pNtCancelSynchronousIoFile(thread, NULL, &iosb);
ok(res == STATUS_SUCCESS, "Failed to cancel I/O\n");
ok(U(iosb).Status == STATUS_SUCCESS, "iosb.Status got changed to %lx\n", U(iosb).Status);
ok(iosb.Status == STATUS_SUCCESS, "iosb.Status got changed to %lx\n", iosb.Status);
}
ret = WaitForSingleObject(thread, 1000);
ok(ret == WAIT_OBJECT_0, "wait returned %lx\n", ret);
CloseHandle(thread);
CloseHandle(ctx.pipe);
ok(U(ctx.iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(ctx.iosb).Status);
ok(ctx.iosb.Status == 0xdeadbabe, "wrong status %lx\n", ctx.iosb.Status);
ok(ctx.iosb.Information == 0xdeadbeef, "wrong info %Iu\n", ctx.iosb.Information);
/* asynchronous i/o */
U(ctx.iosb).Status = 0xdeadbabe;
ctx.iosb.Status = 0xdeadbabe;
ctx.iosb.Information = 0xdeadbeef;
res = create_pipe(&ctx.pipe, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, 0 /* OVERLAPPED */);
ok(!res, "NtCreateNamedPipeFile returned %lx\n", res);
......@@ -751,13 +751,13 @@ static void test_cancelsynchronousio(void)
memset(&iosb, 0x55, sizeof(iosb));
res = pNtCancelSynchronousIoFile(GetCurrentThread(), NULL, &iosb);
ok(res == STATUS_NOT_FOUND, "NtCancelSynchronousIoFile returned %lx\n", res);
ok(U(iosb).Status == STATUS_NOT_FOUND, "iosb.Status got changed to %lx\n", U(iosb).Status);
ok(U(iosb).Information == 0, "iosb.Information got changed to %Iu\n", U(iosb).Information);
ok(iosb.Status == STATUS_NOT_FOUND, "iosb.Status got changed to %lx\n", iosb.Status);
ok(iosb.Information == 0, "iosb.Information got changed to %Iu\n", iosb.Information);
memset(&iosb, 0x55, sizeof(iosb));
res = pNtCancelSynchronousIoFile(GetCurrentThread(), &ctx.iosb, &iosb);
ok(res == STATUS_NOT_FOUND, "NtCancelSynchronousIoFile returned %lx\n", res);
ok(U(iosb).Status == STATUS_NOT_FOUND, "iosb.Status got changed to %lx\n", U(iosb).Status);
ok(U(iosb).Information == 0, "iosb.Information got changed to %Iu\n", U(iosb).Information);
ok(iosb.Status == STATUS_NOT_FOUND, "iosb.Status got changed to %lx\n", iosb.Status);
ok(iosb.Information == 0, "iosb.Information got changed to %Iu\n", iosb.Information);
ret = WaitForSingleObject(event, 0);
ok(ret == WAIT_TIMEOUT, "wait returned %lx\n", ret);
client = CreateFileW(testpipe, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING,
......@@ -1066,20 +1066,20 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
if (!create_pipe_pair( &read, &write, FILE_FLAG_OVERLAPPED | pipe_flags, pipe_type, 4096 )) return;
/* try read with no data */
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
ok( is_signaled( read ), "read handle is not signaled\n" );
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( read ), "read handle is signaled\n" );
ok( !is_signaled( event ), "event is signaled\n" );
ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0xdeadbabe, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
ret = WriteFile( write, buffer, 1, &written, NULL );
ok(ret && written == 1, "WriteFile error %ld\n", GetLastError());
/* iosb updated here by async i/o */
ok( U(iosb).Status == 0, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 1, "wrong info %Iu\n", iosb.Information );
ok( !is_signaled( read ), "read handle is signaled\n" );
ok( is_signaled( event ), "event is not signaled\n" );
......@@ -1092,19 +1092,19 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
/* with no event, the pipe handle itself gets signaled */
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
ok( !is_signaled( read ), "read handle is signaled\n" );
status = NtReadFile( read, 0, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( read ), "read handle is signaled\n" );
ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0xdeadbabe, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
ret = WriteFile( write, buffer, 1, &written, NULL );
ok(ret && written == 1, "WriteFile error %ld\n", GetLastError());
/* iosb updated here by async i/o */
ok( U(iosb).Status == 0, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 1, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( read ), "read handle is not signaled\n" );
ok( !apc_count, "apc was called\n" );
......@@ -1116,7 +1116,7 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
/* now read with data ready */
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
ResetEvent( event );
ret = WriteFile( write, buffer, 1, &written, NULL );
......@@ -1126,7 +1126,7 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
ok( U(iosb).Status == 0, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 1, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
......@@ -1137,7 +1137,7 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
/* now partial read with data ready */
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
ResetEvent( event );
ret = WriteFile( write, buffer, 2, &written, NULL );
......@@ -1150,12 +1150,12 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
{
ok( status == STATUS_BUFFER_OVERFLOW || status == STATUS_PENDING,
"FSCTL_PIPE_PEEK returned %lx\n", status );
ok( U(iosb).Status == STATUS_BUFFER_OVERFLOW, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_BUFFER_OVERFLOW, "wrong status %lx\n", iosb.Status );
}
else
{
ok( !status || status == STATUS_PENDING, "FSCTL_PIPE_PEEK returned %lx\n", status );
ok( U(iosb).Status == 0, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0, "wrong status %lx\n", iosb.Status );
}
ok( iosb.Information == FIELD_OFFSET(FILE_PIPE_PEEK_BUFFER, Data[1]),
"wrong info %Iu\n", iosb.Information );
......@@ -1164,12 +1164,12 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
if (pipe_type & PIPE_READMODE_MESSAGE)
{
ok( status == STATUS_BUFFER_OVERFLOW, "wrong status %lx\n", status );
ok( U(iosb).Status == STATUS_BUFFER_OVERFLOW, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_BUFFER_OVERFLOW, "wrong status %lx\n", iosb.Status );
}
else
{
ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
ok( U(iosb).Status == 0, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0, "wrong status %lx\n", iosb.Status );
}
ok( iosb.Information == 1, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
......@@ -1181,7 +1181,7 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
apc_count = 0;
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
ok( U(iosb).Status == 0, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 1, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
......@@ -1192,13 +1192,13 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
/* try read with no data */
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
ok( is_signaled( event ), "event is not signaled\n" ); /* check that read resets the event */
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL );
ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( event ), "event is signaled\n" );
ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0xdeadbabe, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
ret = WriteFile( write, buffer, 1, &written, NULL );
......@@ -1206,7 +1206,7 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
/* partial read is good enough */
Sleep(1); /* FIXME: needed for wine to run the i/o apc */
ok( is_signaled( event ), "event is not signaled\n" );
ok( U(iosb).Status == 0, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 1, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
SleepEx( 1, TRUE ); /* alertable sleep */
......@@ -1214,12 +1214,12 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
/* read from disconnected pipe */
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
CloseHandle( write );
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
ok( status == STATUS_PIPE_BROKEN, "wrong status %lx\n", status );
ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0xdeadbabe, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !is_signaled( event ), "event is signaled\n" );
ok( !apc_count, "apc was called\n" );
......@@ -1229,11 +1229,11 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
/* read from disconnected pipe, with invalid event handle */
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
status = NtReadFile( read, (HANDLE)0xdeadbeef, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
ok( status == STATUS_INVALID_HANDLE, "wrong status %lx\n", status );
ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0xdeadbabe, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
SleepEx( 1, TRUE ); /* alertable sleep */
......@@ -1242,12 +1242,12 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
/* read from closed handle */
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
SetEvent( event );
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 1, NULL, NULL );
ok( status == STATUS_INVALID_HANDLE, "wrong status %lx\n", status );
ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0xdeadbabe, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" ); /* not reset on invalid handle */
ok( !apc_count, "apc was called\n" );
......@@ -1257,17 +1257,17 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
/* disconnect while async read is in progress */
if (!create_pipe_pair( &read, &write, FILE_FLAG_OVERLAPPED | pipe_flags, pipe_type, 4096 )) return;
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL );
ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( event ), "event is signaled\n" );
ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0xdeadbabe, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
CloseHandle( write );
Sleep(1); /* FIXME: needed for wine to run the i/o apc */
ok( U(iosb).Status == STATUS_PIPE_BROKEN, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_PIPE_BROKEN, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
......@@ -1280,19 +1280,19 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
ok(ret, "Failed to duplicate handle: %ld\n", GetLastError());
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
status = NtReadFile( handle, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL );
ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( event ), "event is signaled\n" );
ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0xdeadbabe, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
/* Cancel by other handle */
status = pNtCancelIoFile( read, &iosb2 );
ok(status == STATUS_SUCCESS, "failed to cancel by different handle: %lx\n", status);
Sleep(1); /* FIXME: needed for wine to run the i/o apc */
ok( U(iosb).Status == STATUS_CANCELLED, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_CANCELLED, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
......@@ -1300,25 +1300,25 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
ok( apc_count == 1, "apc was not called\n" );
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL );
ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( event ), "event is signaled\n" );
ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0xdeadbabe, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
/* Close queued handle */
CloseHandle( read );
SleepEx( 1, TRUE ); /* alertable sleep */
ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0xdeadbabe, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
status = pNtCancelIoFile( read, &iosb2 );
ok(status == STATUS_INVALID_HANDLE, "cancelled by closed handle?\n");
status = pNtCancelIoFile( handle, &iosb2 );
ok(status == STATUS_SUCCESS, "failed to cancel: %lx\n", status);
Sleep(1); /* FIXME: needed for wine to run the i/o apc */
ok( U(iosb).Status == STATUS_CANCELLED, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_CANCELLED, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
......@@ -1333,18 +1333,18 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
if (!create_pipe_pair( &read, &write, FILE_FLAG_OVERLAPPED | pipe_flags, pipe_type, 4096 )) return;
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL );
ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( event ), "event is signaled\n" );
ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0xdeadbabe, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
status = pNtCancelIoFileEx( read, &iosb, &iosb2 );
ok(status == STATUS_SUCCESS, "Failed to cancel I/O\n");
Sleep(1); /* FIXME: needed for wine to run the i/o apc */
ok( U(iosb).Status == STATUS_CANCELLED, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_CANCELLED, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
......@@ -1353,24 +1353,24 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type)
/* Duplicate iosb */
apc_count = 0;
U(iosb).Status = 0xdeadbabe;
iosb.Status = 0xdeadbabe;
iosb.Information = 0xdeadbeef;
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL );
ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( event ), "event is signaled\n" );
ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0xdeadbabe, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
status = NtReadFile( read, event, apc, &apc_count, &iosb, buffer, 2, NULL, NULL );
ok( status == STATUS_PENDING, "wrong status %lx\n", status );
ok( !is_signaled( event ), "event is signaled\n" );
ok( U(iosb).Status == 0xdeadbabe, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0xdeadbabe, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0xdeadbeef, "wrong info %Iu\n", iosb.Information );
ok( !apc_count, "apc was called\n" );
status = pNtCancelIoFileEx( read, &iosb, &iosb2 );
ok(status == STATUS_SUCCESS, "Failed to cancel I/O\n");
Sleep(1); /* FIXME: needed for wine to run the i/o apc */
ok( U(iosb).Status == STATUS_CANCELLED, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == STATUS_CANCELLED, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 0, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
ok( !apc_count, "apc was called\n" );
......@@ -1407,7 +1407,7 @@ static void test_transceive(void)
ret = WriteFile( callee, buffer, 2, &written, NULL );
ok(ret && written == 2, "WriteFile error %ld\n", GetLastError());
ok( U(iosb).Status == 0, "wrong status %lx\n", U(iosb).Status );
ok( iosb.Status == 0, "wrong status %lx\n", iosb.Status );
ok( iosb.Information == 2, "wrong info %Iu\n", iosb.Information );
ok( is_signaled( event ), "event is not signaled\n" );
......
......@@ -1406,16 +1406,16 @@ static void test_iosb(void)
args[0] = (LONG_PTR)server;
status = call_func64( func, ARRAY_SIZE(args), args );
ok( status == STATUS_PENDING, "NtFsControlFile returned %lx\n", status );
ok( U(iosb32).Status == 0x55555555, "status changed to %lx\n", U(iosb32).Status );
ok( U(iosb64).Pointer == PtrToUlong(&iosb32), "status changed to %lx\n", U(iosb64).Status );
ok( iosb32.Status == 0x55555555, "status changed to %lx\n", iosb32.Status );
ok( iosb64.Pointer == PtrToUlong(&iosb32), "status changed to %lx\n", iosb64.Status );
ok( iosb64.Information == 0xdeadbeef, "info changed to %Ix\n", (ULONG_PTR)iosb64.Information );
client = CreateFileA( pipe_name, GENERIC_WRITE, 0, NULL, OPEN_EXISTING,
FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED, NULL );
ok( client != INVALID_HANDLE_VALUE, "CreateFile failed: %lu\n", GetLastError() );
ok( U(iosb32).Status == 0, "Wrong iostatus %lx\n", U(iosb32).Status );
ok( U(iosb64).Pointer == PtrToUlong(&iosb32), "status changed to %lx\n", U(iosb64).Status );
ok( iosb32.Status == 0, "Wrong iostatus %lx\n", iosb32.Status );
ok( iosb64.Pointer == PtrToUlong(&iosb32), "status changed to %lx\n", iosb64.Status );
ok( iosb64.Information == 0xdeadbeef, "info changed to %Ix\n", (ULONG_PTR)iosb64.Information );
memset( &iosb32, 0x55, sizeof(iosb32) );
......@@ -1433,9 +1433,9 @@ static void test_iosb(void)
ok( status == STATUS_PENDING || status == STATUS_SUCCESS, "NtFsControlFile returned %lx\n", status );
todo_wine
{
ok( U(iosb32).Status == STATUS_SUCCESS, "status changed to %lx\n", U(iosb32).Status );
ok( iosb32.Status == STATUS_SUCCESS, "status changed to %lx\n", iosb32.Status );
ok( iosb32.Information == sizeof(id), "info changed to %Ix\n", iosb32.Information );
ok( U(iosb64).Pointer == PtrToUlong(&iosb32), "status changed to %lx\n", U(iosb64).Status );
ok( iosb64.Pointer == PtrToUlong(&iosb32), "status changed to %lx\n", iosb64.Status );
ok( iosb64.Information == 0xdeadbeef, "info changed to %Ix\n", (ULONG_PTR)iosb64.Information );
}
ok( id == GetCurrentProcessId(), "wrong id %lx / %lx\n", id, GetCurrentProcessId() );
......@@ -1461,9 +1461,9 @@ static void test_iosb(void)
args[0] = (LONG_PTR)server;
status = call_func64( func, ARRAY_SIZE(args), args );
ok( status == STATUS_SUCCESS, "NtFsControlFile returned %lx\n", status );
ok( U(iosb32).Status == 0x55555555, "status changed to %lx\n", U(iosb32).Status );
ok( iosb32.Status == 0x55555555, "status changed to %lx\n", iosb32.Status );
ok( iosb32.Information == 0x55555555, "info changed to %Ix\n", iosb32.Information );
ok( U(iosb64).Pointer == STATUS_SUCCESS, "status changed to %lx\n", U(iosb64).Status );
ok( iosb64.Pointer == STATUS_SUCCESS, "status changed to %lx\n", iosb64.Status );
ok( iosb64.Information == sizeof(id), "info changed to %Ix\n", (ULONG_PTR)iosb64.Information );
ok( id == GetCurrentProcessId(), "wrong id %lx / %lx\n", id, GetCurrentProcessId() );
CloseHandle( client );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment