IEnroll4::AddCertTypeToRequestWStrEx method (xenroll.h)

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

The AddCertTypeToRequestWStrEx method, like the AddCertTypeToRequestWStr method, adds a certificate template (also known as certificate type) to a request.

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 V2 template extension into a request. This method was first defined in the IEnroll4 interface.

Syntax

HRESULT AddCertTypeToRequestWStrEx(
  [in] LONG    lType,
  [in] LPCWSTR pwszOIDOrName,
  [in] LONG    lMajorVersion,
  [in] BOOL    fMinorVersion,
  [in] LONG    lMinorVersion
);

Parameters

[in] lType

Indicates the version type of the template extension. It 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] pwszOIDOrName

A pointer to a null-terminated character string that represents the fully qualified name of the certificate template that is being added to the certificate request. This value is interpreted by the certification authority.

[in] lMajorVersion

Value that specifies the major version of the template. This parameter is ignored if lType is XECT_EXTENSION_V1.

[in] fMinorVersion

Value that specifies whether a minor version of the template is used. This parameter is ignored if lType is XECT_EXTENSION_V1.

[in] lMinorVersion

Value that specifies the minor version of the template. This parameter is ignored if lType is XECT_EXTENSION_V1 or if fMinorVersion is FALSE.

Return value

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

Remarks

This method supports only the new request method, createRequestWStr. It does not support the createPKCS10WStr 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

IEnroll4