1 #include <windows.h> 2 #include <stdio.h> 3 #include <ddraw.h> 4 #include <ddrawi.h> 5 #include <d3dhal.h> 6 #include <ddrawgdi.h> 7 8 #if defined(_WIN32) && !defined(_NO_COM ) 9 #define COM_NO_WINDOWS_H 10 #include <objbase.h> 11 #else 12 #define IUnknown void 13 #if !defined(NT_BUILD_ENVIRONMENT) && !defined(WINNT) 14 #define CO_E_NOTINITIALIZED 0x800401F0 15 #endif 16 #endif 17 18 HRESULT WINAPI 19 Main_DirectDraw_QueryInterface ( 20 LPDIRECTDRAW4 iface, 21 REFIID id, 22 LPVOID *obj); 23 24 ULONG WINAPI 25 Main_DirectDraw_AddRef (LPDIRECTDRAW4 iface); 26 27 ULONG WINAPI 28 Main_DirectDraw_Release (LPDIRECTDRAW4 iface); 29 30 HRESULT WINAPI 31 Main_DirectDraw_Compact(LPDIRECTDRAW4 iface); 32 33 HRESULT WINAPI 34 Main_DirectDraw_CreateClipper( 35 LPDIRECTDRAW4 iface, 36 DWORD dwFlags, 37 LPDIRECTDRAWCLIPPER *ppClipper, 38 IUnknown *pUnkOuter); 39 40 HRESULT WINAPI 41 Main_DirectDraw_CreatePalette( 42 LPDIRECTDRAW4 iface, 43 DWORD dwFlags, 44 LPPALETTEENTRY palent, 45 LPDIRECTDRAWPALETTE* ppPalette, 46 LPUNKNOWN pUnkOuter); 47 48 HRESULT WINAPI 49 Main_DirectDraw_CreateSurface4( 50 LPDIRECTDRAW4 iface, 51 LPDDSURFACEDESC2 pDDSD, 52 LPDIRECTDRAWSURFACE4 *ppSurf, 53 IUnknown *pUnkOuter); 54 55 HRESULT WINAPI 56 Main_DirectDraw_DuplicateSurface( 57 LPDIRECTDRAW4 iface, 58 LPDIRECTDRAWSURFACE4 src, 59 LPDIRECTDRAWSURFACE4* dst); 60 61 HRESULT WINAPI 62 Main_DirectDraw_EnumDisplayModes4( 63 LPDIRECTDRAW4 iface, 64 DWORD dwFlags, 65 LPDDSURFACEDESC2 pDDSD, 66 LPVOID pContext, 67 LPDDENUMMODESCALLBACK2 pCallback); 68 69 HRESULT WINAPI 70 Main_DirectDraw_EnumSurfaces4( 71 LPDIRECTDRAW4 iface, 72 DWORD dwFlags, 73 LPDDSURFACEDESC2 lpDDSD2, 74 LPVOID context, 75 LPDDENUMSURFACESCALLBACK2 callback); 76 77 HRESULT WINAPI 78 Main_DirectDraw_FlipToGDISurface(LPDIRECTDRAW4 iface); 79 80 HRESULT WINAPI 81 Main_DirectDraw_GetCaps( 82 LPDIRECTDRAW4 iface, 83 LPDDCAPS pDriverCaps, 84 LPDDCAPS pHELCaps); 85 86 HRESULT WINAPI 87 Main_DirectDraw_GetDisplayMode4 ( 88 LPDIRECTDRAW4 iface, 89 LPDDSURFACEDESC2 pDDSD); 90 91 HRESULT WINAPI 92 Main_DirectDraw_GetFourCCCodes( 93 LPDIRECTDRAW4 iface, 94 LPDWORD lpNumCodes, 95 LPDWORD lpCodes); 96 97 HRESULT WINAPI 98 Main_DirectDraw_GetGDISurface( 99 LPDIRECTDRAW4 iface, 100 LPDIRECTDRAWSURFACE4 *lplpGDIDDSSurface); 101 102 HRESULT WINAPI 103 Main_DirectDraw_GetMonitorFrequency ( 104 LPDIRECTDRAW4 iface, 105 LPDWORD lpFreq); 106 107 108 HRESULT WINAPI 109 Main_DirectDraw_GetScanLine(LPDIRECTDRAW4 iface, 110 LPDWORD lpdwScanLine); 111 112 HRESULT WINAPI 113 Main_DirectDraw_GetVerticalBlankStatus( 114 LPDIRECTDRAW4 iface, 115 LPBOOL lpbIsInVB); 116 117 HRESULT WINAPI 118 Main_DirectDraw_Initialize ( 119 LPDIRECTDRAW4 iface, 120 LPGUID lpGUID); 121 122 123 HRESULT WINAPI 124 Main_DirectDraw_RestoreDisplayMode (LPDIRECTDRAW4 iface); 125 126 HRESULT WINAPI 127 Main_DirectDraw_SetCooperativeLevel ( 128 LPDIRECTDRAW4 iface, 129 HWND hwnd, 130 DWORD cooplevel); 131 132 HRESULT WINAPI 133 Main_DirectDraw_SetDisplayMode2( 134 LPDIRECTDRAW4 iface, 135 DWORD dwWidth, 136 DWORD dwHeight, 137 DWORD dwBPP, 138 DWORD dwRefreshRate, 139 DWORD dwFlags); 140 141 HRESULT WINAPI 142 Main_DirectDraw_WaitForVerticalBlank( 143 LPDIRECTDRAW4 iface, 144 DWORD dwFlags, 145 HANDLE h); 146 147 148 HRESULT WINAPI 149 Main_DirectDraw_GetAvailableVidMem4( 150 LPDIRECTDRAW4 iface, 151 LPDDSCAPS2 ddscaps, 152 LPDWORD dwTotal, 153 LPDWORD dwFree); 154 155 HRESULT WINAPI 156 Main_DirectDraw_GetSurfaceFromDC( 157 LPDIRECTDRAW4 iface, 158 HDC hdc, 159 LPDIRECTDRAWSURFACE4 *lpDDS); 160 161 HRESULT WINAPI 162 Main_DirectDraw_RestoreAllSurfaces(LPDIRECTDRAW4 iface); 163 164 HRESULT WINAPI 165 Main_DirectDraw_TestCooperativeLevel(LPDIRECTDRAW4 iface); 166 167 HRESULT WINAPI 168 Main_DirectDraw_GetDeviceIdentifier( 169 LPDIRECTDRAW4 iface, 170 LPDDDEVICEIDENTIFIER pDDDI, 171 DWORD dwFlags); 172 173 174 175 IDirectDraw4Vtbl DirectDraw4_Vtable = 176 { 177 Main_DirectDraw_QueryInterface, 178 Main_DirectDraw_AddRef, 179 Main_DirectDraw_Release, 180 Main_DirectDraw_Compact, 181 Main_DirectDraw_CreateClipper, 182 Main_DirectDraw_CreatePalette, 183 Main_DirectDraw_CreateSurface4, 184 Main_DirectDraw_DuplicateSurface, 185 Main_DirectDraw_EnumDisplayModes4, 186 Main_DirectDraw_EnumSurfaces4, 187 Main_DirectDraw_FlipToGDISurface, 188 Main_DirectDraw_GetCaps, 189 Main_DirectDraw_GetDisplayMode4, 190 Main_DirectDraw_GetFourCCCodes, 191 Main_DirectDraw_GetGDISurface, 192 Main_DirectDraw_GetMonitorFrequency, 193 Main_DirectDraw_GetScanLine, 194 Main_DirectDraw_GetVerticalBlankStatus, 195 Main_DirectDraw_Initialize, 196 Main_DirectDraw_RestoreDisplayMode, 197 Main_DirectDraw_SetCooperativeLevel, 198 Main_DirectDraw_SetDisplayMode2, 199 Main_DirectDraw_WaitForVerticalBlank, 200 Main_DirectDraw_GetAvailableVidMem4, 201 Main_DirectDraw_GetSurfaceFromDC, 202 Main_DirectDraw_RestoreAllSurfaces, 203 Main_DirectDraw_TestCooperativeLevel, 204 Main_DirectDraw_GetDeviceIdentifier 205 }; 206