문제

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 OleViewer 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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top