CryptUIDlgSelectCertificateFromStore function (cryptuiapi.h)

The CryptUIDlgSelectCertificateFromStore function displays a dialog box that allows the selection of a certificate from a specified store.

Syntax

PCCERT_CONTEXT CryptUIDlgSelectCertificateFromStore(
  [in]           HCERTSTORE hCertStore,
  [in]           HWND       hwnd,
  [in, optional] LPCWSTR    pwszTitle,
  [in, optional] LPCWSTR    pwszDisplayString,
  [in]           DWORD      dwDontUseColumn,
  [in]           DWORD      dwFlags,
  [in]           void       *pvReserved
);

Parameters

[in] hCertStore

Handle of the certificate store to be searched.

[in] hwnd

Handle of the window for the display. If NULL, defaults to the desktop window.

[in, optional] pwszTitle

String used as the title of the dialog box. If NULL, the default title, "Select Certificate," is used.

[in, optional] pwszDisplayString

Text statement in the selection dialog box. If NULL, the default phrase, "Select a certificate you want to use," is used.

[in] dwDontUseColumn

Flags that can be combined to exclude columns of the display.

Value Meaning
CRYPTUI_SELECT_ISSUEDTO_COLUMN
Do not display the ISSUEDTO information.
CRYPTUI_SELECT_ISSUEDBY_COLUMN
Do not display the ISSUEDBY information.
CRYPTUI_SELECT_INTENDEDUSE_COLUMN
Do not display IntendedUse information.
CRYPTUI_SELECT_FRIENDLYNAME_COLUMN
Do not display the display name information.
CRYPTUI_SELECT_LOCATION_COLUMN
Do not display location information.
CRYPTUI_SELECT_EXPIRATION_COLUMN
Do not display expiration information.

[in] dwFlags

Currently not used and should be set to 0.

[in] pvReserved

Reserved for future use.

Return value

Returns a pointer to the selected certificate context. If no certificate was selected, NULL is returned. When you have finished using the certificate, free the certificate context by calling the CertFreeCertificateContext function.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header cryptuiapi.h
Library Cryptui.lib
DLL Cryptui.dll

See also

CryptUIDlgViewContext