CRYPTUI_SELECTCERTIFICATE_STRUCT structure

The CRYPTUI_SELECTCERTIFICATE_STRUCT structure contains information about the dialog box displayed by the CryptUIDlgSelectCertificate function.

Syntax

typedef struct _CRYPTUI_SELECTCERTIFICATE_STRUCT {
  DWORD               dwSize;
  HWND                hwndParent;
  DWORD               dwFlags;
  LPCTSTR             szTitle;
  DWORD               dwDontUseColumn;
  LPCTSTR             szDisplayString;
  PFNCFILTERPROC      pFilterCallback;
  PFNCCERTDISPLAYPROC pDisplayCallback;
  void                *pvCallbackData;
  DWORD               cDisplayStores;
  HCERTSTORE          *rghDisplayStores;
  DWORD               cStores;
  HCERTSTORE          *rghStores;
  DWORD               cPropSheetPages;
  LPCPROPSHEETPAGE    rgPropSheetPages;
  HCERTSTORE          hSelectedCertStore;
} CRYPTUI_SELECTCERTIFICATE_STRUCT, *PCRYPTUI_SELECTCERTIFICATE_STRUCT;

Members

dwSize

The size, in bytes, of this structure.

hwndParent

The handle of the parent window of the dialog box. If this value is NULL, the parent window is the default desktop window.

dwFlags

Specifies additional options for the CryptUIDlgSelectCertificate function. This can be zero or a bitwise OR of the following values.

Value Meaning
CRYPTUI_SELECTCERT_ADDFROMDS
Reserved.
CRYPTUI_SELECTCERT_LEGACY
Specifies that the legacy dialog is to be displayed.
CRYPTUI_SELECTCERT_MULTISELECT
Allows the user to select more than one certificate in the dialog box. If this flag is set, the CryptUIDlgSelectCertificate function always returns NULL. The hSelectedCertStore member of this structure must contain a handle to a certificate store. The certificates selected by the user will be added to this store.
CRYPTUI_SELECTCERT_PUT_WINDOW_TOPMOST
Forces the cryptography UI to be the top window on the screen.

 

szTitle

The display title for the dialog box. If the value of this member is NULL, the default title of "Select Certificate" is used.

dwDontUseColumn

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

Value Meaning
CRYPTUI_SELECT_ISSUEDTO_COLUMN
1 (0x1)
Do not display ISSUEDTO information.
CRYPTUI_SELECT_ISSUEDBY_COLUMN
2 (0x2)
Do not display ISSUEDBY information.
CRYPTUI_SELECT_INTENDEDUSE_COLUMN
4 (0x4)
Do not display IntendedUse information.
CRYPTUI_SELECT_FRIENDLYNAME_COLUMN
8 (0x8)
Do not display name information.
CRYPTUI_SELECT_LOCATION_COLUMN
16 (0x10)
Do not display location information.
CRYPTUI_SELECT_EXPIRATION_COLUMN
32 (0x20)
Do not display expiration information.

 

szDisplayString

Text that is displayed in the dialog box to instruct the user. If the value of this member is NULL, the default string "Select a certificate you want to use" is used.

pFilterCallback

A pointer to a PFNCFILTERPROC callback function that filters the certificates that are displayed in the dialog box.

pDisplayCallback

A pointer to a PFNCCERTDISPLAYPROC callback function that displays certificates that the user selects to view.

pvCallbackData

Additional data that is passed to the callback functions specified by the pFilterCallback and pDisplayCallback members.

cDisplayStores

The number of certificate stores in the rghDisplayStores array.

rghDisplayStores

A pointer to an array of stores that contain certificates available for selection in the dialog box.

cStores

The number of certificate stores in the rghStores array.

rghStores

A pointer to an array of certificate stores to search when building a certificate chain and verifying trust for the certificates displayed in the dialog box.

cPropSheetPages

The number of property pages in the rgPropSheetPages array.

rgPropSheetPages

A pointer to an array of PROPSHEETPAGE structures that represent property pages that are passed to the certificate viewing dialog box when a certificate is selected for viewing.

hSelectedCertStore

A handle to a certificate store created by the caller. The certificates selected by the user are added to this store. If the number of certificates in this store is the same before and after calling CryptUIDlgSelectCertificate, the user closed the dialog box without selecting any certificates.

This member is not used if the dwFlags member of this structure does not contain the CRYPTUI_SELECTCERT_MULTISELECT flag.

Requirements

Requirement Value
Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Unicode and ANSI names
CRYPTUI_SELECTCERTIFICATE_STRUCTW (Unicode) and CRYPTUI_SELECTCERTIFICATE_STRUCTA (ANSI)

See also

CryptUIDlgSelectCertificate