CoInternetIsFeatureEnabledForIUri function

Determines whether the specified feature control is enabled for the security zone of the specified IUri.

Syntax

STDAPI CoInternetIsFeatureEnabledForIUri(
       INTERNETFEATURELIST         FeatureEntry,
  _In_ DWORD                       dwFlags,
       IUri                        *pIUri,
       IInternetSecurityManagerEx2 *pSecMgr
);

Parameters

FeatureEntry

A feature control from the INTERNETFEATURELIST enumeration.

dwFlags [in]

Specifies where to retrieve the feature control value from.

GET_FEATURE_FROM_THREAD (0x00000001)

The current thread.

GET_FEATURE_FROM_PROCESS (0x00000002)

The current process.

GET_FEATURE_FROM_REGISTRY (0x00000004)

Reserved. Do not use.

GET_FEATURE_FROM_THREAD_LOCALMACHINE (0x00000008)

The local machine zone.

GET_FEATURE_FROM_THREAD_INTRANET (0x00000010)

The intranet zone.

GET_FEATURE_FROM_THREAD_TRUSTED (0x00000020)

The trusted zone.

GET_FEATURE_FROM_THREAD_INTERNET (0x00000040)

The Internet zone.

GET_FEATURE_FROM_THREAD_RESTRICTED (0x00000080)

The restricted zone.

pIUri

An IUri interface that contains the URL to check, or NULL.

pSecMgr

A pointer to the IInternetSecurityManagerEx2 interface that is used for processing the URL action.

Return value

Returns one of the following values.

Return code Description
S_OK

The feature control is enabled.

S_FALSE

The feature control is disabled.

 

Remarks

The CoInternetIsFeatureEnabledForIUri function was introduced in Windows Internet Explorer 7.

CoInternetIsFeatureEnabledForIUri is the recommended function to use for the FEATURE_MIME_SNIFFING feature control, the FEATURE_WINDOW_RESTRICTIONS feature control, and the FEATURE_ZONE_ELEVATION feature control. Each feature control has an associated URL action: URLACTION_FEATURE_MIME_SNIFFING, URLACTION_FEATURE_WINDOW_RESTRICTIONS, and URLACTION_FEATURE_ZONE_ELEVATION, respectively. Because the URL policy for each URL action can be set differently for each security zone, this function calls IInternetSecurityManagerEx2::ProcessUrlActionEx2 to determine the URL policy for the URL action in the zone of the specified URL. If the specified feature control is not one of these, or if pIUri or pSecMgr is NULL, then this function returns the same result as CoInternetIsFeatureEnabled.

Flags of the form GET_FEATURE_FROM_THREAD* (where "*" indicates zero or more characters) should only be used when the Feature entry is either FEATURE_LOCAL_MACHINE_LOCKDOWN or FEATURE_PROTOCOL_LOCKDOWN.

Note   The sense of URL actions and Internet features are logically opposed; an enabled feature turns on mitigation (more secure), and URLPOLICY_ALLOW turns off mitigation (less secure). This function returns S_FALSE if the policy is URLPOLICY_ALLOW; otherwise, it returns S_OK.

 

Requirements

Minimum supported client

Windows XP with SP2

Minimum supported server

Windows Server 2003

Product

Internet Explorer 7

Header

Urlmon.h

Library

Urlmon.lib

DLL

Urlmon.dll