Skip to content

Latest commit

 

History

History
120 lines (89 loc) · 5.77 KB

nf-certcli-icertrequest-getlaststatus.md

File metadata and controls

120 lines (89 loc) · 5.77 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:certcli.ICertRequest.GetLastStatus
ICertRequest::GetLastStatus (certcli.h)
Gets the last return code for this request. This returns the error code information, rather than the disposition of the request.
CCertRequest object [Security]
GetLastStatus method
GetLastStatus
GetLastStatus method [Security]
GetLastStatus method [Security]
CCertRequest object
GetLastStatus method [Security]
ICertRequest interface
GetLastStatus method [Security]
ICertRequest2 interface
GetLastStatus method [Security]
ICertRequest3 interface
ICertRequest interface [Security]
GetLastStatus method
ICertRequest.GetLastStatus
ICertRequest2 interface [Security]
GetLastStatus method
ICertRequest2::GetLastStatus
ICertRequest3 interface [Security]
GetLastStatus method
ICertRequest3::GetLastStatus
ICertRequest::GetLastStatus
certcli/ICertRequest2::GetLastStatus
certcli/ICertRequest3::GetLastStatus
certcli/ICertRequest::GetLastStatus
security.icertrequest2_getlaststatus
security\icertrequest2_getlaststatus.htm
security
ebe5cfa7-6bfd-4454-9272-64e3b1bf0ae2
12/05/2018
CCertRequest object [Security],GetLastStatus method, GetLastStatus, GetLastStatus method [Security], GetLastStatus method [Security],CCertRequest object, GetLastStatus method [Security],ICertRequest interface, GetLastStatus method [Security],ICertRequest2 interface, GetLastStatus method [Security],ICertRequest3 interface, ICertRequest interface [Security],GetLastStatus method, ICertRequest.GetLastStatus, ICertRequest2 interface [Security],GetLastStatus method, ICertRequest2::GetLastStatus, ICertRequest3 interface [Security],GetLastStatus method, ICertRequest3::GetLastStatus, ICertRequest::GetLastStatus, certcli/ICertRequest2::GetLastStatus, certcli/ICertRequest3::GetLastStatus, certcli/ICertRequest::GetLastStatus, security.icertrequest2_getlaststatus
certcli.h
Certsrv.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
Certidl.lib
Certcli.dll
Windows
19H1
ICertRequest::GetLastStatus
certcli/ICertRequest::GetLastStatus
c++
APIRef
kbSyntax
COM
Certcli.dll
ICertRequest3.GetLastStatus
ICertRequest2.GetLastStatus
ICertRequest.GetLastStatus
CCertRequest.GetLastStatus

ICertRequest::GetLastStatus

-description

The GetLastStatus method gets the last return code for this request. This returns the error code information, rather than the disposition of the request.

-parameters

-param pStatus [out]

A pointer to the request's status code.

-returns

C++

If the method succeeds, the method returns S_OK.

Upon successful completion of this function, *pStatus is set to the result code of the latest call to ICertRequest3::Submit, ICertRequest3::RetrievePending, or ICertRequest3::GetCACertificate.

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 the result code of the latest call to CCertRequest3.Submit, CCertRequest3.RetrievePending or CCertRequest3.GetCACertificate.

-remarks

The value retrieved by GetLastStatus depends on the most recent call to ICertRequest3::Submit, ICertRequest3::RetrievePending, or ICertRequest3::GetCACertificate. If a call to one of these methods fails on the server, call GetLastStatus to retrieve the error number. Some server failures (such as denied requests) return S_OK and a disposition other than CR_DISP_ISSUED from the method call, and you can use GetLastStatus to retrieve the specific cause of failure. If a call to one of these methods succeeds, then a subsequent call to GetLastStatus returns S_OK (which is zero).

Additionally, the request disposition is stored in the Certificate Services database, and can be viewed by means of the Certification Authority MMC snap-in (choose the Request Disposition column).

Examples

HRESULT    hrServer, hr;
// pCertRequest is previously instantiated
// ICertRequest object pointer.
hr = pCertRequest->GetLastStatus((LONG *) &hrServer);
if (FAILED(hr))
{
    printf("Failed GetLastStatus [%x]\n", hr);
    goto error;
}
else
{
    // Use the HRESULT value as needed...
}

-see-also

CCertRequest

ICertRequest

ICertRequest2

ICertRequest3