RE: Help with a native Windows test program needed (CreateFileW)
Hi Markus,
From: Markus Stockhausen <markus.stockhausen(a)collogia.de>
as I have no Windows machine and cannot test this: I'm in need for someone who can build a small exe that gives further hints to my observations in bug #9575. The following is needed:
call CreateFileW( 'testfile.txt', ..., dwShareMode = 0, ...) call CreateFileW( 'testfile.txt', ..., dwShareMode = 0, ...)
Return the result of second call. I expect it to be a valid handle on Windows whereas Wine will return an invalid handle.
This test program: int main(int argc, char *argv[]) { HANDLE File1, File2; File1 = CreateFileW(L"test.dat", GENERIC_READ, 0, NULL, CREATE_ALWAYS, 0, NULL); File2 = CreateFileW(L"test.dat", GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); printf("File1 0x%x File2 0x%x error %u\n", File1, File2, GetLastError()); return 0; } returns this result on Windows 2008: File1 0x10 File2 0xffffffff error 32 so the second CreateFile fails on Windows too, with ERROR_SHARING_VIOLATION. Ge.
participants (1)
-
Greg Geldorp