Commit b01348c9 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

cryptui: Implement CryptUIDlgViewCertificateA on top of CryptUIDlgViewCertificateW.

parent 6538cb44
......@@ -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)
......
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment