IX509MachineEnrollmentFactory::CreateObject method (certenroll.h)
The CreateObject method creates an IX509EnrollmentHelper object on a webpage. This method is web enabled.
Syntax
HRESULT CreateObject(
[in] BSTR strProgID,
[out, retval] IX509EnrollmentHelper **ppIHelper
);
Parameters
[in] strProgID
A BSTR variable that contains the ProgID value. This must be "X509Enrollment.CX509EnrollmentHelper".
[out, retval] ppIHelper
Address of a pointer to a variable that receives a pointer to an IX509EnrollmentHelper interface.
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 |
---|---|
|
The strProgID parameter cannot be NULL or empty. |
|
The strProgID parameter must contain "X509Enrollment.CX509EnrollmentHelper". |
|
The ppIHelper parameter cannot be NULL. |
|
The strProgID parameter exceed 64,000 characters or contains embedded null characters. |
Remarks
This method calls Initialize on the IX509EnrollmentHelper interface by using the ContextAdministratorForceMachine context value, thereby specifying that all certificates to be enrolled by the IX509Enrollment2 object will be requested by an administrator acting on behalf of a computer. To enroll a user certificate, call CreateObject on the IX509EnrollmentWebClassFactory interface.
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 |