Re: How to import an source interface ? [message #17562 is a reply to message #17553] |
Thu, 28 October 1999 00:00   |
Wessel Troost
Messages: 1 Registered: October 1999
|
Junior Member |
|
|
Two things to remedy this: use include instead
of import; or put (a reference to)
your interface inside a library block.
"Michael Pokerschnig" <michael_pokerschnig@sbu1.storkgroup.com> wrote:
> Hi,
>
> I want to import an source interface wich I put in a separate .idl file to
> save retyping it all the time i need it.
> The MIDL compiles without any error, but if I look at the generated header
> file I cannot find the imported interface !
>
> why ?
> is there something wrong defined ?
>
> kind regards
> Mike.
>
>
> This is the interface which i put in the file CP.idl as it is my connection
> point:
> ------------------------------------------------------------ --
> [
> object,
> uuid(B6151303-82FA-11d3-8209-00508B03223A),
> ]
> interface ITest : IUnknown
> {
> [helpstring("method GetWidthMM")] HRESULT GetWidthMM([out] double*
> u_pdbWidth);
> };
> ------------------------------------------------------------ -
>
> the I try to import it in my .idl file of the COM object:
>
> ------------------------------------------------------------ -
> import "oaidl.idl";
> import "ocidl.idl";
>
> [
> object,
> uuid(B6151300-82FA-11d3-8209-00508B03223A),
> ]
> interface IFlop : IUnknown
> {
> [id(1), helpstring("method DoUI")] HRESULT DoUI();
> }
>
> [
> uuid(2B6BF8B6-8537-11D3-8209-00508B03223A),
> version(1.0),
> helpstring("Flop 1.0 Type Library")
> ]
> library FLOPLib
> {
> importlib("stdole32.tlb");
> importlib("stdole2.tlb");
>
> import "CP.idl"; // I import it exactly where it was when I first
> created this interface with the wizzard !
>
> [
> uuid(2B6BF8C4-8537-11D3-8209-00508B03223A),
> helpstring("FlopModul Class")
> ]
> coclass FlopModul
> {
> [default] interface IFlop;
> [default, source] interface ITest; // here i use the interface
> imported from CP.idl
> };
> };
> ------------------------------------------------------------ -
|
|
|