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.
Value Meaning - 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 |
|
|
Library |
|
|
DLL |
|
See also