Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

CoInternetSetFeatureEnabled (urlmon)
 
.
Summary
TODO - a short description

C# Signature:

private const int SET_FEATURE_ON_THREAD = 0x00000001;
private const int SET_FEATURE_ON_PROCESS = 0x00000002;
private const int SET_FEATURE_IN_REGISTRY = 0x00000004;
private const int SET_FEATURE_ON_THREAD_LOCALMACHINE = 0x00000008;
private const int SET_FEATURE_ON_THREAD_INTRANET = 0x00000010;
private const int SET_FEATURE_ON_THREAD_TRUSTED = 0x00000020;
private const int SET_FEATURE_ON_THREAD_INTERNET = 0x00000040;
private const int SET_FEATURE_ON_THREAD_RESTRICTED = 0x00000080;

[DllImport("urlmon.dll")]
[PreserveSig]
[return:MarshalAs(UnmanagedType.Error)]
static extern int CoInternetSetFeatureEnabled(
     INTERNETFEATURELIST FeatureEntry,
     [MarshalAs(UnmanagedType.U4)] int dwFlags,
     bool fEnable);

VB Signature:

Declare Function CoInternetSetFeatureEnabled Lib "urlmon.dll" ( _
    ByVal FeatureEntry As INTERNETFEATURELIST, ByVal dwFlags As Long, _
    ByVal fEnable As Long) As Long
Declare Function CoInternetSetFeatureEnabled Lib "urlmon.dll" (TODO) As TODO

User-Defined Types:

INTERNETFEATURELIST

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

The SET_FEATURE_* values are not defined as an enum in urlmon.h, so I kept them as constants.

The return value from CoInternetSetFeatureEnabled should be passed to the static ThrowExceptionForHR method on the Marshal class as well, in case a fail code is returned (or better yet, a wrapper can be created to this method).

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions