SOL9 2.0 Class: CertManagerDialog

 SOL9 C++ Class Library  SOL9 Samples  SOL9 Tutorial  SOL9 FAQ  SOL9 ClassTree 

Source code

/*
 * CertManagerDialog.h 
 * Copyright (c) 2009 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


#pragma once

#include <sol/crypt/CertDialog.h>


namespace SOL {

class CertManagerDialog :public CertDialog {
private:
    CRYPTUI_CERT_MGR_STRUCT mgr;

public:
    /**
     *Constructor
     */
    CertManagerDialog(HWND hwnd=NULL)
    :CertDialog(hwnd)
    {
        memset(&mgr, 0, sizeof(mgr));
        mgr.dwSize = sizeof(CRYPTUI_CERT_MGR_STRUCT);
    }


public:
    /**
     */
    int show(__in const wchar_t* title = NULL, 
            __in DWORD dwFlags=0,
            __in const char* usageOID= NULL) 
    {
        int rc = NO_ERROR;

        HWND hParent = getParent();

        mgr.hwndParent = hParent;
        mgr.dwFlags = dwFlags;
        mgr.pwszTitle = title;
        mgr.pszInitUsageOID = usageOID;

        if (!CryptUIDlgCertMgr(&mgr)) {
            rc = GetLastError();
        }
        return rc;
    }
};

}

Last modified: 19 Dec 2009

Copyright (c) 2009 Antillia.com ALL RIGHTS RESERVED.