Geoff Chappell - Software Analyst
The following are the Feature Enable Flags that can be passed as the dwFlags argument for such URLMON functions as CoInternetIsFeatureEnabled and CoInternetSetFeatureEnabled. Despite being numbering as powers of two, these are not big flags. Combinations are unsupported.
The 0x01 and 0x02 values select a feature’s per-thread and per-process states, respectively. The initial per-process state is loaded from the registry, or is defaulted, when the process first calls CoInternetIsFeatureEnabled or CoInternetSetFeatureEnabled. This also initialises the per-thread state for whichever is the current thread at the time. Otherwise, the initial per-thread state is copied from the per-process state at thread attachment.
Though the 0x04 value is defined symbolically in URLMON.H, it is not supported in the URLMON code. As for any unsupported flag, it causes CoInternetIsFeatureEnabled to return the Internet Explorer default for the feature and it is ignored by CoInternetSetFeatureEnabled.
The per-zone values 0x08 to 0x80 are curiously under-documented by Microsoft. Their implementation is curious, also. Each corresponds to an Internet security zone (in decreasing order of trustworthiness). URLMON maintains a per-zone state for each thread, but there is not a per-zone state for each feature, only for all features. When these values are given as the dwFlags argument to CoInternetIsFeatureEnabled or CoInternetSetFeatureEnabled, the FeatureEntry argument is irrelevant. Presumably, this is an implementation detail and is not to be depended on, but who knows? The per-zone states are initialised with the per-thread states. The initial state is simply whether FEATURE_PROTOCOL_LOCKDOWN is enabled.