Is a new GUID generated every time a COM object is recompiled, so as to tell versions apart?
For backward compatibility, must each new version of a COM object contain at least all the methods and properties from the previous version?
Can multiple versions of a COM object co-exist on a computer?
Can I prevent an application from installing an older version of a shared COM object so that my application doesn't break?
Is there an application that can list an object's methods and properties, or is the object's documentation the only reliable source of info? I tried the OLE/COM Object Viewer and also RegDllView but they don't seem to provide that feature
1) An interface is a set of methods a class implementing the interface is guaranteed to have, and acts as a type you can cast a class instance to in order to call them.
2) No, otherwise it wouldn't be the same component.
3) That's what backwards compatibility essentially is, yes.
4) Not if they have the same GUID. Trying will lead to conflicts.
5) A well behaved installer should skip overwriting newer versions, but there's not much you can do to stop it without knowing exactly what you want to protect and denying access to it.
6) That's the right app. You want to use the 'View TypeLib' feature under the file menu.
So does the "Viewer: IDataObject interface viewer only supports IID_IDataObject" error message mean that particular COM object simply contains no typelib infos, and the only way to list its methods + properties is its traditional documentation?
So does the "Viewer: IDataObject interface viewer only supports IID_IDataObject" error message mean that particular COM object simply contains no typelib infos, and the only way to list its methods + properties is its traditional documentation?
Not COM object but a DLL i.e. COM server.
Most common setup is for a COM server to have its typelib embedded as regular PE (portable executable) resource. Some DLLs even have more than one typelib resource e.g. MSVBVM60.DLL has three typelibs.
It's possible a COM server to be stripped of any typelib resource and to have its typelib separate in an accompanying TLB file. It's a well known that a TLB file is actually a DLL file under the hood w/ no code sections but just having a typelib resource much like the common COM DLLs w/ typelib resource but without the actual code.
In your case: I've seen this error before on my dev machine but it got away at some point by itself. Either Windows update or I just installed next version of Platform SDK -- it works here just fine on Win11 w/ version 10.0.22000 I'm currently using.
I just went through and opened Windows\SysWOW64\msxml6.dll with OLEVIEW from: Visual Studio 6.0, Windows 10 SDK x86, and Windows 10 SDK x64, and they all opened it right up and displayed the type library.
I'm attaching a saved copy of the IDL (source for .tlb) it generated here.
A COM server is an exe/dll that supplies COM objects, which are classes that implement COM interfaces.
So when you create a DOMDocument60 object (in VB6 with 'New MSXML2.DOMDocument60', or by API with CreateObject("MSXML2.DOMDocument.6.0"), the actual code that runs when you call it's methods is in msxml6.dll, because msxml6.dll is the COM server, which supplies the default implementation of the DOMDocument60 COM object, which implements the IXMLDOMDocument3 interface and provides events through the XMLDOMDocumentEvents dispinterface.