ADVAPI32: preserve the last error value set by the CSP in CryptAcquireContext
Mike McCormack
mike at codeweavers.com
Fri Sep 3 21:40:15 CDT 2004
ChangeLog:
* preserve the last error value set by the CSP in CryptAcquireContext
-------------- next part --------------
Index: dlls/advapi32/crypt.c
===================================================================
RCS file: /home/wine/wine/dlls/advapi32/crypt.c,v
retrieving revision 1.51
diff -u -r1.51 crypt.c
--- dlls/advapi32/crypt.c 30 Aug 2004 23:57:18 -0000 1.51
+++ dlls/advapi32/crypt.c 4 Sep 2004 01:09:44 -0000
@@ -476,6 +476,8 @@
}
/* FALLTHROUGH TO ERROR IF FALSE - CSP internal error! */
error:
+ /* must preserve the last error returned by the CSP here */
+ r = GetLastError();
if (pProv)
{
FreeLibrary(pProv->hModule);
@@ -486,6 +488,7 @@
CRYPT_Free(provname);
CRYPT_Free(temp);
CRYPT_Free(imagepath);
+ SetLastError( r );
return FALSE;
}
More information about the wine-patches
mailing list