ICertRequest3::GetIssuedCertificate2 method (certcli.h)

The GetIssuedCertificate2 method retrieves a certificate's disposition by specifying either the request ID string or the certificate serial number.

Syntax

HRESULT GetIssuedCertificate2(
  [in]          BSTR strConfig,
  [in]          BSTR strRequestId,
  [in]          BSTR strSerialNumber,
  [out, retval] LONG *pDisposition
);

Parameters

[in] strConfig

Represents a valid configuration string for the Certificate Services server. The string can be either an HTTPS URL for an enrollment server or in the form ComputerName\CAName, where ComputerName is the network name of the server, and CAName is the common name of the certification authority, as entered during Certificate Services setup. For information about the configuration string name, see ICertConfig.

Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  An HTTPS URL is not supported as an input.

[in] strRequestId

A BSTR value that represents the certificate request ID in the Certificates Services database. Set this parameter to NULL if the serial number (passed in as strSerialNumber) is to be used instead of the request ID.

Use the ICertRequest3::GetRequestIdString method to obtain the request ID string.

[in] strSerialNumber

A BSTR value that represents the certificate serial number, as issued by the CA. The string must specify the serial number as an even number of hexadecimal digits. If necessary, a zero can be prefixed to the number to produce an even number of digits. However, no more than one leading zero may be used.

The strSerialNumber value is only used when the strRequestId is set to NULL.

[out, retval] pDisposition

A pointer to a LONG value that represents the certificate's disposition. The disposition is one of the following values.

Value Meaning
CR_DISP_DENIED
Request denied.
CR_DISP_ERROR
Request failed.
CR_DISP_INCOMPLETE
Request did not complete.
CR_DISP_ISSUED
Certificate issued.
CR_DISP_ISSUED_OUT_OF_BAND
Certificate issued separately.
CR_DISP_UNDER_SUBMISSION
Request taken under submission.

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

The return value is a Long that represents the certificate's disposition.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header certcli.h (include Certsrv.h)
Library Certidl.lib
DLL Certcli.dll

See also

CCertRequest

ICertRequest3