interface ICryptAttribute : IDispatch
{
public:
virtual HRESULT STDMETHODCALLTYPE Initialize(
/* [in] */ EncodingType Encoding,
/* [in] */ __RPC__in const BSTR str) = 0;
virtual HRESULT STDMETHODCALLTYPE InitializeEncode(
/* [in] */ EncodingType Encoding,
/* [in] */ __RPC__in const BSTR str) = 0;
virtual HRESULT STDMETHODCALLTYPE Decode(
/* [in] */ __RPC__in const BSTR str,
/* [in] */ EncodingType Encoding) = 0;
virtual HRESULT STDMETHODCALLTYPE DecodeBlob(
/* [in] */ __RPC__in const BSTR str,
/* [in] */ EncodingType Encoding,
/* [in] */ X500NameFlags NameFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE GetInfo(
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrOut) = 0;
virtual HRESULT STDMETHODCALLTYPE SetInfo(
/* [in] */ __RPC__in const BSTR strIn) = 0;
virtual HRESULT STDMETHODCALLTYPE GetInfoBlob(
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrOut) = 0;
virtual HRESULT STDMETHODCALLTYPE SetInfoBlob(
/* [in] */ __RPC__in const BSTR strIn) = 0;
virtual HRESULT STDMETHODCALLTYPE GetInfoFlags(
/* [in] */ X500NameFlags NameFlags,
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrOut) = 0;
virtual HRESULT STDMETHODCALLTYPE SetInfoFlags(
/* [in] */ X500NameFlags NameFlags,
/* [in] */ __RPC__in const BSTR strIn) = 0;
virtual HRESULT STDMETHODCALLTYPE GetStringProperty(
/* [in] */ X500NameFlags NameFlags,
/* [retval][out] */ __RPC__deref_out_opt BSTR *pstrOut) = 0;
virtual HRESULT STDMETHODCALLTYPE SetStringProperty(
/* [in] */ X500NameFlags NameFlags,
/* [in] */ __RPC__in const BSTR strIn) = 0;
virtual HRESULT STDMETHODCALLTYPE GetDateProperty(
/* [in] */ X500NameFlags NameFlags,
/* [retval][out] */ __RPC__out DATE *pDateOut) = 0;
virtual HRESULT STDMETHODCALLTYPE SetDateProperty(
/* [in] */ X500NameFlags NameFlags,
/* [in] */ DATE DateIn) = 0;
virtual HRESULT STDMETHODCALLTYPE GetLongProperty(
/* [in] */ X500NameFlags NameFlags,
/* [retval][out] */ __RPC__out LONG *pLongOut) = 0;
virtual HRESULT STDMETHODCALLTYPE SetLongProperty(
/* [in] */ X500NameFlags NameFlags,
/* [in] */ LONG LongIn) = 0;
virtual HRESULT STDMETHODCALLTYPE GetProperty(
/* [in] */ X500NameFlags NameFlags,
/* [retval][out] */ __RPC__out VARIANT *pvarProperty) = 0;
virtual HRESULT STDMETHODCALLTYPE SetProperty(
/* [in] */ X500NameFlags NameFlags,
/* [in] */ __RPC__in const VARIANT *pvarProperty) = 0;
};
这个接口包含了多个方法,用于初始化、编码、解码、获取和设置加密属性的各种信息。这些信息包括字符串、日期、长整型等属性。要正确使用这个接口,你可能需要详细查阅 Microsoft 的文档或者参考相关的示例代码。
转载请注明出处:http://www.zyzy.cn/article/detail/24198/Win32 API/Certenroll.h/ICryptAttribute