Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oleview error "error loading type library"?

Tags:

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

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

Actually I am trying to open a dll from oleview and its showing error message "error loading type library".

As per my understanding if we have interfaces exposed from a DLL then it should be open by oleview, otherwise it cannot have exposed interfaces or functions.

Any possibility that we have dll exposing interfaces and still can't be viewed by Oleview.

like image 611
anand Avatar asked Jun 08 '09 09:06

anand


2 Answers

It is possible to create anonymous COM components and also components that only support IUnknown and private interfaces. There is no strict requirement that all of the information for the component should be defined in a type library. The type library just makes things easier for those who are trying to integrate the component and provides layout and other information for COM.

Also note that sometimes script-compatible components (IDispatch, IDispatchEx) only support run-time information, so these will usually ship with a bare-bones type library or none at all. But, with components that expose these interfaces, you can interrogate them through those interfaces for information.

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

like image 60
meklarian Avatar answered Oct 12 '22 07:10

meklarian


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

Yes. You can have a COM DLL with no tlb (though it's not what VC++ manufactures for you by default in ATL projects, for example).

Any possibility that we have dll exposing interfaces and still can't be viewed by Oleview.

Just a wild guess (not sure it's even correct to suggest) but could your DLL contain a tlb that references an external TLB that it fails to locate?

Also, your TLB might contains unsupported (perhaps custom) types that OLEView simply fails to digest. Is it purely a dual-interface sort of DLL?

like image 32
Assaf Lavie Avatar answered Oct 12 '22 08:10

Assaf Lavie