次の方法で共有


IServer::HTMLEncode

The IServer::HTMLEncode method applies HTML encoding to the specified string. For more information, see the Server.HTMLEncode method of the Server object.

HRESULT HTMLEncode(
      BSTR bstrIn,
      BSTR* pbstrEncoded
);

Parameters

  • bstrIn
    [in] A binary string that contains the text to be encoded.

  • pbstrEncoded
    [retval] [out] Points to a binary string that receives the encoded text.

Remarks

If your component returns the encoded text to a browser, the browser will display it in HTML format, rather than in plain text. For example, if the bstrIn contained the following string, < >, the pbstrEncoded parameter would contain the HTML code for those characters, &lt &gt. If your component returned this to a browser, however, it would display it as < >.

Requirements

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS

See Also