1 /* Direct Draw Thunks and old vtables
2 * Copyright 2000 TransGaming Technologies Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #include "wine/port.h"
28 #define NONAMELESSUNION
34 #include "wine/exception.h"
39 #include "ddraw_private.h"
40 #include "wine/debug.h"
42 WINE_DEFAULT_DEBUG_CHANNEL(ddraw_thunk);
43 WINE_DECLARE_DEBUG_CHANNEL(ddraw);
46 IDirectDrawImpl_QueryInterface(LPDIRECTDRAW This, REFIID iid, LPVOID *ppObj)
48 return IDirectDraw7_QueryInterface((IDirectDraw7 *)ddraw_from_ddraw1(This), iid, ppObj);
52 IDirectDraw2Impl_QueryInterface(LPDIRECTDRAW2 This, REFIID iid, LPVOID *ppObj)
54 return IDirectDraw7_QueryInterface((IDirectDraw7 *)ddraw_from_ddraw2(This), iid, ppObj);
58 IDirectDraw3Impl_QueryInterface(LPDIRECTDRAW3 This, REFIID iid, LPVOID *ppObj)
60 return IDirectDraw7_QueryInterface((IDirectDraw7 *)ddraw_from_ddraw3(This), iid, ppObj);
64 IDirectDraw4Impl_QueryInterface(LPDIRECTDRAW4 This, REFIID iid, LPVOID *ppObj)
66 return IDirectDraw7_QueryInterface((IDirectDraw7 *)ddraw_from_ddraw4(This), iid, ppObj);
70 IDirectDrawImpl_AddRef(LPDIRECTDRAW iface)
72 IDirectDrawImpl *This = ddraw_from_ddraw1(iface);
73 ULONG ref = InterlockedIncrement(&This->ref1);
75 TRACE("(%p) : incrementing IDirectDraw refcount from %u.\n", This, ref -1);
77 if(ref == 1) InterlockedIncrement(&This->numIfaces);
83 IDirectDraw2Impl_AddRef(LPDIRECTDRAW2 iface)
85 IDirectDrawImpl *This = ddraw_from_ddraw2(iface);
86 ULONG ref = InterlockedIncrement(&This->ref2);
88 TRACE("(%p) : incrementing IDirectDraw2 refcount from %u.\n", This, ref -1);
90 if(ref == 1) InterlockedIncrement(&This->numIfaces);
96 IDirectDraw3Impl_AddRef(LPDIRECTDRAW3 iface)
98 IDirectDrawImpl *This = ddraw_from_ddraw3(iface);
99 ULONG ref = InterlockedIncrement(&This->ref3);
101 TRACE("(%p) : incrementing IDirectDraw3 refcount from %u.\n", This, ref -1);
103 if(ref == 1) InterlockedIncrement(&This->numIfaces);
109 IDirectDraw4Impl_AddRef(LPDIRECTDRAW4 iface)
111 IDirectDrawImpl *This = ddraw_from_ddraw4(iface);
112 ULONG ref = InterlockedIncrement(&This->ref4);
114 TRACE("(%p) : incrementing IDirectDraw4 refcount from %u.\n", This, ref -1);
116 if(ref == 1) InterlockedIncrement(&This->numIfaces);
122 IDirectDrawImpl_Release(LPDIRECTDRAW iface)
124 IDirectDrawImpl *This = ddraw_from_ddraw1(iface);
125 ULONG ref = InterlockedDecrement(&This->ref1);
127 TRACE_(ddraw)("(%p)->() decrementing IDirectDraw refcount from %u.\n", This, ref +1);
131 ULONG ifacecount = InterlockedDecrement(&This->numIfaces);
132 if(ifacecount == 0) IDirectDrawImpl_Destroy(This);
139 IDirectDraw2Impl_Release(LPDIRECTDRAW2 iface)
141 IDirectDrawImpl *This = ddraw_from_ddraw2(iface);
142 ULONG ref = InterlockedDecrement(&This->ref2);
144 TRACE_(ddraw)("(%p)->() decrementing IDirectDraw2 refcount from %u.\n", This, ref +1);
148 ULONG ifacecount = InterlockedDecrement(&This->numIfaces);
149 if(ifacecount == 0) IDirectDrawImpl_Destroy(This);
156 IDirectDraw3Impl_Release(LPDIRECTDRAW3 iface)
158 IDirectDrawImpl *This = ddraw_from_ddraw3(iface);
159 ULONG ref = InterlockedDecrement(&This->ref3);
161 TRACE_(ddraw)("(%p)->() decrementing IDirectDraw3 refcount from %u.\n", This, ref +1);
165 ULONG ifacecount = InterlockedDecrement(&This->numIfaces);
166 if(ifacecount == 0) IDirectDrawImpl_Destroy(This);
173 IDirectDraw4Impl_Release(LPDIRECTDRAW4 iface)
175 IDirectDrawImpl *This = ddraw_from_ddraw4(iface);
176 ULONG ref = InterlockedDecrement(&This->ref4);
178 TRACE_(ddraw)("(%p)->() decrementing IDirectDraw4 refcount from %u.\n", This, ref +1);
182 ULONG ifacecount = InterlockedDecrement(&This->numIfaces);
183 if(ifacecount == 0) IDirectDrawImpl_Destroy(This);
189 static HRESULT WINAPI
190 IDirectDrawImpl_Compact(LPDIRECTDRAW This)
192 return IDirectDraw7_Compact((IDirectDraw7 *)ddraw_from_ddraw1(This));
195 static HRESULT WINAPI
196 IDirectDraw2Impl_Compact(LPDIRECTDRAW2 This)
198 return IDirectDraw7_Compact((IDirectDraw7 *)ddraw_from_ddraw2(This));
201 static HRESULT WINAPI
202 IDirectDraw3Impl_Compact(LPDIRECTDRAW3 This)
204 return IDirectDraw7_Compact((IDirectDraw7 *)ddraw_from_ddraw3(This));
207 static HRESULT WINAPI
208 IDirectDraw4Impl_Compact(LPDIRECTDRAW4 This)
210 return IDirectDraw7_Compact((IDirectDraw7 *)ddraw_from_ddraw4(This));
213 static HRESULT WINAPI
214 IDirectDrawImpl_CreateClipper(LPDIRECTDRAW This, DWORD dwFlags,
215 LPDIRECTDRAWCLIPPER *ppClipper,
218 return IDirectDraw7_CreateClipper((IDirectDraw7 *)ddraw_from_ddraw1(This), dwFlags, ppClipper, pUnkOuter);
221 static HRESULT WINAPI
222 IDirectDraw2Impl_CreateClipper(LPDIRECTDRAW2 This, DWORD dwFlags,
223 LPDIRECTDRAWCLIPPER *ppClipper,
226 return IDirectDraw7_CreateClipper((IDirectDraw7 *)ddraw_from_ddraw2(This), dwFlags, ppClipper, pUnkOuter);
229 static HRESULT WINAPI
230 IDirectDraw3Impl_CreateClipper(LPDIRECTDRAW3 This, DWORD dwFlags,
231 LPDIRECTDRAWCLIPPER *ppClipper,
234 return IDirectDraw7_CreateClipper((IDirectDraw7 *)ddraw_from_ddraw3(This), dwFlags, ppClipper, pUnkOuter);
237 static HRESULT WINAPI
238 IDirectDraw4Impl_CreateClipper(LPDIRECTDRAW4 This, DWORD dwFlags,
239 LPDIRECTDRAWCLIPPER *ppClipper,
242 return IDirectDraw7_CreateClipper((IDirectDraw7 *)ddraw_from_ddraw4(This), dwFlags, ppClipper, pUnkOuter);
245 static HRESULT WINAPI
246 IDirectDrawImpl_CreatePalette(LPDIRECTDRAW This, DWORD dwFlags,
247 LPPALETTEENTRY pEntries,
248 LPDIRECTDRAWPALETTE *ppPalette,
252 hr = IDirectDraw7_CreatePalette((IDirectDraw7 *)ddraw_from_ddraw1(This), dwFlags, pEntries, ppPalette, pUnkOuter);
253 if(SUCCEEDED(hr) && *ppPalette)
255 IDirectDrawPaletteImpl *impl = (IDirectDrawPaletteImpl *)*ppPalette;
256 IDirectDraw7_Release((IDirectDraw7 *)ddraw_from_ddraw1(This));
257 impl->ifaceToRelease = NULL;
263 static HRESULT WINAPI
264 IDirectDraw2Impl_CreatePalette(LPDIRECTDRAW2 This, DWORD dwFlags,
265 LPPALETTEENTRY pEntries,
266 LPDIRECTDRAWPALETTE *ppPalette,
270 hr = IDirectDraw7_CreatePalette((IDirectDraw7 *)ddraw_from_ddraw2(This), dwFlags, pEntries, ppPalette, pUnkOuter);
271 if(SUCCEEDED(hr) && *ppPalette)
273 IDirectDrawPaletteImpl *impl = (IDirectDrawPaletteImpl *)*ppPalette;
274 IDirectDraw7_Release((IDirectDraw7 *)ddraw_from_ddraw2(This));
275 impl->ifaceToRelease = NULL;
280 static HRESULT WINAPI
281 IDirectDraw3Impl_CreatePalette(LPDIRECTDRAW3 This, DWORD dwFlags,
282 LPPALETTEENTRY pEntries,
283 LPDIRECTDRAWPALETTE *ppPalette,
287 hr = IDirectDraw7_CreatePalette((IDirectDraw7 *)ddraw_from_ddraw3(This), dwFlags, pEntries, ppPalette, pUnkOuter);
288 if(SUCCEEDED(hr) && *ppPalette)
290 IDirectDrawPaletteImpl *impl = (IDirectDrawPaletteImpl *)*ppPalette;
291 IDirectDraw7_Release((IDirectDraw7 *)ddraw_from_ddraw3(This));
292 IDirectDraw4_AddRef(This);
293 impl->ifaceToRelease = (IUnknown *) This;
298 static HRESULT WINAPI
299 IDirectDraw4Impl_CreatePalette(LPDIRECTDRAW4 This, DWORD dwFlags,
300 LPPALETTEENTRY pEntries,
301 LPDIRECTDRAWPALETTE *ppPalette,
305 hr = IDirectDraw7_CreatePalette((IDirectDraw7 *)ddraw_from_ddraw4(This), dwFlags, pEntries, ppPalette, pUnkOuter);
306 if(SUCCEEDED(hr) && *ppPalette)
308 IDirectDrawPaletteImpl *impl = (IDirectDrawPaletteImpl *)*ppPalette;
309 IDirectDraw7_Release((IDirectDraw7 *)ddraw_from_ddraw4(This));
310 IDirectDraw4_AddRef(This);
311 impl->ifaceToRelease = (IUnknown *) This;
316 /* Must set all attached surfaces (e.g. mipmaps) versions as well */
317 static void set_surf_version(IDirectDrawSurfaceImpl *surf, int version)
320 TRACE("%p->version(%d) = %d\n", surf, surf->version, version);
321 surf->version = version;
322 for(i = 0; i < MAX_COMPLEX_ATTACHED; i++)
324 if(!surf->complex_array[i]) break;
325 set_surf_version(surf->complex_array[i], version);
327 while( (surf = surf->next_attached) )
329 set_surf_version(surf, version);
333 static HRESULT WINAPI
334 IDirectDrawImpl_CreateSurface(LPDIRECTDRAW This, LPDDSURFACEDESC pSDesc,
335 LPDIRECTDRAWSURFACE *ppSurface,
338 LPDIRECTDRAWSURFACE7 pSurface7;
339 IDirectDrawSurfaceImpl *impl;
342 /* Remove front buffer flag, this causes failure in v7, and its added to normal
345 pSDesc->ddsCaps.dwCaps &= ~DDSCAPS_FRONTBUFFER;
346 /* the LPDDSURFACEDESC -> LPDDSURFACEDESC2 conversion should be ok,
347 * since the data layout is the same */
348 hr = IDirectDraw7_CreateSurface((IDirectDraw7 *)ddraw_from_ddraw1(This),
349 (LPDDSURFACEDESC2)pSDesc, &pSurface7, pUnkOuter);
356 impl = (IDirectDrawSurfaceImpl *)pSurface7;
357 *ppSurface = (IDirectDrawSurface *)&impl->IDirectDrawSurface3_vtbl;
358 set_surf_version(impl, 1);
359 IDirectDraw7_Release((IDirectDraw7 *)ddraw_from_ddraw1(This));
360 impl->ifaceToRelease = NULL;
365 static HRESULT WINAPI
366 IDirectDraw2Impl_CreateSurface(LPDIRECTDRAW2 This, LPDDSURFACEDESC pSDesc,
367 LPDIRECTDRAWSURFACE *ppSurface,
370 LPDIRECTDRAWSURFACE7 pSurface7;
371 IDirectDrawSurfaceImpl *impl;
374 hr = IDirectDraw7_CreateSurface((IDirectDraw7 *)ddraw_from_ddraw2(This),
375 (LPDDSURFACEDESC2)pSDesc, &pSurface7, pUnkOuter);
382 impl = (IDirectDrawSurfaceImpl *)pSurface7;
383 *ppSurface = (IDirectDrawSurface *)&impl->IDirectDrawSurface3_vtbl;
384 set_surf_version(impl, 2);
385 IDirectDraw7_Release((IDirectDraw7 *)ddraw_from_ddraw2(This));
386 impl->ifaceToRelease = NULL;
391 static HRESULT WINAPI
392 IDirectDraw3Impl_CreateSurface(LPDIRECTDRAW3 This, LPDDSURFACEDESC pSDesc,
393 LPDIRECTDRAWSURFACE *ppSurface,
396 LPDIRECTDRAWSURFACE7 pSurface7;
397 IDirectDrawSurfaceImpl *impl;
400 hr = IDirectDraw7_CreateSurface((IDirectDraw7 *)ddraw_from_ddraw3(This),
401 (LPDDSURFACEDESC2)pSDesc, &pSurface7, pUnkOuter);
408 impl = (IDirectDrawSurfaceImpl *)pSurface7;
409 *ppSurface = (IDirectDrawSurface *)&impl->IDirectDrawSurface3_vtbl;
410 set_surf_version(impl, 3);
411 IDirectDraw7_Release((IDirectDraw7 *)ddraw_from_ddraw3(This));
412 IDirectDraw3_AddRef(This);
413 impl->ifaceToRelease = (IUnknown *) This;
418 static HRESULT WINAPI
419 IDirectDraw4Impl_CreateSurface(LPDIRECTDRAW4 This, LPDDSURFACEDESC2 pSDesc,
420 LPDIRECTDRAWSURFACE4 *ppSurface,
424 IDirectDrawSurfaceImpl *impl;
426 hr = IDirectDraw7_CreateSurface((IDirectDraw7 *)ddraw_from_ddraw4(This),
427 pSDesc, (LPDIRECTDRAWSURFACE7 *)ppSurface, pUnkOuter);
428 impl = (IDirectDrawSurfaceImpl *)*ppSurface;
429 if(SUCCEEDED(hr) && impl)
431 set_surf_version(impl, 4);
432 IDirectDraw7_Release((IDirectDraw7 *)ddraw_from_ddraw4(This));
433 IDirectDraw4_AddRef(This);
434 impl->ifaceToRelease = (IUnknown *) This;
439 static HRESULT WINAPI
440 IDirectDrawImpl_DuplicateSurface(LPDIRECTDRAW This, LPDIRECTDRAWSURFACE pSrc,
441 LPDIRECTDRAWSURFACE *ppDst)
443 LPDIRECTDRAWSURFACE7 pDst7;
446 hr = IDirectDraw7_DuplicateSurface((IDirectDraw7 *)ddraw_from_ddraw1(This),
447 pSrc ? (IDirectDrawSurface7 *)surface_from_surface3((IDirectDrawSurface3 *)pSrc) : NULL, &pDst7);
449 /* This coercion is safe, since the IDirectDrawSurface3 vtable has the
450 * IDirectDrawSurface vtable layout at the beginning */
451 *ppDst = pDst7 ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)pDst7)->IDirectDrawSurface3_vtbl : NULL;
456 static HRESULT WINAPI
457 IDirectDraw2Impl_DuplicateSurface(LPDIRECTDRAW2 This, LPDIRECTDRAWSURFACE pSrc,
458 LPDIRECTDRAWSURFACE *ppDst)
460 LPDIRECTDRAWSURFACE7 pDst7;
463 hr = IDirectDraw7_DuplicateSurface((IDirectDraw7 *)ddraw_from_ddraw2(This),
464 pSrc ? (IDirectDrawSurface7 *)surface_from_surface3((IDirectDrawSurface3 *)pSrc) : NULL, &pDst7);
466 /* This coercion is safe, since the IDirectDrawSurface3 vtable has the
467 * IDirectDrawSurface vtable layout at the beginning */
468 *ppDst = pDst7 ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)pDst7)->IDirectDrawSurface3_vtbl : NULL;
473 static HRESULT WINAPI
474 IDirectDraw3Impl_DuplicateSurface(LPDIRECTDRAW3 This, LPDIRECTDRAWSURFACE pSrc,
475 LPDIRECTDRAWSURFACE *ppDst)
477 LPDIRECTDRAWSURFACE7 pDst7;
480 hr = IDirectDraw7_DuplicateSurface((IDirectDraw7 *)ddraw_from_ddraw3(This),
481 pSrc ? (IDirectDrawSurface7 *)surface_from_surface3((IDirectDrawSurface3 *)pSrc) : NULL, &pDst7);
483 /* This coercion is safe, since the IDirectDrawSurface3 vtable has the
484 * IDirectDrawSurface vtable layout at the beginning */
485 *ppDst = pDst7 ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)pDst7)->IDirectDrawSurface3_vtbl : NULL;
490 static HRESULT WINAPI
491 IDirectDraw4Impl_DuplicateSurface(LPDIRECTDRAW4 This,
492 LPDIRECTDRAWSURFACE4 pSrc,
493 LPDIRECTDRAWSURFACE4 *ppDst)
495 return IDirectDraw7_DuplicateSurface((IDirectDraw7 *)ddraw_from_ddraw4(This),
496 (LPDIRECTDRAWSURFACE7)pSrc, (LPDIRECTDRAWSURFACE7 *)ppDst);
499 struct displaymodescallback_context
501 LPDDENUMMODESCALLBACK func;
505 static HRESULT CALLBACK
506 EnumDisplayModesCallbackThunk(LPDDSURFACEDESC2 pDDSD2, LPVOID context)
509 struct displaymodescallback_context *cbcontext = context;
511 memcpy(&DDSD,pDDSD2,sizeof(DDSD));
512 DDSD.dwSize = sizeof(DDSD);
514 return cbcontext->func(&DDSD, cbcontext->context);
517 static HRESULT WINAPI
518 IDirectDrawImpl_EnumDisplayModes(LPDIRECTDRAW This, DWORD dwFlags,
519 LPDDSURFACEDESC pDDSD, LPVOID context,
520 LPDDENUMMODESCALLBACK cb)
522 struct displaymodescallback_context cbcontext;
525 cbcontext.context = context;
527 return IDirectDraw7_EnumDisplayModes((IDirectDraw7 *)ddraw_from_ddraw1(This),
528 dwFlags, (LPDDSURFACEDESC2)pDDSD, &cbcontext, EnumDisplayModesCallbackThunk);
531 static HRESULT WINAPI
532 IDirectDraw2Impl_EnumDisplayModes(LPDIRECTDRAW2 This, DWORD dwFlags,
533 LPDDSURFACEDESC pDDSD, LPVOID context,
534 LPDDENUMMODESCALLBACK cb)
536 struct displaymodescallback_context cbcontext;
539 cbcontext.context = context;
541 return IDirectDraw7_EnumDisplayModes((IDirectDraw7 *)ddraw_from_ddraw2(This),
542 dwFlags, (LPDDSURFACEDESC2)pDDSD, &cbcontext, EnumDisplayModesCallbackThunk);
545 static HRESULT WINAPI
546 IDirectDraw3Impl_EnumDisplayModes(LPDIRECTDRAW3 This, DWORD dwFlags,
547 LPDDSURFACEDESC pDDSD, LPVOID context,
548 LPDDENUMMODESCALLBACK cb)
550 struct displaymodescallback_context cbcontext;
553 cbcontext.context = context;
555 return IDirectDraw7_EnumDisplayModes((IDirectDraw7 *)ddraw_from_ddraw3(This),
556 dwFlags, (LPDDSURFACEDESC2)pDDSD, &cbcontext, EnumDisplayModesCallbackThunk);
559 static HRESULT WINAPI
560 IDirectDraw4Impl_EnumDisplayModes(LPDIRECTDRAW4 This, DWORD dwFlags,
561 LPDDSURFACEDESC2 pDDSD, LPVOID context,
562 LPDDENUMMODESCALLBACK2 cb)
564 return IDirectDraw7_EnumDisplayModes((IDirectDraw7 *)ddraw_from_ddraw4(This), dwFlags, pDDSD, context, cb);
567 struct surfacescallback_context
569 LPDDENUMSURFACESCALLBACK func;
573 static HRESULT CALLBACK
574 EnumSurfacesCallbackThunk(LPDIRECTDRAWSURFACE7 pSurf, LPDDSURFACEDESC2 pDDSD,
577 struct surfacescallback_context *cbcontext = context;
579 /* This coercion is safe, since the IDirectDrawSurface3 vtable has the
580 * IDirectDrawSurface vtable layout at the beginning */
581 return cbcontext->func(
582 pSurf ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)pSurf)->IDirectDrawSurface3_vtbl : NULL,
583 (LPDDSURFACEDESC)pDDSD, cbcontext->context);
586 static HRESULT WINAPI
587 IDirectDrawImpl_EnumSurfaces(LPDIRECTDRAW This, DWORD dwFlags,
588 LPDDSURFACEDESC pDDSD, LPVOID context,
589 LPDDENUMSURFACESCALLBACK cb)
591 struct surfacescallback_context cbcontext;
594 cbcontext.context = context;
596 return IDirectDraw7_EnumSurfaces((IDirectDraw7 *)ddraw_from_ddraw1(This),
597 dwFlags, (LPDDSURFACEDESC2)pDDSD, &cbcontext, EnumSurfacesCallbackThunk);
600 static HRESULT WINAPI
601 IDirectDraw2Impl_EnumSurfaces(LPDIRECTDRAW2 This, DWORD dwFlags,
602 LPDDSURFACEDESC pDDSD, LPVOID context,
603 LPDDENUMSURFACESCALLBACK cb)
605 struct surfacescallback_context cbcontext;
608 cbcontext.context = context;
610 return IDirectDraw7_EnumSurfaces((IDirectDraw7 *)ddraw_from_ddraw2(This),
611 dwFlags, (LPDDSURFACEDESC2)pDDSD, &cbcontext, EnumSurfacesCallbackThunk);
614 static HRESULT WINAPI
615 IDirectDraw3Impl_EnumSurfaces(LPDIRECTDRAW3 This, DWORD dwFlags,
616 LPDDSURFACEDESC pDDSD, LPVOID context,
617 LPDDENUMSURFACESCALLBACK cb)
619 struct surfacescallback_context cbcontext;
622 cbcontext.context = context;
624 return IDirectDraw7_EnumSurfaces((IDirectDraw7 *)ddraw_from_ddraw3(This),
625 dwFlags, (LPDDSURFACEDESC2)pDDSD, &cbcontext, EnumSurfacesCallbackThunk);
628 static HRESULT WINAPI
629 IDirectDraw4Impl_EnumSurfaces(LPDIRECTDRAW4 This, DWORD dwFlags,
630 LPDDSURFACEDESC2 pDDSD, LPVOID context,
631 LPDDENUMSURFACESCALLBACK2 cb)
633 return IDirectDraw7_EnumSurfaces((IDirectDraw7 *)ddraw_from_ddraw4(This),
634 dwFlags, pDDSD, context, (LPDDENUMSURFACESCALLBACK7)cb);
637 static HRESULT WINAPI
638 IDirectDrawImpl_FlipToGDISurface(LPDIRECTDRAW This)
640 return IDirectDraw7_FlipToGDISurface((IDirectDraw7 *)ddraw_from_ddraw1(This));
643 static HRESULT WINAPI
644 IDirectDraw2Impl_FlipToGDISurface(LPDIRECTDRAW2 This)
646 return IDirectDraw7_FlipToGDISurface((IDirectDraw7 *)ddraw_from_ddraw2(This));
649 static HRESULT WINAPI
650 IDirectDraw3Impl_FlipToGDISurface(LPDIRECTDRAW3 This)
652 return IDirectDraw7_FlipToGDISurface((IDirectDraw7 *)ddraw_from_ddraw3(This));
655 static HRESULT WINAPI
656 IDirectDraw4Impl_FlipToGDISurface(LPDIRECTDRAW4 This)
658 return IDirectDraw7_FlipToGDISurface((IDirectDraw7 *)ddraw_from_ddraw4(This));
661 static HRESULT WINAPI
662 IDirectDrawImpl_GetCaps(LPDIRECTDRAW This, LPDDCAPS pDDC1, LPDDCAPS pDDC2)
664 return IDirectDraw7_GetCaps((IDirectDraw7 *)ddraw_from_ddraw1(This), pDDC1, pDDC2);
667 static HRESULT WINAPI
668 IDirectDraw2Impl_GetCaps(LPDIRECTDRAW2 This, LPDDCAPS pDDC1, LPDDCAPS pDDC2)
670 return IDirectDraw7_GetCaps((IDirectDraw7 *)ddraw_from_ddraw2(This), pDDC1, pDDC2);
673 static HRESULT WINAPI
674 IDirectDraw3Impl_GetCaps(LPDIRECTDRAW3 This, LPDDCAPS pDDC1, LPDDCAPS pDDC2)
676 return IDirectDraw7_GetCaps((IDirectDraw7 *)ddraw_from_ddraw3(This), pDDC1, pDDC2);
679 static HRESULT WINAPI
680 IDirectDraw4Impl_GetCaps(LPDIRECTDRAW4 This, LPDDCAPS pDDC1, LPDDCAPS pDDC2)
682 return IDirectDraw7_GetCaps((IDirectDraw7 *)ddraw_from_ddraw4(This), pDDC1, pDDC2);
685 static HRESULT WINAPI
686 IDirectDrawImpl_GetDisplayMode(LPDIRECTDRAW This, LPDDSURFACEDESC pDDSD)
688 return IDirectDraw7_GetDisplayMode((IDirectDraw7 *)ddraw_from_ddraw1(This), (LPDDSURFACEDESC2)pDDSD);
691 static HRESULT WINAPI
692 IDirectDraw2Impl_GetDisplayMode(LPDIRECTDRAW2 This, LPDDSURFACEDESC pDDSD)
694 return IDirectDraw7_GetDisplayMode((IDirectDraw7 *)ddraw_from_ddraw2(This), (LPDDSURFACEDESC2)pDDSD);
697 static HRESULT WINAPI
698 IDirectDraw3Impl_GetDisplayMode(LPDIRECTDRAW3 This, LPDDSURFACEDESC pDDSD)
700 return IDirectDraw7_GetDisplayMode((IDirectDraw7 *)ddraw_from_ddraw3(This), (LPDDSURFACEDESC2)pDDSD);
703 static HRESULT WINAPI
704 IDirectDraw4Impl_GetDisplayMode(LPDIRECTDRAW4 This, LPDDSURFACEDESC2 pDDSD)
706 return IDirectDraw7_GetDisplayMode((IDirectDraw7 *)ddraw_from_ddraw4(This), (LPDDSURFACEDESC2)pDDSD);
709 static HRESULT WINAPI
710 IDirectDrawImpl_GetFourCCCodes(LPDIRECTDRAW This, LPDWORD lpNumCodes,
713 return IDirectDraw7_GetFourCCCodes((IDirectDraw7 *)ddraw_from_ddraw1(This), lpNumCodes, lpCodes);
716 static HRESULT WINAPI
717 IDirectDraw2Impl_GetFourCCCodes(LPDIRECTDRAW2 This, LPDWORD lpNumCodes,
720 return IDirectDraw7_GetFourCCCodes((IDirectDraw7 *)ddraw_from_ddraw2(This), lpNumCodes, lpCodes);
723 static HRESULT WINAPI
724 IDirectDraw3Impl_GetFourCCCodes(LPDIRECTDRAW3 This, LPDWORD lpNumCodes,
727 return IDirectDraw7_GetFourCCCodes((IDirectDraw7 *)ddraw_from_ddraw3(This), lpNumCodes, lpCodes);
730 static HRESULT WINAPI
731 IDirectDraw4Impl_GetFourCCCodes(LPDIRECTDRAW4 This, LPDWORD lpNumCodes,
734 return IDirectDraw7_GetFourCCCodes((IDirectDraw7 *)ddraw_from_ddraw4(This), lpNumCodes, lpCodes);
737 static HRESULT WINAPI
738 IDirectDrawImpl_GetGDISurface(LPDIRECTDRAW This, LPDIRECTDRAWSURFACE *ppSurf)
740 LPDIRECTDRAWSURFACE7 pSurf7;
743 hr = IDirectDraw7_GetGDISurface((IDirectDraw7 *)ddraw_from_ddraw1(This), &pSurf7);
745 /* This coercion is safe, since the IDirectDrawSurface3 vtable has the
746 * IDirectDrawSurface vtable layout at the beginning */
747 *ppSurf = pSurf7 ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)pSurf7)->IDirectDrawSurface3_vtbl : NULL;
752 static HRESULT WINAPI
753 IDirectDraw2Impl_GetGDISurface(LPDIRECTDRAW2 This, LPDIRECTDRAWSURFACE *ppSurf)
755 LPDIRECTDRAWSURFACE7 pSurf7;
758 hr = IDirectDraw7_GetGDISurface((IDirectDraw7 *)ddraw_from_ddraw2(This), &pSurf7);
760 /* This coercion is safe, since the IDirectDrawSurface3 vtable has the
761 * IDirectDrawSurface vtable layout at the beginning */
762 *ppSurf = pSurf7 ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)pSurf7)->IDirectDrawSurface3_vtbl : NULL;
767 static HRESULT WINAPI
768 IDirectDraw3Impl_GetGDISurface(LPDIRECTDRAW3 This, LPDIRECTDRAWSURFACE *ppSurf)
770 LPDIRECTDRAWSURFACE7 pSurf7;
773 hr = IDirectDraw7_GetGDISurface((IDirectDraw7 *)ddraw_from_ddraw3(This), &pSurf7);
775 /* This coercion is safe, since the IDirectDrawSurface3 vtable has the
776 * IDirectDrawSurface vtable layout at the beginning */
777 *ppSurf = pSurf7 ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)pSurf7)->IDirectDrawSurface3_vtbl : NULL;
782 static HRESULT WINAPI
783 IDirectDraw4Impl_GetGDISurface(LPDIRECTDRAW4 This,
784 LPDIRECTDRAWSURFACE4 *ppSurf)
786 return IDirectDraw7_GetGDISurface((IDirectDraw7 *)ddraw_from_ddraw4(This), (LPDIRECTDRAWSURFACE7 *)ppSurf);
789 static HRESULT WINAPI
790 IDirectDrawImpl_GetMonitorFrequency(LPDIRECTDRAW This, LPDWORD pdwFreq)
792 return IDirectDraw7_GetMonitorFrequency((IDirectDraw7 *)ddraw_from_ddraw1(This), pdwFreq);
795 static HRESULT WINAPI
796 IDirectDraw2Impl_GetMonitorFrequency(LPDIRECTDRAW2 This, LPDWORD pdwFreq)
798 return IDirectDraw7_GetMonitorFrequency((IDirectDraw7 *)ddraw_from_ddraw2(This), pdwFreq);
801 static HRESULT WINAPI
802 IDirectDraw3Impl_GetMonitorFrequency(LPDIRECTDRAW3 This, LPDWORD pdwFreq)
804 return IDirectDraw7_GetMonitorFrequency((IDirectDraw7 *)ddraw_from_ddraw3(This), pdwFreq);
807 static HRESULT WINAPI
808 IDirectDraw4Impl_GetMonitorFrequency(LPDIRECTDRAW4 This, LPDWORD pdwFreq)
810 return IDirectDraw7_GetMonitorFrequency((IDirectDraw7 *)ddraw_from_ddraw4(This), pdwFreq);
813 static HRESULT WINAPI
814 IDirectDrawImpl_GetScanLine(LPDIRECTDRAW This, LPDWORD pdwLine)
816 return IDirectDraw7_GetScanLine((IDirectDraw7 *)ddraw_from_ddraw1(This), pdwLine);
819 static HRESULT WINAPI
820 IDirectDraw2Impl_GetScanLine(LPDIRECTDRAW2 This, LPDWORD pdwLine)
822 return IDirectDraw7_GetScanLine((IDirectDraw7 *)ddraw_from_ddraw2(This), pdwLine);
825 static HRESULT WINAPI
826 IDirectDraw3Impl_GetScanLine(LPDIRECTDRAW3 This, LPDWORD pdwLine)
828 return IDirectDraw7_GetScanLine((IDirectDraw7 *)ddraw_from_ddraw3(This), pdwLine);
831 static HRESULT WINAPI
832 IDirectDraw4Impl_GetScanLine(LPDIRECTDRAW4 This, LPDWORD pdwLine)
834 return IDirectDraw7_GetScanLine((IDirectDraw7 *)ddraw_from_ddraw4(This), pdwLine);
837 static HRESULT WINAPI
838 IDirectDrawImpl_GetVerticalBlankStatus(LPDIRECTDRAW This, LPBOOL lpbIsInVB)
840 return IDirectDraw7_GetVerticalBlankStatus((IDirectDraw7 *)ddraw_from_ddraw1(This), lpbIsInVB);
843 static HRESULT WINAPI
844 IDirectDraw2Impl_GetVerticalBlankStatus(LPDIRECTDRAW2 This, LPBOOL lpbIsInVB)
846 return IDirectDraw7_GetVerticalBlankStatus((IDirectDraw7 *)ddraw_from_ddraw2(This), lpbIsInVB);
849 static HRESULT WINAPI
850 IDirectDraw3Impl_GetVerticalBlankStatus(LPDIRECTDRAW3 This, LPBOOL lpbIsInVB)
852 return IDirectDraw7_GetVerticalBlankStatus((IDirectDraw7 *)ddraw_from_ddraw3(This), lpbIsInVB);
855 static HRESULT WINAPI
856 IDirectDraw4Impl_GetVerticalBlankStatus(LPDIRECTDRAW4 This, LPBOOL lpbIsInVB)
858 return IDirectDraw7_GetVerticalBlankStatus((IDirectDraw7 *)ddraw_from_ddraw4(This), lpbIsInVB);
861 static HRESULT WINAPI
862 IDirectDrawImpl_Initialize(LPDIRECTDRAW iface, LPGUID pGUID)
864 IDirectDrawImpl *This = ddraw_from_ddraw1(iface);
867 ret_value = IDirectDraw7_Initialize((IDirectDraw7 *)This, pGUID);
872 static HRESULT WINAPI
873 IDirectDraw2Impl_Initialize(LPDIRECTDRAW2 iface, LPGUID pGUID)
875 IDirectDrawImpl *This = ddraw_from_ddraw2(iface);
878 ret_value = IDirectDraw7_Initialize((IDirectDraw7 *)This, pGUID);
883 static HRESULT WINAPI
884 IDirectDraw3Impl_Initialize(LPDIRECTDRAW3 iface, LPGUID pGUID)
886 IDirectDrawImpl *This = ddraw_from_ddraw3(iface);
889 ret_value = IDirectDraw7_Initialize((IDirectDraw7 *)This, pGUID);
894 static HRESULT WINAPI
895 IDirectDraw4Impl_Initialize(LPDIRECTDRAW4 iface, LPGUID pGUID)
897 IDirectDrawImpl *This = ddraw_from_ddraw4(iface);
900 ret_value = IDirectDraw7_Initialize((IDirectDraw7 *)This, pGUID);
906 static HRESULT WINAPI
907 IDirectDrawImpl_RestoreDisplayMode(LPDIRECTDRAW This)
909 return IDirectDraw7_RestoreDisplayMode((IDirectDraw7 *)ddraw_from_ddraw1(This));
912 static HRESULT WINAPI
913 IDirectDraw2Impl_RestoreDisplayMode(LPDIRECTDRAW2 This)
915 return IDirectDraw7_RestoreDisplayMode((IDirectDraw7 *)ddraw_from_ddraw2(This));
918 static HRESULT WINAPI
919 IDirectDraw3Impl_RestoreDisplayMode(LPDIRECTDRAW3 This)
921 return IDirectDraw7_RestoreDisplayMode((IDirectDraw7 *)ddraw_from_ddraw3(This));
924 static HRESULT WINAPI
925 IDirectDraw4Impl_RestoreDisplayMode(LPDIRECTDRAW4 This)
927 return IDirectDraw7_RestoreDisplayMode((IDirectDraw7 *)ddraw_from_ddraw4(This));
930 static HRESULT WINAPI
931 IDirectDrawImpl_SetCooperativeLevel(LPDIRECTDRAW This, HWND hWnd,
934 return IDirectDraw7_SetCooperativeLevel((IDirectDraw7 *)ddraw_from_ddraw1(This), hWnd, dwFlags);
937 static HRESULT WINAPI
938 IDirectDraw2Impl_SetCooperativeLevel(LPDIRECTDRAW2 This, HWND hWnd,
941 return IDirectDraw7_SetCooperativeLevel((IDirectDraw7 *)ddraw_from_ddraw2(This), hWnd, dwFlags);
944 static HRESULT WINAPI
945 IDirectDraw3Impl_SetCooperativeLevel(LPDIRECTDRAW3 This, HWND hWnd,
948 return IDirectDraw7_SetCooperativeLevel((IDirectDraw7 *)ddraw_from_ddraw3(This), hWnd, dwFlags);
951 static HRESULT WINAPI
952 IDirectDraw4Impl_SetCooperativeLevel(LPDIRECTDRAW4 This, HWND hWnd,
955 return IDirectDraw7_SetCooperativeLevel((IDirectDraw7 *)ddraw_from_ddraw4(This), hWnd, dwFlags);
958 static HRESULT WINAPI
959 IDirectDrawImpl_SetDisplayMode(LPDIRECTDRAW This, DWORD a, DWORD b, DWORD c)
961 return IDirectDraw7_SetDisplayMode((IDirectDraw7 *)ddraw_from_ddraw1(This), a, b, c, 0, 0);
964 static HRESULT WINAPI
965 IDirectDraw2Impl_SetDisplayMode(LPDIRECTDRAW2 This, DWORD a, DWORD b, DWORD c,
968 return IDirectDraw7_SetDisplayMode((IDirectDraw7 *)ddraw_from_ddraw2(This), a, b, c, d, e);
971 static HRESULT WINAPI
972 IDirectDraw3Impl_SetDisplayMode(LPDIRECTDRAW3 This, DWORD a, DWORD b, DWORD c,
975 return IDirectDraw7_SetDisplayMode((IDirectDraw7 *)ddraw_from_ddraw3(This), a, b, c, d, e);
978 static HRESULT WINAPI
979 IDirectDraw4Impl_SetDisplayMode(LPDIRECTDRAW4 This, DWORD a, DWORD b, DWORD c,
982 return IDirectDraw7_SetDisplayMode((IDirectDraw7 *)ddraw_from_ddraw4(This), a, b, c, d, e);
985 static HRESULT WINAPI
986 IDirectDrawImpl_WaitForVerticalBlank(LPDIRECTDRAW This, DWORD dwFlags,
989 return IDirectDraw7_WaitForVerticalBlank((IDirectDraw7 *)ddraw_from_ddraw1(This), dwFlags, hEvent);
992 static HRESULT WINAPI
993 IDirectDraw2Impl_WaitForVerticalBlank(LPDIRECTDRAW2 This, DWORD dwFlags,
996 return IDirectDraw7_WaitForVerticalBlank((IDirectDraw7 *)ddraw_from_ddraw2(This), dwFlags, hEvent);
999 static HRESULT WINAPI
1000 IDirectDraw3Impl_WaitForVerticalBlank(LPDIRECTDRAW3 This, DWORD dwFlags,
1003 return IDirectDraw7_WaitForVerticalBlank((IDirectDraw7 *)ddraw_from_ddraw3(This), dwFlags, hEvent);
1006 static HRESULT WINAPI
1007 IDirectDraw4Impl_WaitForVerticalBlank(LPDIRECTDRAW4 This, DWORD dwFlags,
1010 return IDirectDraw7_WaitForVerticalBlank((IDirectDraw7 *)ddraw_from_ddraw4(This), dwFlags, hEvent);
1013 static HRESULT WINAPI
1014 IDirectDraw2Impl_GetAvailableVidMem(LPDIRECTDRAW2 This, LPDDSCAPS pCaps,
1015 LPDWORD pdwTotal, LPDWORD pdwFree)
1018 DDRAW_Convert_DDSCAPS_1_To_2(pCaps, &Caps2);
1020 return IDirectDraw7_GetAvailableVidMem((IDirectDraw7 *)ddraw_from_ddraw2(This), &Caps2, pdwTotal, pdwFree);
1023 static HRESULT WINAPI
1024 IDirectDraw3Impl_GetAvailableVidMem(LPDIRECTDRAW3 This, LPDDSCAPS pCaps,
1025 LPDWORD pdwTotal, LPDWORD pdwFree)
1028 DDRAW_Convert_DDSCAPS_1_To_2(pCaps, &Caps2);
1030 return IDirectDraw7_GetAvailableVidMem((IDirectDraw7 *)ddraw_from_ddraw3(This), &Caps2, pdwTotal, pdwFree);
1033 static HRESULT WINAPI
1034 IDirectDraw4Impl_GetAvailableVidMem(LPDIRECTDRAW4 This, LPDDSCAPS2 pCaps,
1035 LPDWORD pdwTotal, LPDWORD pdwFree)
1037 return IDirectDraw7_GetAvailableVidMem((IDirectDraw7 *)ddraw_from_ddraw4(This), pCaps, pdwTotal, pdwFree);
1040 static HRESULT WINAPI
1041 IDirectDraw3Impl_GetSurfaceFromDC(LPDIRECTDRAW3 This, HDC hDC,
1042 LPDIRECTDRAWSURFACE *pSurf)
1044 return IDirectDraw7_GetSurfaceFromDC((IDirectDraw7 *)ddraw_from_ddraw3(This), hDC, (LPDIRECTDRAWSURFACE7 *)pSurf);
1047 static HRESULT WINAPI
1048 IDirectDraw4Impl_GetSurfaceFromDC(LPDIRECTDRAW4 This, HDC hDC,
1049 LPDIRECTDRAWSURFACE4 *pSurf)
1051 return IDirectDraw7_GetSurfaceFromDC((IDirectDraw7 *)ddraw_from_ddraw4(This), hDC, (LPDIRECTDRAWSURFACE7 *)pSurf);
1054 static HRESULT WINAPI
1055 IDirectDraw4Impl_RestoreAllSurfaces(LPDIRECTDRAW4 This)
1057 return IDirectDraw7_RestoreAllSurfaces((IDirectDraw7 *)ddraw_from_ddraw4(This));
1060 static HRESULT WINAPI
1061 IDirectDraw4Impl_TestCooperativeLevel(LPDIRECTDRAW4 This)
1063 return IDirectDraw7_TestCooperativeLevel((IDirectDraw7 *)ddraw_from_ddraw4(This));
1066 static HRESULT WINAPI
1067 IDirectDraw4Impl_GetDeviceIdentifier(LPDIRECTDRAW4 This,
1068 LPDDDEVICEIDENTIFIER pDDDI, DWORD dwFlags)
1070 DDDEVICEIDENTIFIER2 DDDI2;
1073 hr = IDirectDraw7_GetDeviceIdentifier((IDirectDraw7 *)ddraw_from_ddraw4(This), &DDDI2, dwFlags);
1075 DDRAW_Convert_DDDEVICEIDENTIFIER_2_To_1(&DDDI2, pDDDI);
1080 const IDirectDrawVtbl IDirectDraw1_Vtbl =
1082 IDirectDrawImpl_QueryInterface,
1083 IDirectDrawImpl_AddRef,
1084 IDirectDrawImpl_Release,
1085 IDirectDrawImpl_Compact,
1086 IDirectDrawImpl_CreateClipper,
1087 IDirectDrawImpl_CreatePalette,
1088 IDirectDrawImpl_CreateSurface,
1089 IDirectDrawImpl_DuplicateSurface,
1090 IDirectDrawImpl_EnumDisplayModes,
1091 IDirectDrawImpl_EnumSurfaces,
1092 IDirectDrawImpl_FlipToGDISurface,
1093 IDirectDrawImpl_GetCaps,
1094 IDirectDrawImpl_GetDisplayMode,
1095 IDirectDrawImpl_GetFourCCCodes,
1096 IDirectDrawImpl_GetGDISurface,
1097 IDirectDrawImpl_GetMonitorFrequency,
1098 IDirectDrawImpl_GetScanLine,
1099 IDirectDrawImpl_GetVerticalBlankStatus,
1100 IDirectDrawImpl_Initialize,
1101 IDirectDrawImpl_RestoreDisplayMode,
1102 IDirectDrawImpl_SetCooperativeLevel,
1103 IDirectDrawImpl_SetDisplayMode,
1104 IDirectDrawImpl_WaitForVerticalBlank,
1107 const IDirectDraw2Vtbl IDirectDraw2_Vtbl =
1109 IDirectDraw2Impl_QueryInterface,
1110 IDirectDraw2Impl_AddRef,
1111 IDirectDraw2Impl_Release,
1112 IDirectDraw2Impl_Compact,
1113 IDirectDraw2Impl_CreateClipper,
1114 IDirectDraw2Impl_CreatePalette,
1115 IDirectDraw2Impl_CreateSurface,
1116 IDirectDraw2Impl_DuplicateSurface,
1117 IDirectDraw2Impl_EnumDisplayModes,
1118 IDirectDraw2Impl_EnumSurfaces,
1119 IDirectDraw2Impl_FlipToGDISurface,
1120 IDirectDraw2Impl_GetCaps,
1121 IDirectDraw2Impl_GetDisplayMode,
1122 IDirectDraw2Impl_GetFourCCCodes,
1123 IDirectDraw2Impl_GetGDISurface,
1124 IDirectDraw2Impl_GetMonitorFrequency,
1125 IDirectDraw2Impl_GetScanLine,
1126 IDirectDraw2Impl_GetVerticalBlankStatus,
1127 IDirectDraw2Impl_Initialize,
1128 IDirectDraw2Impl_RestoreDisplayMode,
1129 IDirectDraw2Impl_SetCooperativeLevel,
1130 IDirectDraw2Impl_SetDisplayMode,
1131 IDirectDraw2Impl_WaitForVerticalBlank,
1132 IDirectDraw2Impl_GetAvailableVidMem
1135 const IDirectDraw3Vtbl IDirectDraw3_Vtbl =
1137 IDirectDraw3Impl_QueryInterface,
1138 IDirectDraw3Impl_AddRef,
1139 IDirectDraw3Impl_Release,
1140 IDirectDraw3Impl_Compact,
1141 IDirectDraw3Impl_CreateClipper,
1142 IDirectDraw3Impl_CreatePalette,
1143 IDirectDraw3Impl_CreateSurface,
1144 IDirectDraw3Impl_DuplicateSurface,
1145 IDirectDraw3Impl_EnumDisplayModes,
1146 IDirectDraw3Impl_EnumSurfaces,
1147 IDirectDraw3Impl_FlipToGDISurface,
1148 IDirectDraw3Impl_GetCaps,
1149 IDirectDraw3Impl_GetDisplayMode,
1150 IDirectDraw3Impl_GetFourCCCodes,
1151 IDirectDraw3Impl_GetGDISurface,
1152 IDirectDraw3Impl_GetMonitorFrequency,
1153 IDirectDraw3Impl_GetScanLine,
1154 IDirectDraw3Impl_GetVerticalBlankStatus,
1155 IDirectDraw3Impl_Initialize,
1156 IDirectDraw3Impl_RestoreDisplayMode,
1157 IDirectDraw3Impl_SetCooperativeLevel,
1158 IDirectDraw3Impl_SetDisplayMode,
1159 IDirectDraw3Impl_WaitForVerticalBlank,
1160 IDirectDraw3Impl_GetAvailableVidMem,
1161 IDirectDraw3Impl_GetSurfaceFromDC,
1164 const IDirectDraw4Vtbl IDirectDraw4_Vtbl =
1166 IDirectDraw4Impl_QueryInterface,
1167 IDirectDraw4Impl_AddRef,
1168 IDirectDraw4Impl_Release,
1169 IDirectDraw4Impl_Compact,
1170 IDirectDraw4Impl_CreateClipper,
1171 IDirectDraw4Impl_CreatePalette,
1172 IDirectDraw4Impl_CreateSurface,
1173 IDirectDraw4Impl_DuplicateSurface,
1174 IDirectDraw4Impl_EnumDisplayModes,
1175 IDirectDraw4Impl_EnumSurfaces,
1176 IDirectDraw4Impl_FlipToGDISurface,
1177 IDirectDraw4Impl_GetCaps,
1178 IDirectDraw4Impl_GetDisplayMode,
1179 IDirectDraw4Impl_GetFourCCCodes,
1180 IDirectDraw4Impl_GetGDISurface,
1181 IDirectDraw4Impl_GetMonitorFrequency,
1182 IDirectDraw4Impl_GetScanLine,
1183 IDirectDraw4Impl_GetVerticalBlankStatus,
1184 IDirectDraw4Impl_Initialize,
1185 IDirectDraw4Impl_RestoreDisplayMode,
1186 IDirectDraw4Impl_SetCooperativeLevel,
1187 IDirectDraw4Impl_SetDisplayMode,
1188 IDirectDraw4Impl_WaitForVerticalBlank,
1189 IDirectDraw4Impl_GetAvailableVidMem,
1190 IDirectDraw4Impl_GetSurfaceFromDC,
1191 IDirectDraw4Impl_RestoreAllSurfaces,
1192 IDirectDraw4Impl_TestCooperativeLevel,
1193 IDirectDraw4Impl_GetDeviceIdentifier