Geoff Chappell, Software Analyst
The IGlobalOptions interface is implemented in OLE32.DLL. The IID is
The IGlobalOptions methods are (as ordered in the virtual function table after the IUnknown methods):
HRESULT Set (DWORD dwProperty, ULONG_PTR dwValue);
HRESULT Query (DWORD dwProperty, ULONG_PTR *pdwValue);
The only known implementation is by OLE32.DLL. Instances of a class that implements the IGlobalOptions interface are creatable from a CLSID:
The GlobalOptions class also implements the ISecurityOptions interface.
As implemented in OLE32 for the GlobalOptions class, neither IGlobalOptions method can succeed unless the COM Run Time already has security data, as from an earlier call to CoInitializeSecurity.
For the dwProperty argument, two cases are supported (in the sense that Set or Query can succeed):
The COMGLB_EXCEPTION_HANDLING property allows two values:
No symbolic name is known for 0 as a value for this property: Microsoft’s documentation (such as it is, see below) reproduces the symbolic name of the property, which is surely some sort of error in editing. Perhaps the intended name is COMGLB_EXCEPTION_HANDLE or COMGLB_EXCEPTION_DO_HANDLE.
For the property represented by 2, the value is the address of a GUID to serve as the AppID for COM security.
An unsurprising user is SVCHOST.EXE, which must be especially precise on all matters of security.
A notable user is IEFRAME.DLL for Internet Explorer. If running on Windows Vista or higher, IEFRAME (in the IEWinMain function) sets the COMGLB_EXCEPTION_HANDLING property to COMGLB_EXCEPTION_DONOT_HANDLE if the following registry key evaluates as true:
|Type||boolean, as dword, binary or string|
The two possible keys are given in order of decreasing precedence. The data may be of any type that are usual for shell functions (specifically SHRegGetBoolFromHKCUHKLM) to accept as boolean.
The IGlobalOptions interface is supported by OLE32.DLL in all known versions from Windows Server 2003 and Windows Vista.
The implementation notes above are from inspection of the version from Windows Vista.
Microsoft does document this interface, but the published information is incomplete (perhaps from being out of date). Moreover, the interface’s use in program code is not supported through the SDK (edition for Windows Vista, dated January 2007). Though the symbols IID_IGlobalOptions and CLSID_GlobalOptions are defined in UUID.LIB, there are no declarations of these, let alone of the interface, in any header file. As for the plain-language documentation, it makes out that there is just the one supported property, namely COMGLB_EXCEPTION_HANDLING. Curiously, this is the one property that Internet Explorer uses. Perhaps if not for that, the interface might not be documented at all.