WintrustAddActionID function

[The WintrustAddActionID function is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. For certificate verification, use the CertGetCertificateChain and CertVerifyCertificateChainPolicy functions. For Microsoft Authenticode technology signature verification, use the .NET Framework.]

The WintrustAddActionID function adds a trust provider action to the user's system. This method should be called during the DllRegisterServer implementation of the trust provider. This function has no associated import library. You must use the LoadLibrary and GetProcAddress functions to dynamically link to Wintrust.dll.

This method should be called only by a trust provider.

Syntax

BOOL WintrustAddActionID(
  GUID                    *pgActionID,
  DWORD                   fdwFlags,
  CRYPT_REGISTER_ACTIONID *psProvInfo
);

Parameters

pgActionID

A pointer to a GUID structure that identifies the action to add and the trust provider that supports that action.

The WinTrust service is designed to work with trust providers implemented by third parties. Each trust provider provides its own unique set of action identifiers. For information about the action identifiers supported by a trust provider, see the documentation for that trust provider.

For example, Microsoft provides a Software Publisher Trust Provider that can establish the trustworthiness of software being downloaded from the Internet or some other public network. The Software Publisher Trust Provider supports the following action identifiers. These constants are defined in Softpub.h.

Value Meaning
WINTRUST_ACTION_GENERIC_VERIFY
Verify a certificate chain only.
WINTRUST_ACTION_GENERIC_VERIFY_V2
Verify a file or object using the Authenticode policy provider.
HTTPSPROV_ACTION
Verify an SSL/PCT connection through Internet Explorer.

fdwFlags

a value that determines whether registry errors are reported by this function. If fdwFlags is zero and this function experiences a registry error, the registry error will not be propagated to the GetLastError function. If fdwFlags is WT_ADD_ACTION_ID_RET_RESULT_FLAG (0x1) and this function experiences a registry error, the registry error will be propagated to the GetLastError function.

psProvInfo

A pointer to the CRYPT_REGISTER_ACTIONID structure that defines the information for the trust provider.

Return Value

The return value is TRUE if the function succeeds; FALSE if the function fails. If the function fails, call the GetLastError function to determine the reason for failure. For information about any registry errors that this function may encounter, see the description for fdwFlags.

Remarks

To remove an action that has been added by this function, call the WintrustRemoveActionID function.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header wintrust.h
Library Wintrust.lib
DLL Wintrust.dll

See Also

WintrustRemoveActionID