WintrustAddDefaultForUsage function

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

Syntax

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

Parameters

pszUsageOID

Pointer to a string that contains the identifier.

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

   
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