CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2001
    Location
    Russia
    Posts
    7

    Forward declaration in MIDL

    Is there a possibility to make forward declaration of an interface in MIDL?


  2. #2
    Join Date
    May 2000
    Location
    Toronto, ON, Canada
    Posts
    3,573

    Re: Forward declaration in MIDL

    Hi,

    Sure. See this sampleinterface IInterface2;
    //
    [
    object,
    uuid(...),
    helpstring("IInterface Interface"),
    pointer_default(unique)
    ]
    interface IInterface : IUnknown
    {
    [propget, helpstring("property Prop")] HRESULT Prop([out, retval] IInterface2 * *pVal);
    }
    //
    [
    object,
    uuid(...),
    helpstring("IInterface2 Interface"),
    pointer_default(unique)
    ]
    interface IInterface2 : IUnknown
    {
    //...
    }



    Regards,

    Emi.
    Regards,

    Emanuel Vaduva

  3. #3
    Join Date
    Feb 2001
    Location
    Russia
    Posts
    7

    Ok, Midl says...

    ...
    error MIDL2337 : unsatisfied forward declaration : IUsers [ Parameter 'pVal' of Procedure 'get_Users' ( Interface 'IDaemon' ) ]

    Thank you,
    Anatoly.

  4. #4
    Join Date
    May 2000
    Location
    Toronto, ON, Canada
    Posts
    3,573

    Re: Ok, Midl says...

    Strange... I've used and it work. Could you please show some code?

    Regards,

    Emi.
    Regards,

    Emanuel Vaduva

  5. #5
    Join Date
    Feb 2001
    Location
    Russia
    Posts
    7

    I am sorry, it works. Thank you!

    It works.

    Thank you,
    Anatoly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured