URL字符串转义知识点.docVIP

  • 9
  • 0
  • 约9.93千字
  • 约 5页
  • 2016-12-15 发布于江苏
  • 举报
UrlEscape Function Converts characters in a URL that might be altered during transport across the Internet (unsafe characters) into their corresponding escape sequences. Syntax Copy HRESULT UrlEscape( __in?????PCTSTR pszURL, __out????PTSTR pszEscaped, __inout??DWORD *pcchEscaped, ?????????DWORD dwFlags ); Parameters pszURL?[in] Type:?PCTSTR A null-terminated string of maximum length INTERNET_MAX_URL_LENGTH that contains a full or partial URL, as appropriate for the value in?dwFlags. pszEscaped?[out] Type:?PTSTR The buffer that receives the converted string, with the unsafe characters converted to their escape sequences. pcchEscaped?[in, out] Type:?DWORD* A pointer to a?DWORD?value that, on entry, contains the number of characters in the?pszEscaped?buffer. Before calling?UrlEscape, the calling application must set the value referenced by?pcchEscaped?to the size of the buffer. When this function returns successfully, the value receives the number of characters written to the buffer, not including the terminating NULL character. If an E_POINTER error code is returned, the buffer was too small to hold the result, and the value referenced by?pcchEscaped?is set to the required number of characters in the buffer. If any other errors are returned, the value referenced by?pcchEscaped?is undefined. dwFlags Type:?DWORD The flags that indicate which portion of the URL is being provided in?pszURL?and which characters in that string should be converted to their escape sequences. The following flags are defined. URL_DONT_ESCAPE_EXTRA_INFO (0 Used only in conjunction with URL_ESCAPE_SPACES_ONLY to prevent the conversion of characters in the query (the portion of the URL following the first # or ? character encountered in the string). This flag should not be used alone, nor combined with URL_ESCAPE_SEGMENT_ONLY. URL_BROWSER_MODE Defined to be the same as URL_DONT_ESCAPE_EXTRA_INFO. URL_ESCAPE_SPACES_ONLY (0 Convert only space characters to their escape

文档评论(0)

1亿VIP精品文档

相关文档