# IsValidURL

Determines if a specified string is a valid URL.

HRESULT IsValidURL(

IBindContext pBC, | // Bind context
LPCWSTR szURL | // URL whose validity is to be checked
….DWORD dwReserved | // Reserved for future use
); |

Parameters

pBC
  [in] The bind context. Optional and currently ignored. Should be set to NULL.
szURL
  [in] The URL whose validity is to be checked. For the purposes of this function, a “valid” URL must specify an absolute pathname.
dwReserved
  [in] Reserved for future use. Must be set to zero.

Return Values

S_OK
  szURL contains a valid URL.
S_FALSE
  szURL does not contain a valid URL.
E_INVALIDARG
  One of the parameters is invalid.

Remarks

Relative URLs are not considered “valid” by this function.