WintrustAddDefaultForUsage function (wintrust.h)

The WintrustAddDefaultForUsage function specifies the default usage identifier and callback information for a provider.

Syntax

BOOL WintrustAddDefaultForUsage(
  [in] const char                 *pszUsageOID,
  [in] CRYPT_PROVIDER_REGDEFUSAGE *psDefUsage
);

Parameters

[in] pszUsageOID

Pointer to a string that contains the identifier.

[in] psDefUsage

Pointer to a CRYPT_PROVIDER_REGDEFUSAGE structure that contains callback information.

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.

Remarks

If the provider uses this function and requires any of the callback data, the provider must completely fill out the CRYPT_PROVIDER_REGDEFUSAGE structure.

The usage and callback information can be retrieved by calling the WintrustGetDefaultForUsage function.

Requirements

Requirement Value
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

CRYPT_PROVIDER_DEFUSAGE

CRYPT_PROVIDER_REGDEFUSAGE

WintrustGetDefaultForUsage