IX509EnrollmentWebClassFactory::CreateObject method (certenroll.h)

The CreateObject method can be used to create an object in the user context on a webpage.

Syntax

HRESULT CreateObject(
  [in]  BSTR     strProgID,
  [out] IUnknown **ppIUnknown
);

Parameters

[in] strProgID

A BSTR variable that contains the Prog ID. The following table shows the strings you can use for each object that can be created by using this method.

Object Prog ID string
ICertProperties
"X509Enrollment.CCertProperties"
ICertPropertyDescription
"X509Enrollment.CCertPropertyDescription"
ICertPropertyFriendlyName
"X509Enrollment.CCertPropertyFriendlyName"
ICspInformation
"X509Enrollment.CCspInformation"
ICspInformations
"X509Enrollment.CCspInformations"
ICspStatus
"X509Enrollment.CCspStatus"
IObjectId
"X509Enrollment.CObjectId"
IObjectIds
"X509Enrollment.CObjectIds"
ISignerCertificate
"X509Enrollment.CSignerCertificate"
IX500DistinguishedName
"X509Enrollment.CX500DistinguishedName"
IX509CertificateRequestCmc
"X509Enrollment.CX509CertificateRequestCmc"
IX509CertificateRequestPkcs10
"X509Enrollment.CX509CertificateRequestPkcs10"
IX509CertificateRequestPkcs7
"X509Enrollment.CX509CertificateRequestPkcs7"
IX509Enrollment
"X509Enrollment.CX509Enrollment"
IX509EnrollmentHelper
"X509Enrollment.CX509EnrollmentHelper"
IX509Extension
"X509Enrollment.CX509Extension"
IX509ExtensionEnhancedKeyUsage
"X509Enrollment.CX509ExtensionEnhancedKeyUsage"
IX509ExtensionKeyUsage
"X509Enrollment.CX509ExtensionKeyUsage"
IX509Extensions
"X509Enrollment.CX509Extensions"
IX509ExtensionTemplate
"X509Enrollment.CX509ExtensionTemplate"
IX509ExtensionTemplateName
"X509Enrollment.CX509ExtensionTemplateName"
IX509PrivateKey
"X509Enrollment.CX509PrivateKey"

[out] ppIUnknown

Address of a variable that receives a pointer to an IUnknown interface that represents the created object.

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_NOINTERFACE
The Prog ID specified represents an object that cannot be created by using this method.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header certenroll.h
DLL CertEnroll.dll

See also

IX509EnrollmentWebClassFactory