CryptUIWizExport function (cryptuiapi.h)

The CryptUIWizExport function exports a certificate, a certificate trust list (CTL), a certificate revocation list (CRL), or a certificate store to a file. The export can be performed with or without user interaction.

Syntax

BOOL CryptUIWizExport(
  DWORD                     dwFlags,
  HWND                      hwndParent,
  LPCWSTR                   pwszWizardTitle,
  PCCRYPTUI_WIZ_EXPORT_INFO pExportInfo,
  void                      *pvoid
);

Parameters

dwFlags

Contains flags that modify the behavior of the function. This can be zero or a combination of one or more of the following values.

Note  Except for CRYPTUI_WIZ_NO_UI, none of the following constants are defined in a published header file. To use these constants, you must define them by using the specified values.
 
Value Meaning
CRYPTUI_WIZ_NO_UI
0x0001
This function will perform the export based on the information in the CRYPTUI_WIZ_EXPORT_INFO structure pointed to by pExportInfo without displaying any user interface. If this flag is not specified, this function will display a wizard to guide the user through the export process.
CRYPTUI_WIZ_IGNORE_NO_UI_FLAG_FOR_CSPS
0x0002
Suppress all user interfaces generated by cryptographic service providers (CSPs). This option can be overridden by the CRYPTUI_WIZ_NO_UI_EXCEPT_CSP option.
CRYPTUI_WIZ_NO_UI_EXCEPT_CSP
0x0003
Suppress all user interfaces except those generated by CSPs. This option overrides the CRYPTUI_WIZ_IGNORE_NO_UI_FLAG_FOR_CSPS option.
CRYPTUI_WIZ_EXPORT_PRIVATE_KEY
0x0100
Skip the Export Private Key page and assume that the private key is to be exported.
CRYPTUI_WIZ_EXPORT_NO_DELETE_PRIVATE_KEY
0x0200
Disable the Delete the private key check box in the Export File Format page.

hwndParent

The handle of the window to use as the parent of the dialog box that this function creates. This parameter is ignored if the CRYPT_WIZ_NO_UI flag is set in dwFlags.

pwszWizardTitle

A pointer to a null-terminated Unicode string that contains the title to use in the dialog box that this function creates. This parameter is ignored if the CRYPT_WIZ_NO_UI flag is set in dwFlags.

pExportInfo

A pointer to a CRYPTUI_WIZ_EXPORT_INFO structure that contains information about producing the export wizard.

pvoid

If the dwSubjectChoice member of the CRYPTUI_WIZ_EXPORT_INFO structure that pExportInfo references is CRYPTUI_WIZ_EXPORT_CERT_CONTEXT, and if the CRYPTUI_WIZ_NO_UI flag is set in dwFlags, this parameter is a pointer to a CRYPTUI_WIZ_EXPORT_CERTCONTEXT_INFO structure.

If the CRYPTUI_WIZ_NO_UI flag is not set in dwFlags, this parameter is optional and can be NULL. If this parameter is not NULL, the CRYPTUI_WIZ_EXPORT_CERTCONTEXT_INFO structure contains the values that are displayed to the user as the default choices.

Return value

If the function succeeds, the function returns nonzero.

If the function fails, it returns zero. For extended error information, call the GetLastError function.

Requirements

   
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

CRYPTUI_WIZ_EXPORT_CERTCONTEXT_INFO

CRYPTUI_WIZ_EXPORT_INFO

CryptUIWizImport