RE: Forward Declaration using IDL Attributes
juan_at_agleader.com
Date: 02/10/05
- Next message: Alexander Nickolov: "Re: CComPtr, CComQIPtr and CComPtrBase"
- Previous message: ad: "CComPtr, CComQIPtr and CComPtrBase"
- In reply to: juan_at_agleader.com: "Forward Declaration using IDL Attributes"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 10 Feb 2005 09:59:03 -0800
I actually figured out my own question. If you add "[export]" in from the
interface forward declaration, the idl compiler will work;
[export] __interface IObjectAColl;
Thanks anyway,
Juan Foegen
"juan@agleader.com" wrote:
> I have created an ATL COM component using IDL Attributes. The component has
> worked fine, but now I have a new requirement where objectA can contain a
> collection of objectAs. This causes a circular dependency which I satisfied
> in the compiler by using forward declarations for the object collection and
> its interface
>
> __interface IObjectAColl;
> class ObjectAColl;
>
> __interface IObjectA
> {
> [propget, id(24), HRESULT ObjectAColl([out, retval] IObjectAColl** pVal);
> }
>
> The C++ compile and link work fine, but the MIDL compiler gives me the
> following error:
>
> error MIDL2025 : syntax error : expecting a type specification near
> "IObjectAColl"
>
> I tried adding a forward declaration for the Midl compiler, but I must not
> be doing it correctly
>
> #ifdef __midl
> interface IObjectAColl;
> #endif
>
> Does anybody have any insight on my error or how I can do a forward
> declaration here to satisfy MIDL?
>
> Thanks,
> Juan Foegen
- Next message: Alexander Nickolov: "Re: CComPtr, CComQIPtr and CComPtrBase"
- Previous message: ad: "CComPtr, CComQIPtr and CComPtrBase"
- In reply to: juan_at_agleader.com: "Forward Declaration using IDL Attributes"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|