IX509EnrollmentPolicyServer::Export method (certenroll.h)

The Export method exports templates and object identifiers associated with the certificate enrollment policy (CEP) server to a buffer.

Syntax

HRESULT Export(
  [in]          X509EnrollmentPolicyExportFlags exportFlags,
  [out, retval] VARIANT                         *pVal
);

Parameters

[in] exportFlags

An X509EnrollmentPolicyExportFlags enumeration value that specifies what to export. This can be a bitwise OR of the following values.

Value Meaning
ExportTemplates
Export templates.
ExportOIDs
Export custom object identifiers.

[out, retval] pVal

Pointer to a VARIANT of type VT_ARRAY|VT_UI1 that receives the templates and object identifiers.

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_POINTER
The pVal parameter must not be NULL.
HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)
The exportFlags parameter must contain ExportTemplates or ExportOIDs.
OLE_E_BLANK
The IX509EnrollmentPolicyServer has not been initialized.

Remarks

To prevent memory leaks, you must free the VARIANT returned by this function.

You must call LoadPolicy before calling this function and after calling Initialize for the exported data to be meaningful.

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 certenroll.h

See also

IX509EnrollmentPolicyServer