importing an IDL file to another one 
Author Message
 importing an IDL file to another one

Dear folks,

I have a large ATL project. I have plenty of interfaces
and user defined types. I've defined all my types and
enums in a seperate IDL file and imported it to my
projects main IDL file in the first line of it.As I
compile my IDL and make a type library and import it to a
client application using #import directive, the user
defined types are not exist in the client application and
as soon as i used one of them i get a udeclared identifier
error by the compiler. The very intersting point is that
when i copile it on my friends machine it works properly.

Does anyone know whats goin on here?
I would be very glad if u can give me a clue.

TIA,
M. Shokuie Nia.



Mon, 28 Feb 2005 21:29:58 GMT  
 importing an IDL file to another one
To be compiled into a TLB, a type must be mentioned in a library block.
This happens automatically if the type is actually used, say in a method
parameter of the interface that is itself in the TLB. If you want unused
types in the TLB, just mention them in the library block with forward
declaration syntax, as in

library
{
    struct MyUDT;

Quote:
}

Inspect the type library with Ole/COM Object Viewer. Are your types
there?
--
With best wishes,
    Igor Tandetnik

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



Quote:
> Dear folks,

> I have a large ATL project. I have plenty of interfaces
> and user defined types. I've defined all my types and
> enums in a seperate IDL file and imported it to my
> projects main IDL file in the first line of it.As I
> compile my IDL and make a type library and import it to a
> client application using #import directive, the user
> defined types are not exist in the client application and
> as soon as i used one of them i get a udeclared identifier
> error by the compiler. The very intersting point is that
> when i copile it on my friends machine it works properly.

> Does anyone know whats goin on here?
> I would be very glad if u can give me a clue.

> TIA,
> M. Shokuie Nia.



Mon, 28 Feb 2005 23:17:24 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. importing mshtml.idl in IDL file

2. IDL question - import "msxml2.idl";

3. import idl file

4. Importing third party interfaces that have the same name into an IDL file

5. import idl file causing link error in dlldata.c

6. Importing IDL Files.

7. import idl file

8. Importing IDL file

9. typedef enum in imported idl files

10. Including an IDL file in an IDL file

11. idl import problem

12. Import interface in IDL

 

 
Powered by phpBB® Forum Software