大网数据广告活动
账户与安全

Certificate Enrollment Control Properties in C++

· 52CE 我爱测

Returns an HRESULT. In this an HRESULT, a value of S_OK indicates that the method was successfully executed.

When you set or retrieve a Certificate Enrollment Control property in C++, the method call returns an HRESULT. In this an HRESULT, a value of S_OK indicates that the method was successfully executed.

Programs written in C++ can retrieve the Certificate Enrollment Control properties by method calls in the following form.

#include <windows.h>

HRESULT get_propertyName( datatype * pPropValue);

Where propertyName specifies the name of the property being accessed, and pPropValue is a pointer to a variable of the appropriate data type. After successful completion of this method call, pPropValue will point to the variable that contains the value of the propertyName property.

For example, to retrieve the value for the RootStoreType property, you use the following code.

// Get the store type.
// hr is an HRESULT.
// bstrStoreType is a BSTR variable.
hr = pEnroll->get_RootStoreType( &bstrStoreType );

Programs written in C++ can set the Certificate Enrollment Control properties by calling methods in the following form.

#include <windows.h>

HRESULT put_propertyName( datatype PropValue);

Where propertyName specifies the name of the property being accessed, and PropValue is a value of the appropriate data type. After successful completion of this method call, the new value of the propertyName property will be PropValue.

For example, to set the property value for the RootStoreType, the following code could be used.

// Set the store type.
// bstrNewType previously set to a valid store type
hr = pEnroll->put_RootStoreType( bstrNewType );

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。