Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The InitializeFromName method initializes the object from a string that contains a provider name. This method is web enabled.
Syntax
HRESULT InitializeFromName(
[in] BSTR strName
);
Parameters
[in] strName
A BSTR variable that contains the name.
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/value | Description |
---|---|
|
The object is already initialized. |
Remarks
The InitializeFromName method opens the named provider and queries it to set the following property values on the ICspInformation object:
- CspAlgorithms
- HasHardwareRandomNumberGenerator
- IsHardwareDevice
- IsRemovable
- IsSmartCard
- IsSoftwareDevice
- KeySpec
- LegacyCsp
- MaxKeyContainerNameLength
- Name
- Type
- Valid
- Version
The method adds the available algorithms to the ICspAlgorithms collection returned by the CspAlgorithms property. Call the InitializeFromType method to initialize the object from a provider type.
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 |