Dave's Brain

Browse - Programming Tips - How can I check if a URL is valid?

Date: 2013sep5
Language: C++
Framework: MFC

Q.  How can I check if a URL is valid?

A.

BOOL isValidUrl(LPCSTR szUrl) { DWORD dwServiceType = 0; CString strServer; CString strObject; INTERNET_PORT port = 0; return AfxParseURL(szUrl, dwServiceType, strServer, strObject, port); }

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.