What is stdole2.tlb

stdole32.tlb contains all the definitions of the base type, and every lib should import it if we use MIDL. But when I created the ATL DLL project, the lib file looks like this:

import "oaidl.idl"; import "ocidl.idl"; [ uuid(4CA3ADAD-AE53-4D80-AF26-176BAF8223B1), version(1.0), ] library FirstATLLib { importlib("stdole2.tlb"); }; 

I can not google, what is in stdole2.tlb? Does it contain stdole32.tlb? And what else? Can someone help me find out?

+4
source share
2 answers

You can use the Windows SDK COM/OLE Object Viewer to open the type library and see what's inside:

enter image description here

It defines the specific interfaces and type that you can use in your type library, since you make them available through the stdole2.tlb link.

+5
source

stdole2.tlb is a newer version of stdole32.tlb . This can be seen from the IDL export using OleView:

From stdole2.tlb :

 // typelib filename: stdole2.tlb [ uuid(00020430-0000-0000-C000-000000000046), version(2.0), helpstring("OLE Automation") ] library stdole { ... 

From stdole32.tlb :

 // typelib filename: stdole32.tlb [ uuid(00020430-0000-0000-C000-000000000046), version(1.0), helpstring("OLE Automation") ] library stdole { ... 

This is confirmed by the fact that they both have the same uuid , but stdole2 has a later version attribute.

Also, if you are comparing IDLs for both of them, you can see how the new differs from the first. It basically adds some attributes to several interfaces, and also adds a bunch of new typedefs, interfaces, etc. (Too much time to add here and no need to answer the question).

Curiously, unlike a DLL, there are no file attributes (the Details tab in the Properties view in Windows Explorer) with version or other information.

0
source

Source: https://habr.com/ru/post/1396665/


All Articles