Detlef Riekenberg wrote:
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.
NULL is not supposed to be valid it was just to show that hcat changed. I guess just checking for INVALID_HANDLE_VALUE will do.
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.
Well, I actually don't know. Our implementation is wrong so this one is hard to check. I will remove it from the test. -- Cheers, Paul.