Using Macro Definitions

Many of the header files for the DirectX interfaces include macro definitions for each method. These macros are included to simplify the use of the methods in your programming.

The following example uses the IDirectDraw2_CreateSurface macro to call the IDirectDraw2::CreateSurface method. The first parameter is a reference to the DirectDraw object that has been created and invokes the method:


ret = IDirectDraw2_CreateSurface (lpDD, &ddsd, &lpDDS, 
    NULL); 
 

To obtain a current list of the methods supported by macro definitions, see the appropriate header file for the DirectX component you want to use.