This method uses the undocumented CryptoAPI
function CryptUIDlgSelectCertificateW which displays
a list of certificates from a certificate store specified by Store.
Flags specifies what columns are to be displayed in the certificate
dialog. If Flags is 0, all 6 columns are to be displayed:
Issued to
Issued by
Intended Usage
Friendly Name
Expiration Date
Location
To hide any of these columns, use a combination (sum) of the following flags:
&H01 hides "Issued to"
&H02 hides "Issed by"
&H04 hides "Indended Usage"
&H08 hides "Friendly Name"
&H10 hides "Location"
&H20 hides "Expiration Date"
For example, the value 28 (&H04 + &H08 + &H10 = &H1C) hides all columns except
Issued to, Issued by and Expiration Date.
Caption, if set to a non-empty string, specifies the
caption of the certificate dialog. If an empty string is specified,
the default caption will be displayed.
Message, if set to a non-empty string, specifies the message
inside the dialog above the certificate list. If an empty
string is specified, the default message will be displayed.
Returns a CryptoCert object representing the user-selected certificate,
or Nothing if the user clicks Cancel.
Usage:
Set Store = XEncrypt.OpenStore("MY", False)
Set Cert = XEncrypt.PickCertificate(Store, _
28, "Select Certificate Please", _
"Select the one you want to be used for signing")
Related Tasks: 8.4 Signing with Personal Certificates.