Juan Lang : cryptui: Call CryptUIWizExport when asked to.

Alexandre Julliard julliard at winehq.org
Mon Jan 26 10:13:49 CST 2009


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

Author: Juan Lang <juan.lang at gmail.com>
Date:   Fri Jan 23 13:36:12 2009 -0800

cryptui: Call CryptUIWizExport when asked to.

---

 dlls/cryptui/main.c |   37 ++++++++++++++++++++++++++++++++++++-
 1 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c
index f607ccc..61554b7 100644
--- a/dlls/cryptui/main.c
+++ b/dlls/cryptui/main.c
@@ -1134,6 +1134,30 @@ static LRESULT CALLBACK cert_mgr_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
                 show_selected_cert(hwnd, selection);
             break;
         }
+        case IDC_MGR_EXPORT:
+        {
+            HWND lv = GetDlgItem(hwnd, IDC_MGR_CERTS);
+            int selection = SendMessageW(lv, LVM_GETNEXTITEM, -1,
+             LVNI_SELECTED);
+
+            if (selection >= 0)
+            {
+                PCCERT_CONTEXT cert = cert_mgr_index_to_cert(hwnd, selection);
+
+                if (cert)
+                {
+                    CRYPTUI_WIZ_EXPORT_INFO info;
+
+                    info.dwSize = sizeof(info);
+                    info.pwszExportFileName = NULL;
+                    info.dwSubjectChoice = CRYPTUI_WIZ_EXPORT_CERT_CONTEXT;
+                    info.u.pCertContext = cert;
+                    info.cStores = 0;
+                    CryptUIWizExport(0, hwnd, NULL, &info, NULL);
+                }
+            }
+            break;
+        }
         case IDC_MGR_REMOVE:
             cert_mgr_do_remove(hwnd);
             break;
@@ -3721,8 +3745,19 @@ static LRESULT CALLBACK detail_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
         switch (wp)
         {
         case IDC_EXPORT:
-            FIXME("call CryptUIWizExport\n");
+        {
+            HWND cb = GetDlgItem(hwnd, IDC_DETAIL_SELECT);
+            CRYPTUI_WIZ_EXPORT_INFO info;
+
+            data = (struct detail_data *)SendMessageW(cb, CB_GETITEMDATA, 0, 0);
+            info.dwSize = sizeof(info);
+            info.pwszExportFileName = NULL;
+            info.dwSubjectChoice = CRYPTUI_WIZ_EXPORT_CERT_CONTEXT;
+            info.u.pCertContext = data->pCertViewInfo->pCertContext;
+            info.cStores = 0;
+            CryptUIWizExport(0, hwnd, NULL, &info, NULL);
             break;
+        }
         case IDC_EDITPROPERTIES:
         {
             HWND cb = GetDlgItem(hwnd, IDC_DETAIL_SELECT);




More information about the wine-cvs mailing list