Export (0) Print
Expand All

UrlIs function

Tests whether a URL is a specified type.

Syntax


BOOL UrlIs(
  _In_  PCTSTR pszUrl,
  URLIS UrlIs
);

Parameters

pszUrl [in]

Type: PCTSTR

A null-terminated string of maximum length INTERNET_MAX_URL_LENGTH that contains the URL.

UrlIs

Type: URLIS

The type of URL to be tested for. This parameter can take one of the following values.

URLIS_APPLIABLE

Attempt to determine a valid scheme for the URL.

URLIS_DIRECTORY

Does the URL string end with a directory?

URLIS_FILEURL

Is the URL a file URL?

URLIS_HASQUERY

Does the URL have an appended query string?

URLIS_NOHISTORY

Is the URL a URL that is not typically tracked in navigation history?

URLIS_OPAQUE

Is the URL opaque?

URLIS_URL

Is the URL valid?

Return value

Type: BOOL

For all but one of the URL types, UrlIs returns TRUE if the URL is the specified type, or FALSE if not.

If UrlIs is set to URLIS_APPLIABLE, UrlIs will attempt to determine the URL scheme. If the function is able to determine a scheme, it returns TRUE, or FALSE otherwise.

Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shlwapi.h

Library

Shlwapi.lib

DLL

Shlwapi.dll (version 5.0 or later)

Unicode and ANSI names

UrlIsW (Unicode) and UrlIsA (ANSI)

See also

UrlIsFileUrl
UrlIsNoHistory
UrlIsOpaque

 

 

Community Additions

ADD
Show:
© 2014 Microsoft