Re: cabinet: Add initial tests for Extract [try 2]
* On Tue, 10 Jan 2006, James Hawkins wrote:
This version marks the failing tests as todo_wine, and only uses DeleteFile instead of file_exists so that a file is removed when it's not suppsosed to exist. ... +++ b/dlls/cabinet/tests/extract.c ... +static INT_PTR fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv) +{ + HANDLE handle; + DWORD dwAccess = 0; + DWORD dwShareMode = 0; + DWORD dwCreateDisposition = OPEN_EXISTING; + + dwAccess = GENERIC_READ | GENERIC_WRITE; + dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE; + + if (GetFileAttributesA(pszFile) != INVALID_FILE_ATTRIBUTES) + dwCreateDisposition = OPEN_EXISTING; + else + dwCreateDisposition = CREATE_NEW; + + handle = CreateFileA(pszFile, dwAccess, dwShareMode, NULL, + dwCreateDisposition, 0, NULL);
On win9x the flag FILE_SHARE_DELETE isn't supported and makes all the following tests to fail. Can the flag be removed? Tests work nice on XP without it.
participants (1)
-
Saulius Krasuckas