Structs and ATL/COM attributed projects 
Author Message
 Structs and ATL/COM attributed projects

Hi,

I'm using an ATL/COM attributed project to implement an
interface which requires predefined windows sdk structs as
well as UDTs to be passed in / out of various methods, and
I am having difficulty in getting this to work properly. I
have followed the instructions in the following link:  

http://www.*-*-*.com/

However, since the .idl file is automatically generated
from the header files, any changes I make to the .idl file
get clobbered when I compile. No matter what, I always get
the error:

MIDL2011: unresolved type declaration (referring to the
struct pointers I am passing in to the interface methods).

This happens regardless of whether the type is a windows
struct or a user defined type.

The only thing that seems to work is adding the struct as
a simple ATL object with no methods in the interface and
only data members in the class, but this doesn't seem
right. Any help would be greatly appreciated.

Thanks,

Stephan Wardell



Sat, 26 Feb 2005 03:31:26 GMT  
 Structs and ATL/COM attributed projects
See [export] attribute.
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> Hi,

> I'm using an ATL/COM attributed project to implement an
> interface which requires predefined windows sdk structs as
> well as UDTs to be passed in / out of various methods, and
> I am having difficulty in getting this to work properly. I
> have followed the instructions in the following link:

> http://www.mvps.org/vcfaq/com/4.htm

> However, since the .idl file is automatically generated
> from the header files, any changes I make to the .idl file
> get clobbered when I compile. No matter what, I always get
> the error:

> MIDL2011: unresolved type declaration (referring to the
> struct pointers I am passing in to the interface methods).

> This happens regardless of whether the type is a windows
> struct or a user defined type.

> The only thing that seems to work is adding the struct as
> a simple ATL object with no methods in the interface and
> only data members in the class, but this doesn't seem
> right. Any help would be greatly appreciated.

> Thanks,

> Stephan Wardell



Sat, 26 Feb 2005 03:41:15 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ATL COM - Passing ATL COM classes through another ATL COM class in the same app

2. How to get the type-library GUID in an attributed ATL project

3. Problem with generated IDL using ATL attributed project

4. "attributed" ATL project with VS.NET

5. Attributed ATL project and MSXML2.idl

6. Rich-Error info lost on Attributed ATL project in remote debug config (again)

7. Rich-Error info lost on Attributed ATL project in remote configuration

8. Attributed ATL Project question.

9. problems building attributed ATL project

10. Error MIDL2003 in ATL attributed project

11. Problems with IErrorInfo in VC.NET attributed ATL project

12. Error in ATL attributed project

 

 
Powered by phpBB® Forum Software