Share via


AtlEscapeUrl

Call this function to convert all unsafe characters to escape sequences.

inline BOOL AtlEscapeUrl(
   LPCSTR szStringIn,
   LPSTR szStringOut,
   DWORD* pdwStrLen,
   DWORD dwMaxLength,
   DWORD dwFlags = 0 
) throw( );
inline BOOL AtlEscapeUrl(
   LPCWSTR szStringIn,
   LPWSTR szStringOut,
   DWORD* pdwStrLen,
   DWORD dwMaxLength,
   DWORD dwFlags = 0 
) throw( );

Parameters

  • lpszStringIn
    The URL to be converted.

  • lpszStringOut
    Caller-allocated buffer to which the converted URL will be written.

  • pdwStrLen
    Pointer to a DWORD variable. If the function succeeds, pdwStrLen receives the number of characters written to the buffer, not including the terminating null character. If the function fails, the variable receives the required length in bytes of the buffer including space for the terminating null character. When using the wide character version of this method, pdwStrLen receives the number of characters required, not the number of bytes.

  • dwMaxLength
    The size of the buffer lpszStringOut.

  • dwFlags
    Flags controlling the behavior of this function. See ATL_URL Flags.

Return Value

Returns TRUE on success, FALSE on failure.

Requirements

Header: atlutil.h

See Also

Reference

AtlUnescapeUrl

Other Resources

ATL Concepts

ATL Reference

ATL Functions Alphabetical Reference