IBinaryConverter::StringToString method (certenroll.h)

The StringToString method modifies the type of Unicode encoding applied to a string.

Syntax

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

Parameters

[in] strEncodedIn

A BSTR variable that contains the string to modify.

[in] EncodingIn

An EncodingType enumeration value that specifies the Unicode encoding applied to the input string.

[in] Encoding

An EncodingType enumeration value that specifies the type of Unicode encoding to apply to the output string. The default value is XCN_CRYPT_STRING_BASE64.

[out] pstrEncoded

Pointer to a BSTR variable that contains the encoded output string.

Return value

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.

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

See also

IBinaryConverter