Microsoft DirectX 8.0 (C++) |
For backward compatibility with earlier versions of Microsoft® DirectX®, some DirectX components include variable API element definitions in their header files. Affected elements are typically capability structures or flag sets that are version-specific. Parts of some header files are surrounded by preprocessor conditionals that cause the preprocessor to filter out unneeded definitions. The value of the defined constant identifies a specific version of the component. If no value is defined, the headers set a value that identifies the DirectX version for which the header file was written. An example from the Microsoft Direct3D® header file, D3D8.h, is shown here.
#ifndef DIRECT3D_VERSION #define DIRECT3D_VERSION 0x0800 #endif //DIRECT3D_VERSION
You can define other values for these constants to use newer versions of the header files with older versions of the components. For example, to use the latest headers to compile against the DirectX 7.0 version of D3D, define DIRECT3D_VERSION to be 0x0700.