If I use the OLE/COM Object Viewer (oleview.exe) from Visual Studio (2015) to display (generate) IDL from the Excel executable (from MSO 2007), I see that lots of methods in lots of interfaces have an LCID parameter.
For instance, the Volatile() method of the _Application interface. The oleview-generated IDL looks like:
HRESULT Volatile([in, optional] VARIANT Volatile,
[in, lcid] long lcid);
(Also, how can an optional parameter be followed by non-optional ones?)
If I use the Win32 API (LoadTypeLibEx(), ITypeLib, ITypeInfo, etc) to inspect the same Excel executable as a type library, I don't see such parameters at all. If I were to generate a corresponding C++ declaration based on what ITypeInfo methods tell me, it would be just:
HRESULT Volatile(VARIANT Volatile);
I have not seen corresponding weirdness in the Word type library (which isn't inside the Word executable, but in a separate msword.olb file). At least not for those interfaces in it that one comes across right from the start when investigating this stuff, i.e. _Application and Document.
What is going on?