ntdll/tests: We need a bigger buffer for NtQueryInformationFile.

This commit is contained in:
Paul Vriens 2010-04-12 14:59:58 +02:00 committed by Alexandre Julliard
parent 3536770083
commit a155cf5f35
1 changed files with 6 additions and 4 deletions

View File

@ -345,14 +345,16 @@ static void open_file_test(void)
} }
if (!status) if (!status)
{ {
FILE_ALL_INFORMATION all_info; BYTE buf[sizeof(FILE_ALL_INFORMATION) + MAX_PATH * sizeof(WCHAR)];
if (!pNtQueryInformationFile( handle, &io, &all_info, sizeof(all_info), FileAllInformation )) if (!pNtQueryInformationFile( handle, &io, buf, sizeof(buf), FileAllInformation ))
{ {
FILE_ALL_INFORMATION *fai = (FILE_ALL_INFORMATION *)buf;
/* check that it's the same file */ /* check that it's the same file */
ok( info->EndOfFile.QuadPart == all_info.StandardInformation.EndOfFile.QuadPart, ok( info->EndOfFile.QuadPart == fai->StandardInformation.EndOfFile.QuadPart,
"mismatched file size for %s\n", wine_dbgstr_w(info->FileName)); "mismatched file size for %s\n", wine_dbgstr_w(info->FileName));
ok( info->LastWriteTime.QuadPart == all_info.BasicInformation.LastWriteTime.QuadPart, ok( info->LastWriteTime.QuadPart == fai->BasicInformation.LastWriteTime.QuadPart,
"mismatched write time for %s\n", wine_dbgstr_w(info->FileName)); "mismatched write time for %s\n", wine_dbgstr_w(info->FileName));
} }
CloseHandle( handle ); CloseHandle( handle );