Export (0) Print
Expand All


Visual Studio .NET 2003

Call this method to render the map of names and values into a buffer as a URL-encoded string.

   LPSTR szParameters,
   LPDWORD pdwLen 
) throw( );


The caller-allocated buffer to receive the output of the method.
On entry, pdwLen should point to a DWORD that indicates the size of the buffer in bytes. On exit, the DWORD contains the number of bytes transferred or available to be transferred into the buffer (including the null-terminating byte).

Return Value

Returns TRUE on success, FALSE on failure.


On success, the buffer will contain the correct URL-encoded representation of the current object suitable for sending to a server as a query string or in the body of a form.

This function creates the string representation of the collection's contents in the following way:

  • Each name-value pair is separated from the next by an ampersand (&).
  • Each name is separated from its corresponding value by an equal sign (=).
  • A space is encoded as a plus sign (+).
  • Other unsafe characters (as determined by AtlIsUnsafeUrlChar) are encoded as escaped octets. An escaped octet is a percent sign (%) followed by two digits representing the hexadecimal code of the character.

Parse and Render are complementary operations. Parse creates a collection from a string. Render creates a string from a collection.

See Also

CHttpRequestParams Overview | Class Members | CHttpRequestParams::Parse

© 2015 Microsoft