IBinaryConverter::StringToString 方法 (certenroll.h)

StringToString 方法會修改套用至字串的 Unicode 編碼類型。

語法

HRESULT StringToString(
  [in]  BSTR         strEncodedIn,
  [in]  EncodingType EncodingIn,
  [in]  EncodingType Encoding,
  [out] BSTR         *pstrEncoded
);

參數

[in] strEncodedIn

BSTR 變數,其中包含要修改的字串。

[in] EncodingIn

EncodingType 列舉值,指定套用至輸入字串的 Unicode 編碼。

[in] Encoding

EncodingType 列舉值,指定要套用至輸出字串的 Unicode 編碼類型。 預設值為 XCN_CRYPT_STRING_BASE64

[out] pstrEncoded

包含編碼輸出字串的 BSTR 變數指標。

傳回值

如果函式成功,函式會傳回 S_OK

如果函式失敗,它會傳回 HRESULT 值,指出錯誤。 如需常見錯誤碼的清單,請參閱 一般 HRESULT 值

規格需求

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

另請參閱

IBinaryConverter