IVsHTMLConverter.ConvertToURLEncoding 方法

定义

在需要时,转换字符串替代 URL 编码,如 "%20" 表示空格。

public:
 int ConvertToURLEncoding(System::UInt32 uCodePage, System::String ^ szToConvert, System::UInt32 cchBuffSize, cli::array <System::UInt16> ^ szBuffer, [Runtime::InteropServices::Out] System::UInt32 % pcchBuffSizeActual);
int ConvertToURLEncoding(unsigned int uCodePage, std::wstring const & szToConvert, unsigned int cchBuffSize, std::Array <unsigned short> const & szBuffer, [Runtime::InteropServices::Out] unsigned int & pcchBuffSizeActual);
public int ConvertToURLEncoding (uint uCodePage, string szToConvert, uint cchBuffSize, ushort[] szBuffer, out uint pcchBuffSizeActual);
abstract member ConvertToURLEncoding : uint32 * string * uint32 * uint16[] * uint32 -> int
Public Function ConvertToURLEncoding (uCodePage As UInteger, szToConvert As String, cchBuffSize As UInteger, szBuffer As UShort(), ByRef pcchBuffSizeActual As UInteger) As Integer

参数

uCodePage
UInt32

中转换时要使用的代码页。

szToConvert
String

中要转换的字符串。

cchBuffSize
UInt32

中要在其中存储转换后的字符串的缓冲区的长度。

szBuffer
UInt16[]

弄包含转换后的字符串的缓冲区。

pcchBuffSizeActual
UInt32

弄所使用缓冲区的实际大小。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

注解

COM 签名

从 vsshell:

HRESULT IVsHTMLConverter::ConvertToURLEncoding(  
   [in] UINT uCodePage,   
   [in] LPCOLESTR szToConvert,   
   [in] ULONG cchBuffSize,   
   [in, out, size_is(cchBuffSize)] OLECHAR szBuffer[],   
   [out] ULONG *pcchBuffSizeActual  
);  

适用于