18 May
2009
18 May
'09
8:53 p.m.
On Mo, 2009-05-18 at 16:07 +0200, Paul Vriens wrote:
+ hcat = pCryptCATOpen(emptyW, 0, 0, 0, 0); + todo_wine + { + ok(hcat != NULL && hcat != INVALID_HANDLE_VALUE, "Expected a correct handle\n"); + ok(GetLastError() == ERROR_SUCCESS, + "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); + }
MSDN documents INVALID_HANDLE_VALUE on failure. When NULL is valid result, then a comment about the MSDN error would be nice. Did you have an application, that need ERROR_SUCCESS? The result of GetLastError() should only be tested, when the function failed, or when GetLastError is documented to be valid on success. -- By by ... Detlef