Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than urlmon, prefix the name with the module name and a period.
CoInternetSetFeatureEnabled (urlmon)
.
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
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!
TODO - a short description
4/25/2007 12:56:05 PM - arjan.mels-77.160.7.209
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).