Hans Leidekker : wintrust: Open test file with share mode FILE_SHARE_READ.
Alexandre Julliard
julliard at winehq.org
Thu Dec 18 08:08:35 CST 2008
Module: wine
Branch: master
Commit: 0b0621c8cbb1750e64e8fe70eb346a18c87a61ba
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0b0621c8cbb1750e64e8fe70eb346a18c87a61ba
Author: Hans Leidekker <hans at codeweavers.com>
Date: Wed Dec 17 14:32:35 2008 +0100
wintrust: Open test file with share mode FILE_SHARE_READ.
---
dlls/wintrust/tests/crypt.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/wintrust/tests/crypt.c b/dlls/wintrust/tests/crypt.c
index a45f853..eaec81d 100644
--- a/dlls/wintrust/tests/crypt.c
+++ b/dlls/wintrust/tests/crypt.c
@@ -285,10 +285,11 @@ static void test_calchash(void)
CloseHandle(file);
/* All OK, requesting the size of the hash */
- file = CreateFileA(selfname, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
+ file = CreateFileA(selfname, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
+ ok(file != INVALID_HANDLE_VALUE, "CreateFile failed %u\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pCryptCATAdminCalcHashFromFileHandle(file, &hashsize, NULL, 0);
- ok(ret, "Expected success\n");
+ ok(ret, "Expected success %u\n", GetLastError());
todo_wine
{
ok(hashsize == 20," Expected a hash size of 20, got %d\n", hashsize);
@@ -300,12 +301,12 @@ static void test_calchash(void)
/* All OK, retrieve the hash
* Double the hash buffer to see what happens to the size parameter
*/
- file = CreateFileA(selfname, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);
+ file = CreateFileA(selfname, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
hashsize *= 2;
hash = HeapAlloc(GetProcessHeap(), 0, hashsize);
SetLastError(0xdeadbeef);
ret = pCryptCATAdminCalcHashFromFileHandle(file, &hashsize, hash, 0);
- ok(ret, "Expected success\n");
+ ok(ret, "Expected success %u\n", GetLastError());
todo_wine
{
ok(hashsize == 20," Expected a hash size of 20, got %d\n", hashsize);
More information about the wine-cvs
mailing list