Oleview error "error loading type library"?

A type library declares classes, interfaces, constants, and procedures that are displayed in an application or in a dynamic link library (DLL). A type library is usually a resource in a program file; it can also be a standalone binary file with the extension .tlb or .olb.

Thus, it is possible that some DLLs still expose interfaces without being declared as TypeLib.

Actually, I am trying to open a dll from oleview and display the error message "Error loading type library".

According to my understanding, if we have interfaces open from a DLL, then it must be open oleview, otherwise it cannot have open interfaces or functions.

Any possibility that we have a dll that displays interfaces and still cannot be viewed by Oleview.

+4
source share
4 answers

You can create anonymous COM components, as well as components that support only IUnknown and private interfaces. There is no strict requirement that all information for a component be defined in a type library. A type library simplifies the task for those trying to integrate a component and provide layout and other information for COM.

Also note that sometimes script-based components (IDispatch, IDispatchEx) only support run-time information, so they usually come with a library like bare-bones or not at all. But with the components that expose these interfaces, you can request them through these interfaces for information.

Finally, OleView uses ITypeLib / ITypeInfo to examine type information. Not all COM libraries will provide an implementation, and some may store information in a separate place.

+3
source

... is it possible that some DLLs still expose interfaces without being declared as TypeLib.

Yes. You can have a COM-DLL without tlb (although this is not what VC ++ produces for you by default in ATL projects, for example).

Any possibility that we have dll exposing interfaces and still cannot be viewed by Oleview.

Just a wild hunch (not sure if it’s even correct to assume), but can your DLL contain tlb that references an external TLB that it cannot find?

In addition, your TLB may contain unsupported (possibly custom) types that OLEView simply does not acquire. Is it just a dll with two interfaces?

+1
source

First you need to open the library using File-> View Typelib, and not by clicking the button on the toolbar. This is a typical mistake.

Then you can easily have a COM server as part of proc without typelib in resources, but late binding and marshaling by default will not work for it, otherwise it will function in perfect order. This is typical for implementing a set of external interfaces (for example, IFilter) and know for sure that no one will use either late binding or marshaling with your COM server.

+1
source

It is possible that the type library may not be visible. OleView is not the most stable software in the world. This does not mean that there is no type library or that interfaces defined in this way will be unusable.

0
source

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


All Articles