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 method maps a pattern into the specified zone.

Syntax

HRESULT SetZoneMapping(
  DWORD 
dwZone,
  LPCWSTR 
lpszPattern,
  DWORD 
dwFlags
);

Parameters

dwZone

[in] Unsigned long integer value that specifies the zone index.

lpszPattern

[in] Address of a string value that contains the URL pattern with a limited number of wildcards.

dwFlags

[in] Unsigned long integer value that indicates whether the mappings should be added or deleted. This can be one of the SZM_FLAGS values.

Return Value

Returns one of the following values

Value Description

S_OK

Success.

E_ACCESSDENIED

Attempted to enter a non–Secure Sockets Layer (SSL) site into a zone that requires server verification.

URL_E_INVALID_SCHEME

Either an improper scheme or no scheme is specified in the URL.

E_FAIL

The mapping already exists.

Remarks

The method can also return the HRESULT, derived from the Win32 error code ERROR_FILE_EXISTS, to indicate that the URL already exists in another zone.

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