Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function determines if a specified string is a valid URL.

Syntax

HRESULT IsValidURL(
  LPBC 
pBC,
  LPCWSTR 
szURL,
  DWORD 
dwReserved
);

Parameters

pBC

[in] Address of the IBindCtxinterface. This parameter is optional and is currently ignored. It should be set to NULL.

szURL

[in] Address of a string value that contains the full URL to be checked.

dwReserved

[in] Reserved. Must be set to zero.

Return Value

This function returns one of the values shown in the following table.

Value Description

S_OK

The szURLparameter contains a valid URL.

S_FALSE

The szURLparameter does not contain a valid URL.

E_INVALIDARG

One of the parameters is invalid.

Remarks

The function determines that the syntax of the specified URL is valid. It does not attempt to determine whether there is an actual Web site associated with the URL.

Requirements

Header urlmon.h, urlmon.idl
Library urlmon.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later