IX509PolicyServerUrl::UpdateRegistry method (certenroll.h)

The UpdateRegistry method registers a certificate enrollment policy (CEP) server.

Syntax

HRESULT UpdateRegistry(
  X509CertificateEnrollmentContext context
);

Parameters

context

An X509CertificateEnrollmentContext enumeration value that specifies the nature of the end entity for which the policy server is being registered. This can be one of the following values.

Value Meaning
ContextUser
An end user.
ContextMachine
A computer.
ContextAdministratorForceMachine
An administrator acting on the behalf of a computer.

Return value

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. Possible values include, but are not limited to, those in the following table. For a list of common error codes, see Common HRESULT Values.

Return code Description
E_INVALIDARG
The URL of the policy server is empty.
HRESULT_FROM_WIN32(ERROR_ACCESS_DISABLED_BY_POLICY)
You do not have sufficient access rights to register the CEP.

Remarks

The UpdateRegistry method is called by the AddPolicyServer method.

Requirements

   
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header certenroll.h

See also

IX509PolicyServerUrl