ICertServerExit::SetContext method

The SetContext method causes the current instantiation of the interface to operate on the request referenced by Context.

This must be identical to a value given by the Context parameter in ICertExit::Notify. This method must be called before calling any of the other ICertServerExit methods, in order that the interface reference a valid request.

Syntax


HRESULT SetContext(
  [in] LONG Context
);

Parameters

Context [in]

Specifies the request and associated certificate under construction.

Return value

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.

Examples


#include <windows.h>
#include <stdio.h>
#include <Certif.h>

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


Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Certif.h (include Certsrv.h)

Library

Certidl.lib

DLL

Certcli.dll

IID

IID_ICertServerExit is defined as 4BA9EB90-732C-11D0-8816-00A0C903B83C

See also

ICertServerExit
ICertExit::Notify
ICertPolicy::VerifyRequest

 

 

Show: