I have two interfaces defined in C # as shown below:
[Guid("4938540B-3DB2-452c-A061-59EC499657E7")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IRADevice
{
Void FA();
}
[Guid("4938540B-3DB2-452c-A061-59EC499657E8")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface IRADevice2 : IRADevice
{
void FB();
}
In C ++ code, I import the tlb created by the above interface using the following command
#import "device.tlb" raw_interfaces_only
The generated tlh file looks like this:
struct __declspec(uuid("4938540b-3db2-452c-a061-59ec499657e7"))
IRADevice : IDispatch
{
virtual HRESULT __stdcall FA ( ) = 0;
};
struct __declspec(uuid("4938540b-3db2-452c-a061-59ec499657e8"))
IRADevice2 : IDispatch
{
virtual HRESULT __stdcall FB ( ) = 0;
};
I expect that IRADevice comes from IRADevice, not from IDispatch, and includes the FA function. Can someone tell me where I was wrong?
source
share