Juan Lang : crypt32: Add a get param function, use it to implement CryptMsgGetParam.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jun 29 08:14:38 CDT 2007


Module: wine
Branch: master
Commit: d5e784bdaf7641eafd3bed773f708f39a1eea8e0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d5e784bdaf7641eafd3bed773f708f39a1eea8e0

Author: Juan Lang <juan.lang at gmail.com>
Date:   Thu Jun 28 16:49:55 2007 -0700

crypt32: Add a get param function, use it to implement CryptMsgGetParam.

---

 dlls/crypt32/msg.c |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c
index ebd7b65..3c28230 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;
 }




More information about the wine-cvs mailing list