views:

213

answers:

1

I create a header file from an IDL . The IDL file has been compiled in Visual C++ 2005 . The generated header file contains #define REQUIRED_RPCNDR_H_VERSION 475 .

I tried to use this header file in Visual Studio 2003 , where rpcndr.h contains

{

#define RPCNDR_H_VERSION ( 450 ) // and

#if ( RPCNDR_H_VERSION < REQUIRED_RPCNDR_H_VERSION )

    #error incorrect <rpcndr.h> version. Use the header that matches with the MIDL compiler.
#endif

}

Since 450<475 , i get a compile time error . Is there any way i can use the header file in Visual Studio 2003 . Do i need to make changes in the compiltaion setting of idl file .

PS : I have to compile the idl file in Visual C++ 2005 only . ( I do not have a choice to compile it in VS 2003 ) .

+1  A: 

If your 2003 and 2005 configurations are using the same version of the Windows SDK, you might be out of luck (and/or just need to hack it and hope it works). Usually, though, you can make them compatible if they are using the same version of the SDK utilities and headers.

I don't have any info specific to this issue, but I have had similar problems in the past which I have resolved by pointing both versions of VS to the same later SDK version.

Nick