From a54bd70bac52e8901be77b23a62d5ec35a0f8ab3 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 7 Oct 2009 13:31:12 +0200 Subject: [PATCH] advapi32: Use strict prototypes in the VTableProvStruc definition. --- dlls/advapi32/crypt.c | 11 ++++------- include/wincrypt.h | 9 +++++++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/dlls/advapi32/crypt.c b/dlls/advapi32/crypt.c index d1fc25de528..a26770ec885 100644 --- a/dlls/advapi32/crypt.c +++ b/dlls/advapi32/crypt.c @@ -182,12 +182,9 @@ static BOOL CALLBACK CRYPT_VerifyImage(LPCSTR lpszImage, BYTE* pData) return TRUE; } -static BOOL CALLBACK CRYPT_ReturnhWnd(HWND *phWnd) +static void CALLBACK CRYPT_ReturnhWnd(HWND *phWnd) { - if (!phWnd) - return FALSE; - *phWnd = crypt_hWindow; - return TRUE; + if (phWnd) *phWnd = crypt_hWindow; } #define CRYPT_GetProvFunc(name) \ @@ -242,8 +239,8 @@ static PCRYPTPROV CRYPT_LoadProvider(PCWSTR pImage) * Does it need memory allocation? */ provider->pVTable->Version = 3; - provider->pVTable->pFuncVerifyImage = (FARPROC)CRYPT_VerifyImage; - provider->pVTable->pFuncReturnhWnd = (FARPROC)CRYPT_ReturnhWnd; + provider->pVTable->FuncVerifyImage = CRYPT_VerifyImage; + provider->pVTable->FuncReturnhWnd = CRYPT_ReturnhWnd; provider->pVTable->dwProvType = 0; provider->pVTable->pbContextInfo = NULL; provider->pVTable->cbContextInfo = 0; diff --git a/include/wincrypt.h b/include/wincrypt.h index 067dd7c1e8f..0aef72e82c4 100644 --- a/include/wincrypt.h +++ b/include/wincrypt.h @@ -680,8 +680,13 @@ typedef struct _CRYPT_SMIME_CAPABILITIES { typedef struct _VTableProvStruc { DWORD Version; - FARPROC pFuncVerifyImage; - FARPROC pFuncReturnhWnd; +#ifdef WINE_STRICT_PROTOTYPES + BOOL (WINAPI *FuncVerifyImage)(LPCSTR,BYTE*); + void (WINAPI *FuncReturnhWnd)(HWND*); +#else + FARPROC FuncVerifyImage; + FARPROC FuncReturnhWnd; +#endif DWORD dwProvType; BYTE *pbContextInfo; DWORD cbContextInfo;