Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function retrieves the first predefined or registered CRYPT_OID_INFOstructure matching a specified key type and key. The search can be limited to object identifiers (OID) within a specified OID group.

Use the CryptEnumOIDInfofunction to list all or selected subsets of CRYPT_OID_INFOstructures.

New OIDs can be placed in the list of registered OIDs either before or after the predefined entries. Because the CryptFindOIDInfofunction returns the first key on the list that matches the search criteria, a newly registered OID placed before a predefined OID entry with the same key overrides a predefined entry.

Syntax

PCCRYPT_OID_INFO WINAPI CryptFindOIDInfo(
  DWORD 
dwKeyType,
  void* 
pvKey,
  DWORD 
dwGroupId
);

Parameters

dwKeyType

[in] Specifies the key type to use when finding OID information.

The following table shows currently defined key types and the associated value of pvKey.

Key type Type of pvKey

CRYPT_OID_INFO_OID_KEY

The pvKeyparameter points to a szOID.

CRYPT_OID_INFO_NAME_KEY

The pvKeyparameter points to a pwszName.

CRYPT_OID_INFO_ALGID_KEY

ThepvKey parameter points to an ALG_ID.

CRYPT_OID_INFO_SIGN_KEY

The pvKeyparameter points to an array of two ALG_IDs where:

ALG_ID[0] is the hash AlgId.

ALG_ID[1] is the public key AlgId.

pvKey

[in] Value that depends on the value of the dwKeyTypeparameter. For more information, see the table in the description for the dwKeyTypeparameter.

dwGroupId

[in] Specifies the group identifier to use when finding OID information. Setting dwGroupIdto zero searches all groups according to the value of the dwKeyTypeparameter. Otherwise, only the dwGroupIdindicated is searched.

See CryptEnumOIDInfofor code that lists the OID information by group identifier.

Return Value

Returns a pointer to a constant structure of the CRYPT_OID_INFOtype. The returned pointer must not be freed. NULL is returned when the specified key and group is not found.

Requirements

Header wincrypt.h
Library crypt32.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also