ISCrdEnr::enumCertTemplateName method

The enumCertTemplateName method enumerates the certificate template names.

Syntax

HRESULT enumCertTemplateName(
  [in]  DWORD     dwIndex,
  [in]  DWORD     dwFlags,
  [out] BSTR *pbstrCertTemplateName
);

SCrdEnr.enumCertTemplateName( _
  ByVal dwIndex, _
  ByVal dwFlags, _
  ByRef pbstrCertTemplateName _
)

Parameters

dwIndex [in]

The zero-based index for the enumeration sequence.

dwFlags [in]

A value that determines whether the enumerated certificate template applies to user or machine certificates. If this value is SCARD_ENROLL_USER_CERT_TEMPLATE (defined as 1), the enumeration applies to user certificate templates. If this value is SCARD_ENROLL_MACHINE_CERT_TEMPLATE (defined as 2), the enumeration applies to machine certificate templates.

pbstrCertTemplateName [out]

A pointer to a string that returns the name of the enumerated certificate template.

Return value

C++

If the method succeeds, the method returns S_OK.

If the method fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.

VB

A string that contains the name of the enumerated certificate template.

Requirements

Requirement Value
Minimum supported client
None supported
Minimum supported server
Windows Server 2003 [desktop apps only]
DLL
Scrdenrl.dll
IID
IID_ISCrdEnr is defined as 753988a1-1357-436d-9cf5-f089bdd67d64

See also

ISCrdEnr

ISCrdEnr::getCertTemplateCount

ISCrdEnr::getCertTemplateName

ISCrdEnr::setCertTemplateName