I have a Dll Project with IDL interfaces. I Want to have to interfaces in my dll that one of them can be derived from other. I created two interfaces with ATL Simple Object Wizard.
[
object,
uuid(7359AF6C-6E90-4372-991F-556602CB3977),
dual,
nonextensible,
pointer_default(unique)
]
interface IZInterface : IDispatch{
[id(1)] HRESULT ZGetStr([out,retval] BSTR* str);
[id(2)] HRESULT GetSize([in,out] LONG* nSize);
};
[
object,
uuid(8CA6DBF2-E402-464D-96AE-3D6642D91E14),
pointer_default(unique)
]
interface IBClass : IUnknown{
[] HRESULT Method11([out,retval] LONG* l);
};
library DllStandardLib
{
importlib("stdole2.tlb");
[
uuid(491DF659-012F-4C20-90AA-0CBC5BDE5A68)
]
coclass ZInterface
{
[default] interface IZInterface;
};
[
uuid(43CE897F-17F2-4D45-9098-26B7AEE6EC23)
]
coclass BClass
{
[default] interface IBClass;
};
};
now, i right click on CZInterface in Class View then Impelement Interface IBClass .
but in continer that is a C# project:
DllStandardLib.ZInterface dd = new DllStandardLib.ZInterface();
dd.Method11();//---> Error: DllStandardLib.ZInterface' does not contain a definition for 'Method11' and no extension method 'Method11' accepting a first argument of type ...
what is the problem in my project? I want the second (derived) interface knows all methods and properties of base interface. please help me!