ICEnroll3::GetAlgName method (xenroll.h)
[This method is no longer available for use as of Windows Server 2008 and Windows Vista.]
The GetAlgName method retrieves the name of a cryptographic algorithm given its ID. The values retrieved by this method depend on the current cryptographic service provider (CSP). This method was first defined in the ICEnroll3 interface.
Syntax
HRESULT GetAlgName(
[in] LONG algID,
[out] BSTR *pbstr
);
Parameters
[in] algID
A value that represents a cryptographic algorithm, as defined in Wincrypt.h. For example, CALG_MD2 is a defined algorithm identifier. For this method to be successful, the current CSP must support the algID algorithm.
[out] pbstr
Upon success, a pointer to a BSTR that represents the name of the algorithm specified by algID. When you have finished using the BSTR, free it by calling the SysFreeString function.
Return value
C++
The return value is an HRESULT. A value of S_OK indicates success. If a CSP does not support this method or does not support the algID cryptographic algorithm, an error is returned.VB
The return value is a string that represents the name of the algorithm specified by algID. If a CSP does not support this method, an error is returned.Remarks
This method may be used to display the names of algorithms whose IDs are retrieved by calling EnumAlgs.
Constants for the cryptographic algorithms are defined in Wincrypt.h.
Examples
BSTR bstrAlgName = NULL;
HRESULT hr;
// Retrieve the algorithm name.
// dwAlgID is a DWORD variable for an algorithm ID.
hr = pEnroll->GetAlgName( dwAlgID, &bstrAlgName);
if (FAILED(hr))
printf("Failed GetAlgName [%x]\n", hr);
else
printf("AlgID: %d Name: %S\n", dwAlgID, bstrAlgName );
// Free BSTR resource.
if ( NULL != bstrAlgName )
{
SysFreeString( bstrAlgName );
bstrAlgName = NULL;
}
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | xenroll.h |
Library | Uuid.lib |
DLL | Xenroll.dll |