From d5e784bdaf7641eafd3bed773f708f39a1eea8e0 Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Thu, 28 Jun 2007 16:49:55 -0700 Subject: [PATCH] crypt32: Add a get param function, use it to implement CryptMsgGetParam. --- dlls/crypt32/msg.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index ebd7b657a4f..3c282309b9c 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -29,11 +29,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt); */ typedef void (*CryptMsgCloseFunc)(HCRYPTMSG msg); +typedef BOOL (*CryptMsgGetParamFunc)(HCRYPTMSG hCryptMsg, DWORD dwParamType, + DWORD dwIndex, void *pvData, DWORD *pcbData); + typedef struct _CryptMsgBase { - LONG ref; - DWORD open_flags; - CryptMsgCloseFunc close; + LONG ref; + DWORD open_flags; + CryptMsgCloseFunc close; + CryptMsgGetParamFunc get_param; } CryptMsgBase; static inline void CryptMsgBase_Init(CryptMsgBase *msg, DWORD dwFlags) @@ -174,7 +178,12 @@ BOOL WINAPI CryptMsgUpdate(HCRYPTMSG hCryptMsg, const BYTE *pbData, BOOL WINAPI CryptMsgGetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, DWORD dwIndex, void *pvData, DWORD *pcbData) { - FIXME("(%p, %d, %d, %p, %p): stub\n", hCryptMsg, dwParamType, dwIndex, + CryptMsgBase *msg = (CryptMsgBase *)hCryptMsg; + BOOL ret = FALSE; + + TRACE("(%p, %d, %d, %p, %p)\n", hCryptMsg, dwParamType, dwIndex, pvData, pcbData); - return FALSE; + if (msg && msg->get_param) + ret = msg->get_param(hCryptMsg, dwParamType, dwIndex, pvData, pcbData); + return ret; }