Module: wine Branch: master Commit: f422fa83d22635a3ae13a8f34ae62b2581dfcc93 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f422fa83d22635a3ae13a8f34a...
Author: Juan Lang juan.lang@gmail.com Date: Mon Sep 22 11:06:58 2008 -0700
cryptdlg: Implement CertViewPropertiesA on top of CertViewPropertiesW.
---
dlls/cryptdlg/main.c | 30 ++++++++++++++++++++++++++++-- 1 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/dlls/cryptdlg/main.c b/dlls/cryptdlg/main.c index 2447c38..943794a 100644 --- a/dlls/cryptdlg/main.c +++ b/dlls/cryptdlg/main.c @@ -22,6 +22,7 @@
#include "windef.h" #include "winbase.h" +#include "winnls.h" #include "wincrypt.h" #include "wintrust.h" #include "winuser.h" @@ -110,8 +111,33 @@ HRESULT WINAPI CertTrustFinalPolicy(CRYPT_PROVIDER_DATA *pProvData) */ BOOL WINAPI CertViewPropertiesA(CERT_VIEWPROPERTIES_STRUCT_A *info) { - FIXME("(%p): stub\n", info); - return FALSE; + CERT_VIEWPROPERTIES_STRUCT_W infoW; + LPWSTR title = NULL; + BOOL ret; + + TRACE("(%p)\n", info); + + memcpy(&infoW, info, sizeof(infoW)); + if (info->szTitle) + { + int len = MultiByteToWideChar(CP_ACP, 0, info->szTitle, -1, NULL, 0); + + title = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (title) + { + MultiByteToWideChar(CP_ACP, 0, info->szTitle, -1, title, len); + infoW.szTitle = title; + } + else + { + ret = FALSE; + goto error; + } + } + ret = CertViewPropertiesW(&infoW); + HeapFree(GetProcessHeap(), 0, title); +error: + return ret; }
/***********************************************************************