4

I have a binary that uses a lot of COM interfaces. The COM dll's have a typelib resource included that I can extract and/or generate an .idl file (I'm using OleWoo tool).

Is there a way to load the typelib or an .idl file into Ida Pro so that Ida will recognize the COM interface and show the methods rather than offset such as in this sample:

*(void (__stdcall **)(LPVOID))(*(_DWORD *)ppv + 8))(ppv);
4

I was able to generate a header file using the midl compiler by exporting the idl file with the OLE/COM Viewer tool (oleview.exe) from the SDK.

From oleview select File -> View TypeLib and then save it via File -> Save As (e.g. MyFile.idl)

Then from a Visual Studio command prompt type: midl /out c:\temp /header MyFile.h MyFile.idl

Then in Ida you can use File -> Load File -> Parse C Header File. In Options -> Compiler Options -> Include Directories you can set the paths to the Windows SDK include directories (seperated by ;)

  • 1
    Tip: If IDA shows warning with that header file then copy ONLY the virtual table (vtbl) in a separate header file. This doesn't require to add SDK include directories. – Biswapriyo Aug 16 '18 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.