Pregunta

Tengo un archivo IDL que define algunas interfaces seguidas de una coclass. ¿Puedo hacer que esta clase importe interfaces que no están definidas en esta clase?

¿Fue útil?

Solución

Sí Debe usar la directiva import para cargar el .idl para las interfaces externas, o usar importlib para cargar la biblioteca de tipos. Algo como esto:

import "otherlibrary.idl";

library MyLibrary
{
  coclass MyClass
  {
    interface OtherInterface;
  };
};

O esto:

library MyLibrary
{
  importlib "otherlibrary.tlb";

  coclass MyClass
  {
    interface OtherInterface;
  };
};
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top