comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to import an source interface ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to import an source interface ? [message #17556 is a reply to message #17553] Fri, 29 October 1999 00:00 Go to previous messageGo to previous message
Vladimir Hristov is currently offline  Vladimir Hristov
Messages: 1
Registered: October 1999
Junior Member
When you use import directive to import one IDL file into another, MIDL just
puts signle #include statement in the generated header file. That's why you
can't see the imported interface. Let's suppose you have files A.IDL and
B.IDL and you want to import file B in A. Then the situation will look like
this:

// A.IDL starts here
...
import "B.IDL";
...


// Geenrated A.H starts here
...
#include "B.H";
...

So, there is no problem to use interfaces from B.IDL.
I'm not sure about importing the file in library section, but if you have
problems you can try to move the import "CP.IDL" at the begining of the
file.

Regards,
Vlado



Michael Pokerschnig <michael_pokerschnig@sbu1.storkgroup.com> wrote in
message news:7v9vm5$bnv$1@fleetstreet.Austria.EU.net...
> 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
> };
> };
> ------------------------------------------------------------ -
>
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: cylindrical mapping
Next Topic: Object graphics axis

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 18 15:51:35 PDT 2025

Total time taken to generate the page: 0.72589 seconds