Juan Lang : cryptui: Implement CryptUIDlgViewCertificateA on top of CryptUIDlgViewCertificateW.
Alexandre Julliard
julliard at winehq.org
Mon Sep 22 07:03:46 CDT 2008
Module: wine
Branch: master
Commit: b01348c9a954e08b07951d540509eb51de12bcde
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b01348c9a954e08b07951d540509eb51de12bcde
Author: Juan Lang <juan.lang at gmail.com>
Date: Fri Sep 19 16:58:03 2008 -0700
cryptui: Implement CryptUIDlgViewCertificateA on top of CryptUIDlgViewCertificateW.
---
dlls/cryptui/cryptui.spec | 2 +-
dlls/cryptui/main.c | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 1 deletions(-)
diff --git a/dlls/cryptui/cryptui.spec b/dlls/cryptui/cryptui.spec
index ad5cb4b..088d087 100644
--- a/dlls/cryptui/cryptui.spec
+++ b/dlls/cryptui/cryptui.spec
@@ -11,7 +11,7 @@
11 stub CryptUIDlgViewCRLW
12 stub CryptUIDlgViewCTLA
13 stub CryptUIDlgViewCTLW
-14 stub CryptUIDlgViewCertificateA
+14 stdcall CryptUIDlgViewCertificateA(ptr ptr)
15 stub CryptUIDlgViewCertificatePropertiesA
16 stub CryptUIDlgViewCertificatePropertiesW
17 stdcall CryptUIDlgViewCertificateW(ptr ptr)
diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c
index 4bf456a..00e8683 100644
--- a/dlls/cryptui/main.c
+++ b/dlls/cryptui/main.c
@@ -22,6 +22,7 @@
#include "windef.h"
#include "winbase.h"
+#include "winnls.h"
#include "winuser.h"
#include "cryptuiapi.h"
#include "wine/debug.h"
@@ -56,6 +57,40 @@ BOOL WINAPI CryptUIDlgCertMgr(PCCRYPTUI_CERT_MGR_STRUCT pCryptUICertMgr)
return FALSE;
}
+BOOL WINAPI CryptUIDlgViewCertificateA(
+ PCCRYPTUI_VIEWCERTIFICATE_STRUCTA pCertViewInfo, BOOL *pfPropertiesChanged)
+{
+ CRYPTUI_VIEWCERTIFICATE_STRUCTW viewInfo;
+ LPWSTR title = NULL;
+ BOOL ret;
+
+ TRACE("(%p, %p)\n", pCertViewInfo, pfPropertiesChanged);
+
+ memcpy(&viewInfo, pCertViewInfo, sizeof(viewInfo));
+ if (pCertViewInfo->szTitle)
+ {
+ int len = MultiByteToWideChar(CP_ACP, 0, pCertViewInfo->szTitle, -1,
+ NULL, 0);
+
+ title = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+ if (title)
+ {
+ MultiByteToWideChar(CP_ACP, 0, pCertViewInfo->szTitle, -1, title,
+ len);
+ viewInfo.szTitle = title;
+ }
+ else
+ {
+ ret = FALSE;
+ goto error;
+ }
+ }
+ ret = CryptUIDlgViewCertificateW(&viewInfo, pfPropertiesChanged);
+ HeapFree(GetProcessHeap(), 0, title);
+error:
+ return ret;
+}
+
BOOL WINAPI CryptUIDlgViewCertificateW(PCCRYPTUI_VIEWCERTIFICATE_STRUCTW pCertViewInfo,
BOOL *pfPropertiesChanged)
{
More information about the wine-cvs
mailing list