IX509EnrollmentWebClassFactory::CreateObject 方法 (certenroll.h)

CreateObject 方法可用于在网页上的用户上下文中创建对象。

语法

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

参数

[in] strProgID

包含 Prog ID 的 BSTR 变量。 下表显示了可用于使用此方法创建的每个对象的字符串。

Object Prog ID 字符串
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

一个变量的地址,该变量接收指向表示所创建对象的 IUnknown 接口的指针。

返回值

如果函数成功,该函数将返回 S_OK

如果函数失败,它将返回一个 指示错误的 HRESULT 值。 可能的值包括(但并不限于)下表中的项。 有关常见错误代码的列表,请参阅 通用 HRESULT 值

返回代码 说明
E_NOINTERFACE
指定的 Prog ID 表示无法使用此方法创建的对象。

要求

要求
最低受支持的客户端 Windows Vista [仅限桌面应用]
最低受支持的服务器 Windows Server 2008 [仅限桌面应用]
目标平台 Windows
标头 certenroll.h
DLL CertEnroll.dll

另请参阅

IX509EnrollmentWebClassFactory