¶Conflict between VS2010 beta 2 and old DirectX SDKs
I've just started evaluating Visual Studio 2010 beta 2, and pretty quickly ran into this problem:
------ Build started: Project: system, Configuration: Debug Win32 ------
Error.cpp
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objidl.h(11280): error C2061: syntax error : identifier '__RPC__out_xcount_part'
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objidl.h(11281): error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objidl.h(11281): fatal error C1903: unable to recover from previous error(s); stopping compilation
Turning on /showIncludes reveals the cause. It turns out that this is caused by a conflict between older versions of the DirectX SDK and the Windows 7 SDK that ships with VS2010 beta 2. Unfortunately, Microsoft put rpcsal.h into both SDKs, which causes disaster:
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\vfw.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\mmsystem.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\pshpack1.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\poppack.h
Note: including file: c:\program files (x86)\microsoft sdks\windows\v7.0a\include\pshpack8.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\mmreg.h
Note: including file: c:\program files (x86)\microsoft sdks\windows\v7.0a\include\pshpack1.h
Note: including file: c:\program files (x86)\microsoft sdks\windows\v7.0a\include\poppack.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\ole2.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\pshpack8.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objbase.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\rpc.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\rpcdce.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\rpcdcep.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\rpcnsi.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\rpcnterr.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\rpcasync.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\rpcndr.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\pshpack8.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\rpcnsip.h
Note: including file: I:\dx9sdk2\include\rpcsal.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\poppack.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\pshpack8.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\wtypes.h
Note: including file: c:\program files (x86)\microsoft sdks\windows\v7.0a\include\guiddef.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\unknwn.h
Note: including file: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\objidl.h
Switching to a newer version of the DirectX SDK fixes the problem.