CryptUIWizDigitalSign function

[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(
  DWORD                              dwFlags,
  HWND                               hwndParent,
  LPCWSTR                            pwszWizardTitle,
  PCCRYPTUI_WIZ_DIGITAL_SIGN_INFO    pDigitalSignInfo,
  PCCRYPTUI_WIZ_DIGITAL_SIGN_CONTEXT *ppSignContext
);

Parameters

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.

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.

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.

pDigitalSignInfo

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

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 function returns nonzero.

If the function fails, it returns zero.

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_DIGITAL_SIGN_CONTEXT

CRYPTUI_WIZ_DIGITAL_SIGN_INFO

CryptUIWizFreeDigitalSignContext