CertGetValidUsages (Windows CE 5.0)

Send Feedback

This function returns an array of usages consisting of the intersection of the valid usages for all certificates in an array of certificates.

BOOL WINAPI CertGetValidUsages(
  DWORD cCerts,  PCCERT_CONTEXT* rghCerts,  int* cNumOIDs,  LPSTR* rghOIDs,  DWORD* pcbOIDs);

Parameters

  • cCerts
    [in] Number of certificates in the array to be checked.
  • rghCerts
    [in] Array of certificates to be checked for valid usage.
  • cNumOIDs
    [out] Number of valid usages found as the intersection of the valid usages of all certificates in the array. If all of the certificates are valid for all usages, cNumOIDS is set to negative one (-1).
  • rghOIDs
    [out] Array of the OIDs of the valid usages that are shared by all of the certificates in the rghCerts array. This parameter can be NULL to set the size of this structure for memory allocation purposes.
  • pcbOIDs
    [in, out] Pointer to a DWORD value that specifies the size, in bytes, of the rghOIDs array and the strings pointed to. When the function returns, the DWORD value contains the number of bytes needed for the array.

Return Values

If the function succeeds, the return value is nonzero (TRUE). If the function fails, the return value is zero (FALSE). For extended error information, call GetLastError.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Wincrypt.h.
Link Library: Crypt32.lib.

See Also

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.