(resend) [1/2] kernel32/tests: Add tests for CreateFile errors and opening volumes
Alexandre Julliard
julliard at winehq.org
Tue Jun 2 06:17:32 CDT 2009
Guy Albertelli <galberte at neo.rr.com> writes:
> + hFile = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE,
> + FILE_SHARE_READ | FILE_SHARE_WRITE,
> + NULL, OPEN_EXISTING,
> + p[i].options, NULL );
> + if (p[i].todo_flag)
> + todo_wine ok((hFile == INVALID_HANDLE_VALUE && p[i].err == GetLastError()) ||
> + (hFile != INVALID_HANDLE_VALUE && p[i].err == ERROR_SUCCESS),
> + "CreateFileA failed on %s, hFile %p, err=%u, should be %u\n",
> + filename, hFile, GetLastError(), p[i].err);
> + else
> + ok((hFile == INVALID_HANDLE_VALUE && p[i].err == GetLastError()) ||
> + (hFile != INVALID_HANDLE_VALUE && p[i].err == ERROR_SUCCESS),
> + "CreateFileA failed on %s, hFile %p, err=%u, should be %u\n",
> + filename, hFile, GetLastError(), p[i].err);
You need to handle access denied errors here too. You can't assume that
you can always open a drive for read/write access.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list