Export (0) Print
Expand All
Expand Minimize

WintrustGetDefaultForUsage function

The WintrustGetDefaultForUsage function retrieves the default usage identifier and callback information.

Syntax


BOOL WINAPI WintrustGetDefaultForUsage(
  _In_     DWORD dwAction,
  _In_     const char *pszUsageOID,
  _Inout_  CRYPT_PROVIDER_DEFUSAGE *psUsage
);

Parameters

dwAction [in]

Action to perform. This can be one of the following values. For more information, see Remarks.

ValueMeaning
DWACTION_ALLOCANDFILL

Allocate memory and fill the CRYPT_PROVIDER_DEFUSAGE structure pointed to by the psUsage parameter.

DWACTION_FREE

Free all memory allocated during a previous call to this function by specifying DWACTION_ALLOCANDFILL for this parameter.

 

pszUsageOID [in]

Pointer to a string that contains the identifier.

psUsage [in, out]

Pointer to a CRYPT_PROVIDER_DEFUSAGE structure that contains callback information to be retrieved.

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

Call this function once with the dwAction parameter set to DWACTION_ALLOCANDFILL to allocate memory and fill a CRYPT_PROVIDER_DEFUSAGE structure with information. Call this function again with the dwAction parameter set to DWACTION_FREE to free the allocated memory.

The default usage and callback information for a provider is registered by calling the WintrustAddDefaultForUsage function.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Wintrust.h

Library

Wintrust.lib

DLL

Wintrust.dll

See also

CRYPT_PROVIDER_DEFUSAGE
CRYPT_PROVIDER_REGDEFUSAGE
WintrustAddDefaultForUsage

 

 

Community Additions

ADD
Show:
© 2014 Microsoft