ICEnroll4::addCertTypeToRequestEx method (xenroll.h)

[This method is no longer available for use as of Windows Server 2008 and Windows Vista.]

The addCertTypeToRequestEx method, like the addCertTypeToRequest method, adds a certificate template (or "certificate type") to a request. This method was first defined in the ICEnroll4 interface.

This method is associated with the Certificate Services enterprise policy module. This method is specialized, and its use is not recommended for most applications. This version can add a V@ template extension into a request.

Syntax

HRESULT addCertTypeToRequestEx(
  [in] LONG lType,
  [in] BSTR bstrOIDOrName,
  [in] LONG lMajorVersion,
  [in] BOOL fMinorVersion,
  [in] LONG lMinorVersion
);

Parameters

[in] lType

Indicates the version type of the template extension. This can be either of the following values:

Value Meaning
XECT_EXTENSION_V1
Uses a version 1 extension
XECT_EXTENSION_V2
Uses a version 2 extension

[in] bstrOIDOrName

The certificate template fully qualified name which is being added to the certificate request. This value is interpreted by the certification authority.

[in] lMajorVersion

Sets the major version of the template. This parameter is ignored if lFlag is XECT_EXTENSION_V!.

[in] fMinorVersion

Indicates whether a minor version of the template is used. This parameter is ignored if lFlag is XECT_EXTENSION_V!.

[in] lMinorVersion

Sets the minor version of the template. This parameter is ignored if lFlag is XECT_EXTENSION_V1 or if fMinorVersion is FALSE.

Return value

VB

The return value is an HRESULT, with S_OK returned if the call is successful.

Remarks

This method supports only the new request method, createRequest. It does not support the createPKCS10 method.

This method can be called multiple times to establish multiple certificate templates for the request.

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

See also

CEnroll

ICEnroll2::addCertTypeToRequest

ICEnroll4

ICEnroll4::createRequest

ICEnroll::createPKCS10