Export (0) Print
Expand All
Expand Minimize

CryptUIDlgSelectCertificate function

The CryptUIDlgSelectCertificate function displays a dialog box that allows a user to select a certificate.

Syntax


PCCERT_CONTEXT WINAPI CryptUIDlgSelectCertificate(
  _In_  PCCRYPTUI_SELECTCERTIFICATE_STRUCT pcsc
);

Parameters

pcsc [in]

A pointer to a CRYPTUI_SELECTCERTIFICATE_STRUCT structure that contains information about the dialog box to display.

Return value

A pointer to a CERT_CONTEXT structure that represents the certificate selected by the user. When you have finished using this certificate, you must pass this pointer to the CertFreeCertificateContext function to decrement the reference count of the certificate context.

If the dwFlags member of the pcsc structure does not contain the CRYPTUI_SELECTCERT_MULTISELECT flag, a return value of NULL means that the user closed the dialog box without selecting a certificate.

If the dwFlags member of the pcsc structure does contain the CRYPTUI_SELECTCERT_MULTISELECT flag, this function always returns NULL. The selected certificates will be contained in the certificate store that is represented by the hSelectedCertStore member of pcsc. If the number of certificates in the store is the same before and after calling CryptUIDlgSelectCertificate, the user closed the dialog box without selecting any certificates.

Remarks

If the dwFlags member of the CRYPTUI_SELECTCERTIFICATE_STRUCT structure is set to CRYPTUI_SELECTCERT_LEGACY, the legacy dialog is displayed. Otherwise, the current certificate selection dialog is displayed.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Library

Cryptui.lib

DLL

Cryptui.dll

Unicode and ANSI names

CryptUIDlgSelectCertificateW (Unicode) and CryptUIDlgSelectCertificateA (ANSI)

See also

CRYPTUI_SELECTCERTIFICATE_STRUCT

 

 

Community Additions

ADD
Show:
© 2014 Microsoft