ATL と Microsoft の IDL を使用して記述した COM インターフェイスを備えた 2 つのタイプ ライブラリがあります。あるライブラリのインターフェイスを別のライブラリのインターフェイスから継承したいと考えています。
基本的には、Stevenが VS C++ で .tlb 型を使用してインターフェイス メソッドを作成するにはどうすればよいですか? で説明したのと同じことをしたいと思います。. 彼に答えた唯一の人は、質問を理解していないようでした。
コードでやりたいことは次のとおりです。
一部のライブラリ DLL/TLB
ISomeInterface.idl
interface ISomeInterface : IDispatch { ... };
SomeLibrary.idl
import "ISomeInterface.idl";
library SomeLibrary
{
interface ISomeInterface;
};
SomeOtherLibrary DLL/TLB
ISomeOtherInterface.idl
// What do I put here so that the MIDL compiler knows
// what to do when it encounters the ISomeInterface type?
interface ISomeOtherInterface : ISomeInterface { ... };
SomeOtherLibrary.idl
import "ISomeOtherInterface.idl";
library SomeOtherLibrary
{
interface ISomeOtherInterface;
};
MIDLimport
ディレクティブは、IDL ファイルのインポート時にのみ機能し、DLL と TLB しかありません。定義importlib
内でしか機能しないため、使用できません。MIDL コンパイラは、Microsoft の C++ 、、および属性をlibrary
認識しません。import
importidl
importlib
何をすべきか?