18 Jul
2010
18 Jul
'10
6:24 a.m.
On 7/18/2010 10:17, Austin English wrote:
Passed all the vm's on wtb. Hi, Austin. This looks strange:
+ + hFile = CreateFileA("c:\\*.*", GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL ); + ok(GetLastError() == ERROR_INVALID_NAME || broken(GetLastError() == ERROR_FILE_NOT_FOUND) || broken(GetLastError() == ERROR_PATH_NOT_FOUND), + "CreateFileA should have returned ERROR_INVALID_NAME on %s, but got %u\n", filename, GetLastError()); + CloseHandle( hFile ); If a call failed then you should test for null hFile I suppose and remove CloseHandle(). Also when testing for last error a common rule is to set it first before the call.
Does anything depend on this having 3 possible return values?