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(LPDIRECTDRAWSURFACE3);
19 ULONG   WINAPI Main_DDrawSurface_Release(LPDIRECTDRAWSURFACE3);
20 HRESULT WINAPI Main_DDrawSurface_QueryInterface(LPDIRECTDRAWSURFACE3, REFIID, LPVOID*);
21 HRESULT WINAPI Main_DDrawSurface_ReleaseDC(LPDIRECTDRAWSURFACE3, HDC);
22 HRESULT WINAPI Main_DDrawSurface_Blt(LPDIRECTDRAWSURFACE3, LPRECT, LPDIRECTDRAWSURFACE3, LPRECT, DWORD, LPDDBLTFX);
23 HRESULT WINAPI Main_DDrawSurface_BltBatch(LPDIRECTDRAWSURFACE3, LPDDBLTBATCH, DWORD, DWORD);
24 HRESULT WINAPI Main_DDrawSurface_BltFast(LPDIRECTDRAWSURFACE3, DWORD, DWORD, LPDIRECTDRAWSURFACE3, LPRECT, DWORD);
25 HRESULT WINAPI Main_DDrawSurface_DeleteAttachedSurface(LPDIRECTDRAWSURFACE3, DWORD, LPDIRECTDRAWSURFACE3);
26 HRESULT WINAPI Main_DDrawSurface_EnumAttachedSurfaces(LPDIRECTDRAWSURFACE3, LPVOID, LPDDENUMSURFACESCALLBACK);
27 HRESULT WINAPI Main_DDrawSurface_EnumOverlayZOrders(LPDIRECTDRAWSURFACE3, DWORD, LPVOID,LPDDENUMSURFACESCALLBACK);
28 HRESULT WINAPI Main_DDrawSurface_Flip(LPDIRECTDRAWSURFACE3 , LPDIRECTDRAWSURFACE3, DWORD);
29 HRESULT WINAPI Main_DDrawSurface_GetAttachedSurface(LPDIRECTDRAWSURFACE3, LPDDSCAPS, LPDIRECTDRAWSURFACE3*);
30 HRESULT WINAPI Main_DDrawSurface_GetBltStatus(LPDIRECTDRAWSURFACE3, DWORD dwFlags);
31 HRESULT WINAPI Main_DDrawSurface_GetCaps(LPDIRECTDRAWSURFACE3, LPDDSCAPS pCaps);
32 HRESULT WINAPI Main_DDrawSurface_GetClipper(LPDIRECTDRAWSURFACE3, LPDIRECTDRAWCLIPPER*);
33 HRESULT WINAPI Main_DDrawSurface_GetColorKey(LPDIRECTDRAWSURFACE3, DWORD, LPDDCOLORKEY);
34 HRESULT WINAPI Main_DDrawSurface_GetDC(LPDIRECTDRAWSURFACE3, HDC *);
35 HRESULT WINAPI Main_DDrawSurface_GetDDInterface(LPDIRECTDRAWSURFACE3, LPVOID*);
36 HRESULT WINAPI Main_DDrawSurface_GetFlipStatus(LPDIRECTDRAWSURFACE3, DWORD);
37 HRESULT WINAPI Main_DDrawSurface_GetOverlayPosition(LPDIRECTDRAWSURFACE3, LPLONG, LPLONG);
38 HRESULT WINAPI Main_DDrawSurface_GetPalette(LPDIRECTDRAWSURFACE3, LPDIRECTDRAWPALETTE*);
39 HRESULT WINAPI Main_DDrawSurface_GetPixelFormat(LPDIRECTDRAWSURFACE3, LPDDPIXELFORMAT);
40 HRESULT WINAPI Main_DDrawSurface_GetSurfaceDesc(LPDIRECTDRAWSURFACE3, LPDDSURFACEDESC);
41 HRESULT WINAPI Main_DDrawSurface_IsLost(LPDIRECTDRAWSURFACE3);
42 HRESULT WINAPI Main_DDrawSurface_PageLock(LPDIRECTDRAWSURFACE3, DWORD);
43 HRESULT WINAPI Main_DDrawSurface_PageUnlock(LPDIRECTDRAWSURFACE3, DWORD);
44 HRESULT WINAPI Main_DDrawSurface_ReleaseDC(LPDIRECTDRAWSURFACE3, HDC);
45 HRESULT WINAPI Main_DDrawSurface_SetClipper (LPDIRECTDRAWSURFACE3, LPDIRECTDRAWCLIPPER);
46 HRESULT WINAPI Main_DDrawSurface_SetColorKey (LPDIRECTDRAWSURFACE3, DWORD, LPDDCOLORKEY);
47 HRESULT WINAPI Main_DDrawSurface_SetOverlayPosition (LPDIRECTDRAWSURFACE3, LONG, LONG);
48 HRESULT WINAPI Main_DDrawSurface_SetPalette (LPDIRECTDRAWSURFACE3, LPDIRECTDRAWPALETTE);
49 HRESULT WINAPI Main_DDrawSurface_UpdateOverlayDisplay (LPDIRECTDRAWSURFACE3, DWORD);
50 HRESULT WINAPI Main_DDrawSurface_UpdateOverlayZOrder (LPDIRECTDRAWSURFACE3, DWORD, LPDIRECTDRAWSURFACE3);
51 HRESULT WINAPI Main_DDrawSurface_SetSurfaceDesc(LPDIRECTDRAWSURFACE3, DDSURFACEDESC *, DWORD);
52 HRESULT WINAPI Main_DDrawSurface_Unlock (LPDIRECTDRAWSURFACE3, LPVOID);
53 HRESULT WINAPI Main_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE3, LPDIRECTDRAW, LPDDSURFACEDESC);
54 HRESULT WINAPI Main_DDrawSurface_Lock (LPDIRECTDRAWSURFACE3, LPRECT, LPDDSURFACEDESC, DWORD, HANDLE);
55 HRESULT WINAPI Main_DDrawSurface_Restore(LPDIRECTDRAWSURFACE3);
56 HRESULT WINAPI Main_DDrawSurface_UpdateOverlay (LPDIRECTDRAWSURFACE3, LPRECT, LPDIRECTDRAWSURFACE3, LPRECT,
57                                                 DWORD, LPDDOVERLAYFX);
58 HRESULT WINAPI Main_DDrawSurface_AddAttachedSurface(LPDIRECTDRAWSURFACE3, LPDIRECTDRAWSURFACE3);
59 HRESULT WINAPI Main_DDrawSurface_AddOverlayDirtyRect(LPDIRECTDRAWSURFACE3, LPRECT);
60 
61 
62 IDirectDrawSurface3Vtbl DirectDrawSurface3_Vtable =
63 {
64     Main_DDrawSurface_QueryInterface,
65     Main_DDrawSurface_AddRef,                        /* (Compact done) */
66     Main_DDrawSurface_Release,
67     Main_DDrawSurface_AddAttachedSurface,
68     Main_DDrawSurface_AddOverlayDirtyRect,
69     Main_DDrawSurface_Blt,
70     Main_DDrawSurface_BltBatch,
71     Main_DDrawSurface_BltFast,
72     Main_DDrawSurface_DeleteAttachedSurface,
73     Main_DDrawSurface_EnumAttachedSurfaces,
74     Main_DDrawSurface_EnumOverlayZOrders,
75     Main_DDrawSurface_Flip,
76     Main_DDrawSurface_GetAttachedSurface,
77     Main_DDrawSurface_GetBltStatus,
78     Main_DDrawSurface_GetCaps,
79     Main_DDrawSurface_GetClipper,
80     Main_DDrawSurface_GetColorKey,
81     Main_DDrawSurface_GetDC,
82     Main_DDrawSurface_GetFlipStatus,
83     Main_DDrawSurface_GetOverlayPosition,
84     Main_DDrawSurface_GetPalette,
85     Main_DDrawSurface_GetPixelFormat,
86     Main_DDrawSurface_GetSurfaceDesc,
87     Main_DDrawSurface_Initialize,
88     Main_DDrawSurface_IsLost,
89     Main_DDrawSurface_Lock,
90     Main_DDrawSurface_ReleaseDC,
91     Main_DDrawSurface_Restore,
92     Main_DDrawSurface_SetClipper,
93     Main_DDrawSurface_SetColorKey,
94     Main_DDrawSurface_SetOverlayPosition,
95     Main_DDrawSurface_SetPalette,
96     Main_DDrawSurface_Unlock,
97     Main_DDrawSurface_UpdateOverlay,
98     Main_DDrawSurface_UpdateOverlayDisplay,
99     Main_DDrawSurface_UpdateOverlayZOrder,
100     Main_DDrawSurface_GetDDInterface,
101     Main_DDrawSurface_PageLock,
102     Main_DDrawSurface_PageUnlock,
103     Main_DDrawSurface_SetSurfaceDesc,
104 };
105