Is there reverse function to MFC AfxParseURL (which creates URL from service type, port and so on)?
+4
A:
AfxParseURL is a wrapper around the InternetCrackUrl function in <wininet.h>
. The reverse function is InternetCreateUrl, but MFC does not provide a wrapper for this.
You could either use InternetCreateUrl
directly or create your own wrapper function that takes CString
objects as input, initialises a URL_COMPONENTS
structure, calls InternetCreateUrl
, and returns the result as a CString
.
ChrisN
2008-12-12 23:03:38