User defined Type in ATL 
Author Message
 User defined Type in ATL

Hello,

  I'm trying to add a public UDT to the IDL in VS2003. There were no problem
in VS6 because
we could modify the idl file directly without any problem, it was part of
the project. In VS2003, the IDL file is regenerated at every compilation,
and we can't really add the typedef struct in it.
We already tried to create another IDL file in the project and disable the
autogeneration of it, but it doesn't "compile" the tlb information into the
DLL which is quite annoying.

Is there a simple way to avoid this regeneration and include the UDT in ?
Or can we declare the struct in the cpp code so that it is automatically
compiled into the IDL by VS2003?

Thanks in advance.

Sylvain Dupont
www.truevision3d.com



Fri, 25 Nov 2005 03:10:16 GMT  
 User defined Type in ATL

Quote:
> Hello,

Hi.

Quote:
>   I'm trying to add a public UDT to the IDL in VS2003. There were no
problem
> in VS6 because
> we could modify the idl file directly without any problem, it was part of
> the project. In VS2003, the IDL file is regenerated at every compilation,
> and we can't really add the typedef struct in it.

Try to add simple struct. Without typedef.
[c++]
[uuid("C5E19FEC-1E23-44C1-9BCA-8060FE18B3AF"),export]
struct _UDT
{
 long l;
Quote:
};

[/c++]

Quote:
> We already tried to create another IDL file in the project and disable the
> autogeneration of it, but it doesn't "compile" the tlb information into
the
> DLL which is quite annoying.

Strange. Do you use import directive?

Quote:
> Is there a simple way to avoid this regeneration and include the UDT in ?
> Or can we declare the struct in the cpp code so that it is automatically
> compiled into the IDL by VS2003?

Example above.

--
Sorry for bad English.



Fri, 25 Nov 2005 11:45:34 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Convert C++ (return type int, long, user-define, etc) function into COM/ATL

2. Passing User defined data Type in ATL

3. Interface returns user defined type???

4. Use of enums for user defined types

5. User Defined Data Types and Pointers

6. HELP! user-defined data types

7. User defined types

8. Returning user defined data types

9. An array of user defined types

10. User Defined Types in Safearrays

11. Passing user defined type var between VB and VC

12. How to pass UDTs(User Defined Type Array)

 

 
Powered by phpBB® Forum Software