ATL Error C2011 struct type redefinition

  • Hello,


    I've a ATL Project and try to generate a Interop Solution to use c++ Code in c#.


    Solong i create an .idl Class which generate a header and codefile. In the PrinterKernel.idl i have to use an include of ljtypes.h which contains a lot of definitions (typedef enum, typedef struct).
    This file is also included in other files.


    I Also create an simple ATL Object with the wizard LJRip.


    Here I get 8 compile errors:


    PrinterKernel.cpp
    1>e:\projektevisualstudio2013\e62_tunk\fep\ljetfuture\printerkernel\PrinterKernel.h(93): error C2371: 'va_list' : redefinition; different basic types
    1> C:\Program Files (x86)\Windows CE Tools\SDKs\SDK ATL\sdk\crt\Include\vadefs.h(57) : see declaration of 'va_list'
    1>e:\projektevisualstudio2013\e62_tunk\fep\ljetfuture\printerkernel\PrinterKernel.h(141): error C2011: 'localeinfo_struct' : 'struct' type redefinition
    1> C:\Program Files (x86)\Windows CE Tools\SDKs\SDK ATL\sdk\crt\Include\crtdefs.h(2008) : see declaration of 'localeinfo_struct'
    1>e:\projektevisualstudio2013\e62_tunk\fep\ljetfuture\printerkernel\PrinterKernel.h(149): error C2011: 'localerefcount' : 'struct' type redefinition
    1> C:\Program Files (x86)\Windows CE Tools\SDKs\SDK ATL\sdk\crt\Include\crtdefs.h(2014) : see declaration of 'localerefcount'
    1>e:\projektevisualstudio2013\e62_tunk\fep\ljetfuture\printerkernel\PrinterKernel.h(157): error C2011: 'threadlocaleinfostruct' : 'struct' type redefinition
    1> C:\Program Files (x86)\Windows CE Tools\SDKs\SDK ATL\sdk\crt\Include\crtdefs.h(2021) : see declaration of 'threadlocaleinfostruct'
    1> niosthread.cpp
    1> LJRip.cpp
    1>e:\projektevisualstudio2013\e62_tunk\fep\ljetfuture\printerkernel\PrinterKernel.h(93): error C2371: 'va_list' : redefinition; different basic types
    1> C:\Program Files (x86)\Windows CE Tools\SDKs\SDK ATL\sdk\crt\Include\vadefs.h(57) : see declaration of 'va_list'
    1>e:\projektevisualstudio2013\e62_tunk\fep\ljetfuture\printerkernel\PrinterKernel.h(141): error C2011: 'localeinfo_struct' : 'struct' type redefinition
    1> C:\Program Files (x86)\Windows CE Tools\SDKs\SDK ATL\sdk\crt\Include\crtdefs.h(2008) : see declaration of 'localeinfo_struct'
    1>e:\projektevisualstudio2013\e62_tunk\fep\ljetfuture\printerkernel\PrinterKernel.h(149): error C2011: 'localerefcount' : 'struct' type redefinition
    1> C:\Program Files (x86)\Windows CE Tools\SDKs\SDK ATL\sdk\crt\Include\crtdefs.h(2014) : see declaration of 'localerefcount'
    1>e:\projektevisualstudio2013\e62_tunk\fep\ljetfuture\printerkernel\PrinterKernel.h(157): error C2011: 'threadlocaleinfostruct' : 'struct' type redefinition
    1> C:\Program Files (x86)\Windows CE Tools\SDKs\SDK ATL\sdk\crt\Include\crtdefs.h(2021) : see declaration of 'threadlocaleinfostruct'



    PrinterKernel.idl:


    commemo.h:


    LJRip.h:


    But all headers are "locked" with an #ifndef LJTYPES_H #define LJTYPES_H.


    I hope, i give enough informations
    Can anybody give me some help?