开发者

Get IDL code from TypeLibrary programmatically

开发者 https://www.devze.com 2023-03-13 05:37 出处:网络
I am writing code to perform the following steps; Register a .net .dll and generate a .tlb using regasm.exe

I am writing code to perform the following steps;

Register a .net .dll and generate a .tlb using regasm.exe

  1. Register a .net .dll and generate a .tlb using regasm.exe
  2. Generate the IDL code from the typeLibrary and store it in a file.
  3. Edit the IDL code making minor changes.
  4. Recompile the IDL into a .tlb using Midl.exe.

The step I am stuck on, as I am sure you have guessed, is the generation of the IDL. I know this can be done manually by using the OleViewer that comes with the Windows API, however I would like to remove this manual step.

I cant seem to find anyway to operate the Ole开发者_高级运维Viewer via command line or find any other method of generating the IDL code.

Anybody got any ideas? I know the code to generate the IDL must be in the OleViewer somewhere... perhaps there is a way to access it?


Wine has an open source implementation of oleview

http://source.winehq.org/git/wine.git/tree/HEAD:/programs/oleview

Perhaps you'd be able to use the idl enumeration functions in typelib.c

http://source.winehq.org/git/wine.git/blob/HEAD:/programs/oleview/typelib.c

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号