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 ULONG WINAPI Main_DDrawSurface_AddRef(LPDIRECTDRAWSURFACE7); 19 ULONG WINAPI Main_DDrawSurface_Release4(LPDIRECTDRAWSURFACE7); 20 HRESULT WINAPI Main_DDrawSurface_QueryInterface(LPDIRECTDRAWSURFACE7, REFIID, LPVOID*); 21 HRESULT WINAPI Main_DDrawSurface_ReleaseDC(LPDIRECTDRAWSURFACE7, HDC); 22 HRESULT WINAPI Main_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7, LPRECT, LPDIRECTDRAWSURFACE7, LPRECT, DWORD, LPDDBLTFX); 23 HRESULT WINAPI Main_DDrawSurface_BltBatch(LPDIRECTDRAWSURFACE7, LPDDBLTBATCH, DWORD, DWORD); 24 HRESULT WINAPI Main_DDrawSurface_BltFast(LPDIRECTDRAWSURFACE7, DWORD, DWORD, LPDIRECTDRAWSURFACE7, LPRECT, DWORD); 25 HRESULT WINAPI Main_DDrawSurface_DeleteAttachedSurface(LPDIRECTDRAWSURFACE7, DWORD, LPDIRECTDRAWSURFACE7); 26 HRESULT WINAPI Main_DDrawSurface_EnumAttachedSurfaces(LPDIRECTDRAWSURFACE7, LPVOID, LPDDENUMSURFACESCALLBACK7); 27 HRESULT WINAPI Main_DDrawSurface_EnumOverlayZOrders(LPDIRECTDRAWSURFACE7, DWORD, LPVOID,LPDDENUMSURFACESCALLBACK7); 28 HRESULT WINAPI Main_DDrawSurface_Flip(LPDIRECTDRAWSURFACE7 , LPDIRECTDRAWSURFACE7, DWORD); 29 HRESULT WINAPI Main_DDrawSurface_FreePrivateData(LPDIRECTDRAWSURFACE7, REFGUID); 30 HRESULT WINAPI Main_DDrawSurface_GetAttachedSurface(LPDIRECTDRAWSURFACE7, LPDDSCAPS2, LPDIRECTDRAWSURFACE7*); 31 HRESULT WINAPI Main_DDrawSurface_GetBltStatus(LPDIRECTDRAWSURFACE7, DWORD dwFlags); 32 HRESULT WINAPI Main_DDrawSurface_GetCaps(LPDIRECTDRAWSURFACE7, LPDDSCAPS2 pCaps); 33 HRESULT WINAPI Main_DDrawSurface_GetClipper(LPDIRECTDRAWSURFACE7, LPDIRECTDRAWCLIPPER*); 34 HRESULT WINAPI Main_DDrawSurface_GetColorKey(LPDIRECTDRAWSURFACE7, DWORD, LPDDCOLORKEY); 35 HRESULT WINAPI Main_DDrawSurface_GetDC(LPDIRECTDRAWSURFACE7, HDC *); 36 HRESULT WINAPI Main_DDrawSurface_GetDDInterface(LPDIRECTDRAWSURFACE7, LPVOID*); 37 HRESULT WINAPI Main_DDrawSurface_GetFlipStatus(LPDIRECTDRAWSURFACE7, DWORD); 38 HRESULT WINAPI Main_DDrawSurface_GetLOD(LPDIRECTDRAWSURFACE7, LPDWORD); 39 HRESULT WINAPI Main_DDrawSurface_GetOverlayPosition(LPDIRECTDRAWSURFACE7, LPLONG, LPLONG); 40 HRESULT WINAPI Main_DDrawSurface_GetPalette(LPDIRECTDRAWSURFACE7, LPDIRECTDRAWPALETTE*); 41 HRESULT WINAPI Main_DDrawSurface_GetPixelFormat(LPDIRECTDRAWSURFACE7, LPDDPIXELFORMAT); 42 HRESULT WINAPI Main_DDrawSurface_GetPriority(LPDIRECTDRAWSURFACE7, LPDWORD); 43 HRESULT WINAPI Main_DDrawSurface_GetPrivateData(LPDIRECTDRAWSURFACE7, REFGUID, LPVOID, LPDWORD); 44 HRESULT WINAPI Main_DDrawSurface_GetSurfaceDesc(LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2); 45 HRESULT WINAPI Main_DDrawSurface_GetUniquenessValue(LPDIRECTDRAWSURFACE7, LPDWORD); 46 HRESULT WINAPI Main_DDrawSurface_IsLost(LPDIRECTDRAWSURFACE7); 47 HRESULT WINAPI Main_DDrawSurface_PageLock(LPDIRECTDRAWSURFACE7, DWORD); 48 HRESULT WINAPI Main_DDrawSurface_PageUnlock(LPDIRECTDRAWSURFACE7, DWORD); 49 HRESULT WINAPI Main_DDrawSurface_ReleaseDC(LPDIRECTDRAWSURFACE7, HDC); 50 HRESULT WINAPI Main_DDrawSurface_SetClipper (LPDIRECTDRAWSURFACE7, LPDIRECTDRAWCLIPPER); 51 HRESULT WINAPI Main_DDrawSurface_SetColorKey (LPDIRECTDRAWSURFACE7, DWORD, LPDDCOLORKEY); 52 HRESULT WINAPI Main_DDrawSurface_SetOverlayPosition (LPDIRECTDRAWSURFACE7, LONG, LONG); 53 HRESULT WINAPI Main_DDrawSurface_SetPalette (LPDIRECTDRAWSURFACE7, LPDIRECTDRAWPALETTE); 54 HRESULT WINAPI Main_DDrawSurface_SetPriority (LPDIRECTDRAWSURFACE7, DWORD); 55 HRESULT WINAPI Main_DDrawSurface_SetPrivateData (LPDIRECTDRAWSURFACE7, REFGUID, LPVOID, DWORD, DWORD); 56 HRESULT WINAPI Main_DDrawSurface_UpdateOverlayDisplay (LPDIRECTDRAWSURFACE7, DWORD); 57 HRESULT WINAPI Main_DDrawSurface_UpdateOverlayZOrder (LPDIRECTDRAWSURFACE7, DWORD, LPDIRECTDRAWSURFACE7); 58 HRESULT WINAPI Main_DDrawSurface_SetSurfaceDesc(LPDIRECTDRAWSURFACE7, DDSURFACEDESC2 *, DWORD); 59 HRESULT WINAPI Main_DDrawSurface_SetLOD(LPDIRECTDRAWSURFACE7, DWORD); 60 HRESULT WINAPI Main_DDrawSurface_Unlock (LPDIRECTDRAWSURFACE7, LPRECT); 61 HRESULT WINAPI Main_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7, LPDIRECTDRAW, LPDDSURFACEDESC2); 62 HRESULT WINAPI Main_DDrawSurface_Lock (LPDIRECTDRAWSURFACE7, LPRECT, LPDDSURFACEDESC2, DWORD, HANDLE); 63 HRESULT WINAPI Main_DDrawSurface_Restore(LPDIRECTDRAWSURFACE7); 64 HRESULT WINAPI Main_DDrawSurface_UpdateOverlay (LPDIRECTDRAWSURFACE7, LPRECT, LPDIRECTDRAWSURFACE7, LPRECT, 65 DWORD, LPDDOVERLAYFX); 66 HRESULT WINAPI Main_DDrawSurface_ChangeUniquenessValue(LPDIRECTDRAWSURFACE7); 67 HRESULT WINAPI Main_DDrawSurface_AddAttachedSurface(LPDIRECTDRAWSURFACE7, LPDIRECTDRAWSURFACE7); 68 HRESULT WINAPI Main_DDrawSurface_AddOverlayDirtyRect(LPDIRECTDRAWSURFACE7, LPRECT); 69 70 71 IDirectDrawSurface7Vtbl DirectDrawSurface7_Vtable = 72 { 73 Main_DDrawSurface_QueryInterface, 74 Main_DDrawSurface_AddRef, /* (Compact done) */ 75 Main_DDrawSurface_Release4, 76 Main_DDrawSurface_AddAttachedSurface, 77 Main_DDrawSurface_AddOverlayDirtyRect, 78 Main_DDrawSurface_Blt, 79 Main_DDrawSurface_BltBatch, 80 Main_DDrawSurface_BltFast, 81 Main_DDrawSurface_DeleteAttachedSurface, 82 Main_DDrawSurface_EnumAttachedSurfaces, 83 Main_DDrawSurface_EnumOverlayZOrders, 84 Main_DDrawSurface_Flip, 85 Main_DDrawSurface_GetAttachedSurface, 86 Main_DDrawSurface_GetBltStatus, 87 Main_DDrawSurface_GetCaps, 88 Main_DDrawSurface_GetClipper, 89 Main_DDrawSurface_GetColorKey, 90 Main_DDrawSurface_GetDC, 91 Main_DDrawSurface_GetFlipStatus, 92 Main_DDrawSurface_GetOverlayPosition, 93 Main_DDrawSurface_GetPalette, 94 Main_DDrawSurface_GetPixelFormat, 95 Main_DDrawSurface_GetSurfaceDesc, 96 Main_DDrawSurface_Initialize, 97 Main_DDrawSurface_IsLost, 98 Main_DDrawSurface_Lock, 99 Main_DDrawSurface_ReleaseDC, 100 Main_DDrawSurface_Restore, 101 Main_DDrawSurface_SetClipper, 102 Main_DDrawSurface_SetColorKey, 103 Main_DDrawSurface_SetOverlayPosition, 104 Main_DDrawSurface_SetPalette, 105 Main_DDrawSurface_Unlock, 106 Main_DDrawSurface_UpdateOverlay, 107 Main_DDrawSurface_UpdateOverlayDisplay, 108 Main_DDrawSurface_UpdateOverlayZOrder, 109 Main_DDrawSurface_GetDDInterface, 110 Main_DDrawSurface_PageLock, 111 Main_DDrawSurface_PageUnlock, 112 Main_DDrawSurface_SetSurfaceDesc, 113 Main_DDrawSurface_SetPrivateData, 114 Main_DDrawSurface_GetPrivateData, 115 Main_DDrawSurface_FreePrivateData, 116 Main_DDrawSurface_GetUniquenessValue, 117 Main_DDrawSurface_ChangeUniquenessValue, 118 Main_DDrawSurface_SetPriority, 119 Main_DDrawSurface_GetPriority, 120 Main_DDrawSurface_SetLOD, 121 Main_DDrawSurface_GetLOD 122 }; 123