Skip to content

Latest commit

 

History

History
96 lines (75 loc) · 3.48 KB

nf-certif-icertserverpolicy-setcontext.md

File metadata and controls

96 lines (75 loc) · 3.48 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:certif.ICertServerPolicy.SetContext
ICertServerPolicy::SetContext (certif.h)
Specifies the request to be used as the context for subsequent calls to Certificate Services.
CCertServerPolicy object [Security]
SetContext method
ICertServerPolicy interface [Security]
SetContext method
ICertServerPolicy.SetContext
ICertServerPolicy::SetContext
SetContext
SetContext method [Security]
SetContext method [Security]
CCertServerPolicy object
SetContext method [Security]
ICertServerPolicy interface
_certsrv_icertserverpolicy_setcontext
certif/ICertServerPolicy::SetContext
security.icertserverpolicy_setcontext
security\icertserverpolicy_setcontext.htm
security
ba45cda8-49a5-4bd6-af68-90b4b56aff7d
12/05/2018
CCertServerPolicy object [Security],SetContext method, ICertServerPolicy interface [Security],SetContext method, ICertServerPolicy.SetContext, ICertServerPolicy::SetContext, SetContext, SetContext method [Security], SetContext method [Security],CCertServerPolicy object, SetContext method [Security],ICertServerPolicy interface, _certsrv_icertserverpolicy_setcontext, certif/ICertServerPolicy::SetContext, security.icertserverpolicy_setcontext
certif.h
Certsrv.h
Windows
None supported
Windows Server 2003 [desktop apps only]
Certidl.lib
Certcli.dll
Windows
19H1
ICertServerPolicy::SetContext
certif/ICertServerPolicy::SetContext
c++
APIRef
kbSyntax
COM
Certcli.dll
ICertServerPolicy.SetContext
CCertServerPolicy.SetContext

ICertServerPolicy::SetContext

-description

The SetContext method specifies the request to be used as the context for subsequent calls to Certificate Services.

-parameters

-param Context [in]

Specifies the request. This parameter must be set to the identical value returned in the Context parameter of the
ICertPolicy::VerifyRequest method.

-returns

VB

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.

-remarks

The policy module must call the SetContext method first, before calls to any other ICertServerPolicy method, so that the interface references a valid request.

Examples

// Set the context. The value nContext (long) would be the same
// as the context parameter in ICertPolicy::VerifyRequest.
// hr is defined as an HRESULT.
hr = pCertServerPolicy->SetContext( nContext );
if (FAILED(hr))
{
    printf("Failed SetContext [%x]\n", hr);
    goto error;
}

-see-also

ICertPolicy::VerifyRequest

ICertServerPolicy