I have an IDL file that defines a few interfaces followed by a coclass. Can I make this class import interfaces that are not defined in this class?
+3
A:
Yes. You need to use the import
directive to load the .idl for the external interfaces, or use importlib
to load the type library. Something like this:
import "otherlibrary.idl";
library MyLibrary
{
coclass MyClass
{
interface OtherInterface;
};
};
Or this:
library MyLibrary
{
importlib "otherlibrary.tlb";
coclass MyClass
{
interface OtherInterface;
};
};
1800 INFORMATION
2009-08-05 20:18:40
The importlib is exactly what I needed. Thanks!
Zenox
2009-08-06 13:08:10