共用方式為


IX509EnrollmentWebClassFactory::CreateObject 方法 (certenroll.h)

CreateObject 方法可用來在網頁上的用戶內容中建立物件。

語法

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

參數

[in] strProgID

包含 Prog 識別碼的 BSTR 變數。 下表顯示您可以使用這個方法建立之每個物件的字串。

Object Prog 識別符字串
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 值

傳回碼 Description
E_NOINTERFACE
指定的 Prog 識別碼代表無法使用此方法建立的物件。

規格需求

需求
最低支援的用戶端 Windows Vista [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2008 [僅限傳統型應用程式]
目標平台 Windows
標頭 certenroll.h
Dll CertEnroll.dll

另請參閱

IX509EnrollmentWebClassFactory