CryptUIWizDigitalSign function (cryptuiapi.h)

[The CryptUIWizDigitalSign function is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

The CryptUIWizDigitalSign function digitally signs a document or BLOB. The document or BLOB can be signed with or without user interaction.

Syntax

BOOL CryptUIWizDigitalSign(
  [in]            DWORD                              dwFlags,
  [in, optional]  HWND                               hwndParent,
  [in, optional]  LPCWSTR                            pwszWizardTitle,
  [in]            PCCRYPTUI_WIZ_DIGITAL_SIGN_INFO    pDigitalSignInfo,
  [out, optional] PCCRYPTUI_WIZ_DIGITAL_SIGN_CONTEXT *ppSignContext
);

Parameters

[in] dwFlags

Contains flags that modify the behavior of the function. This can be zero or the following value.

Value Meaning
CRYPTUI_WIZ_NO_UI
0x0001
This function will sign the document based on the information in the CRYPTUI_WIZ_DIGITAL_SIGN_INFO structure pointed to by the pDigitalSignInfo parameter without displaying any user interface. If this flag is not specified, this function will display a wizard to guide the user through the signing process.

[in, optional] 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 CRYPTUI_WIZ_NO_UI flag is set in dwFlags.

[in, optional] 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. If this parameter is NULL, a default title is used.

[in] pDigitalSignInfo

A pointer to a CRYPTUI_WIZ_DIGITAL_SIGN_INFO structure that contains information about the signing process.

[out, optional] ppSignContext

A pointer to a CRYPTUI_WIZ_DIGITAL_SIGN_CONTEXT structure pointer that receives the signed BLOB. When you have finished using this structure, you must free the memory by passing this pointer to the CryptUIWizFreeDigitalSignContext function. This parameter can be NULL if the signed BLOB is not needed.

Return value

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE. For extended error information, call GetLastError.

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

CRYPTUI_WIZ_DIGITAL_SIGN_CONTEXT

CRYPTUI_WIZ_DIGITAL_SIGN_INFO

CryptUIWizFreeDigitalSignContext