ReactOS 0.4.15-dev-7928-g68a8619
gdientry.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS GDI32
4 * PURPOSE: GDI DirectX interface
5 * FILE: win32ss/gdi/gdi32/misc/gdientry.c
6 * PROGRAMERS: Alex Ionescu (alex@relsoft.net)
7 * Magnus Olsen (magnus@greatlord.com)
8 */
9
10/* INCLUDES ******************************************************************/
11
12#include <precomp.h>
13
14#include <stdio.h>
15#include <d3dhal.h>
16
17/* DATA **********************************************************************/
18
21
22#define GetDdHandle(Handle) ((HANDLE)Handle ? (HANDLE)Handle : ghDirectDraw)
23
24
25
26/* CALLBACKS *****************************************************************/
27
28/*
29 * @implemented
30 *
31 * DdAddAttachedSurface
32 */
36{
37 /* Call win32k */
41}
42
43/*
44 * @implemented
45 *
46 * DdBlt
47 */
51{
52 HANDLE Surface = 0;
53
54 /* Use the right surface */
55 if (Blt->lpDDSrcSurface)
56 {
57 Surface = (HANDLE)Blt->lpDDSrcSurface->hDDSurface;
58 }
59
60 /* Call win32k */
61 return NtGdiDdBlt((HANDLE)Blt->lpDDDestSurface->hDDSurface, Surface, (PDD_BLTDATA)Blt);
62}
63
64/*
65 * @implemented
66 *
67 * DdDestroySurface
68 */
72{
74 BOOL RealDestroy;
75
76 if (pDestroySurface->lpDDSurface->hDDSurface)
77 {
78 /* Check if we shoudl really destroy it */
79 RealDestroy = !(pDestroySurface->lpDDSurface->dwFlags & DDRAWISURF_DRIVERMANAGED) ||
80 !(pDestroySurface->lpDDSurface->dwFlags & DDRAWISURF_INVALID);
81
82 /* Call win32k */
83 Return = NtGdiDdDestroySurface((HANDLE)pDestroySurface->lpDDSurface->hDDSurface, RealDestroy);
84 }
85
86 return Return;
87}
88
89/*
90 * @implemented
91 *
92 * DdFlip
93 */
97{
98 /* Note :
99 * See http://msdn2.microsoft.com/en-us/library/ms794213.aspx and
100 * http://msdn2.microsoft.com/en-us/library/ms792675.aspx
101 */
102
103 HANDLE hSurfaceCurrentLeft = NULL;
104 HANDLE hSurfaceTargetLeft = NULL;
105
106 /* Auto flip off or on */
107 if (Flip->dwFlags & DDFLIP_STEREO )
108 {
109 if ( (Flip->lpSurfTargLeft) &&
110 (Flip->lpSurfCurrLeft))
111 {
112 /* Auto flip on */
113 hSurfaceTargetLeft = (HANDLE) Flip->lpSurfTargLeft->hDDSurface;
114 hSurfaceCurrentLeft = (HANDLE) Flip->lpSurfCurrLeft->hDDSurface;
115 }
116 }
117
118 /* Call win32k */
119 return NtGdiDdFlip( (HANDLE) Flip->lpSurfCurr->hDDSurface,
121 hSurfaceCurrentLeft,
122 hSurfaceTargetLeft,
123 (PDD_FLIPDATA) Flip);
124}
125
126/*
127 * @implemented
128 *
129 * DdLock
130 */
131DWORD
132WINAPI
134{
135
136 /* Call win32k */
137 return NtGdiDdLock((HANDLE)Lock->lpDDSurface->hDDSurface,
139 (HANDLE)Lock->lpDDSurface->hDC);
140}
141
142/*
143 * @implemented
144 *
145 * DdUnlock
146 */
147DWORD
148WINAPI
150{
151 /* Call win32k */
152 return NtGdiDdUnlock((HANDLE)Unlock->lpDDSurface->hDDSurface,
154}
155
156/*
157 * @implemented
158 *
159 * DdGetBltStatus
160 */
161DWORD
162WINAPI
164{
165 /* Call win32k */
166 return NtGdiDdGetBltStatus((HANDLE)GetBltStatus->lpDDSurface->hDDSurface,
167 (PDD_GETBLTSTATUSDATA)GetBltStatus);
168}
169
170/*
171 * @implemented
172 *
173 * DdGetBltStatus
174 */
175DWORD
176WINAPI
178{
179 /* Call win32k */
180 return NtGdiDdGetFlipStatus((HANDLE)GetFlipStatus->lpDDSurface->hDDSurface,
181 (PDD_GETFLIPSTATUSDATA)GetFlipStatus);
182}
183
184/*
185 * @implemented
186 *
187 * DdUpdateOverlay
188 */
189DWORD
190WINAPI
192{
193
194 /* We have to handle this manually here */
195 if (UpdateOverlay->dwFlags & DDOVER_KEYDEST)
196 {
197 /* Use the override */
198 UpdateOverlay->dwFlags &= ~DDOVER_KEYDEST;
199 UpdateOverlay->dwFlags |= DDOVER_KEYDESTOVERRIDE;
200
201 /* Set the overlay */
202 UpdateOverlay->overlayFX.dckDestColorkey =
203 UpdateOverlay->lpDDDestSurface->ddckCKDestOverlay;
204 }
205 if (UpdateOverlay->dwFlags & DDOVER_KEYSRC)
206 {
207 /* Use the override */
208 UpdateOverlay->dwFlags &= ~DDOVER_KEYSRC;
209 UpdateOverlay->dwFlags |= DDOVER_KEYSRCOVERRIDE;
210
211 /* Set the overlay */
212 UpdateOverlay->overlayFX.dckSrcColorkey =
213 UpdateOverlay->lpDDSrcSurface->ddckCKSrcOverlay;
214 }
215
216 /* Call win32k */
218 (HANDLE)UpdateOverlay->lpDDSrcSurface->hDDSurface,
219 (PDD_UPDATEOVERLAYDATA)UpdateOverlay);
220}
221
222/*
223 * @implemented
224 *
225 * DdSetOverlayPosition
226 */
227DWORD
228WINAPI
230{
231 /* Call win32k */
232 return NtGdiDdSetOverlayPosition( (HANDLE)SetOverlayPosition->lpDDSrcSurface->hDDSurface,
233 (HANDLE)SetOverlayPosition->lpDDDestSurface->hDDSurface,
234 (PDD_SETOVERLAYPOSITIONDATA) SetOverlayPosition);
235}
236
237/*
238 * @implemented
239 *
240 * DdWaitForVerticalBlank
241 */
242DWORD
243WINAPI
245{
246 /* Call win32k */
248 WaitForVerticalBlank->lpDD->hDD),
250 WaitForVerticalBlank);
251}
252
253/*
254 * @implemented
255 *
256 * DdCanCreateSurface
257 */
258DWORD
259WINAPI
261{
262 /*
263 * Note : This functions are basic same, in win32k
264 * NtGdiDdCanCreateD3DBuffer and NtGdiDdCanCreateSurface are mergs
265 * toghter in win32k at end and retrurn same data, it is still sepreated
266 * at user mode but in kmode it is not.
267 */
268
269 /* Call win32k */
270 return NtGdiDdCanCreateSurface(GetDdHandle(CanCreateSurface->lpDD->hDD),
271 (PDD_CANCREATESURFACEDATA)CanCreateSurface);
272}
273
274/*
275 * @implemented
276 *
277 * DdCreateSurface
278 */
279DWORD
280WINAPI
282{
284 ULONG SurfaceCount = pCreateSurface->dwSCnt;
285 DD_SURFACE_LOCAL DdSurfaceLocal;
286 DD_SURFACE_MORE DdSurfaceMore;
287 DD_SURFACE_GLOBAL DdSurfaceGlobal;
288
289 HANDLE hPrevSurface, hSurface;
290
291 PDD_SURFACE_LOCAL pDdSurfaceLocal = NULL;
292 PDD_SURFACE_MORE pDdSurfaceMore = NULL;
293 PDD_SURFACE_GLOBAL pDdSurfaceGlobal = NULL;
294
295 PDD_SURFACE_LOCAL ptmpDdSurfaceLocal = NULL;
296 PDD_SURFACE_MORE ptmpDdSurfaceMore = NULL;
297 PDD_SURFACE_GLOBAL ptmpDdSurfaceGlobal = NULL;
298 PHANDLE phSurface = NULL, puhSurface = NULL;
299 ULONG i;
300 LPDDSURFACEDESC pSurfaceDesc = NULL;
301
302 /* TODO: Optimize speed. Most games/dx apps/programs do not want one surface, they want at least two.
303 * So we need increase the stack to contain two surfaces instead of one. This will increase
304 * the speed of the apps when allocating buffers. How to increase the surface stack space:
305 * we need to create a struct for DD_SURFACE_LOCAL DdSurfaceLocal, DD_SURFACE_MORE DdSurfaceMore
306 * DD_SURFACE_GLOBAL DdSurfaceGlobal, HANDLE hPrevSurface, hSurface like
307 * struct { DD_SURFACE_LOCAL DdSurfaceLocal1, DD_SURFACE_LOCAL DdSurfaceLocal2 }
308 * in a way that it may contain two surfaces, maybe even four. We need to watch what is most common before
309 * we create the size. Activate this IF when you start doing the optimze and please also
310 * take reports from users which value they got here.
311 */
312#if 1
313 {
314 char buffer[1024];
315 \
316 sprintf ( buffer, "Function %s : Optimze max to %d Surface ? (%s:%d)\n", __FUNCTION__, (int)SurfaceCount,__FILE__,__LINE__ );
318 }
319#endif
320
321 /* Check how many surfaces there are */
322 if (SurfaceCount != 1)
323 {
324 /* We got more than one surface, so we need to allocate memory for them */
325 pDdSurfaceLocal = (PDD_SURFACE_LOCAL) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (sizeof(DD_SURFACE_LOCAL) * SurfaceCount ));
326 pDdSurfaceMore = (PDD_SURFACE_MORE) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (sizeof(DD_SURFACE_MORE) * SurfaceCount ));
327 pDdSurfaceGlobal = (PDD_SURFACE_GLOBAL) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (sizeof(DD_SURFACE_GLOBAL) * SurfaceCount ));
328 phSurface = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (sizeof(HANDLE) * SurfaceCount ));
329 puhSurface = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (sizeof(HANDLE) * SurfaceCount ));
330
331 /* Check if we successfully allocated all memory we need */
332 if ((pDdSurfaceLocal == NULL) || (pDdSurfaceMore == NULL) || (pDdSurfaceGlobal == NULL) || (phSurface == NULL) || (puhSurface == NULL))
333 {
334 pCreateSurface->ddRVal = DDERR_OUTOFMEMORY;
335
336 if ( pDdSurfaceLocal != NULL )
337 {
338 HeapFree(GetProcessHeap(), 0, pDdSurfaceLocal);
339 }
340
341 if ( pDdSurfaceMore != NULL )
342 {
343 HeapFree(GetProcessHeap(), 0, pDdSurfaceMore);
344 }
345
346 if ( pDdSurfaceGlobal != NULL )
347 {
348 HeapFree(GetProcessHeap(), 0, pDdSurfaceGlobal);
349 }
350
351 if ( phSurface != NULL )
352 {
353 HeapFree(GetProcessHeap(), 0, phSurface);
354 }
355
356 if ( puhSurface != NULL )
357 {
358 HeapFree(GetProcessHeap(), 0, puhSurface);
359 }
360
362 }
363 }
364 else
365 {
366 /* We'll use what we have on the stack */
367 pDdSurfaceLocal = &DdSurfaceLocal;
368 pDdSurfaceMore = &DdSurfaceMore;
369 pDdSurfaceGlobal = &DdSurfaceGlobal;
370 phSurface = &hPrevSurface;
371 puhSurface = &hSurface;
372
373 /* Clear the structures */
374 RtlZeroMemory(&DdSurfaceLocal, sizeof(DdSurfaceLocal));
375 RtlZeroMemory(&DdSurfaceGlobal, sizeof(DdSurfaceGlobal));
376 RtlZeroMemory(&DdSurfaceMore, sizeof(DdSurfaceMore));
377 }
378
379 /* check if we got a surface or not */
380 if (SurfaceCount!=0)
381 {
382 /* Loop for each surface */
383 ptmpDdSurfaceGlobal = pDdSurfaceGlobal;
384 ptmpDdSurfaceLocal = pDdSurfaceLocal;
385 ptmpDdSurfaceMore = pDdSurfaceMore;
386 pSurfaceDesc = pCreateSurface->lpDDSurfaceDesc;
387
388 for (i = 0; i < SurfaceCount; i++)
389 {
390 LPDDRAWI_DDRAWSURFACE_LCL lcl = pCreateSurface->lplpSList[i];
391 LPDDRAWI_DDRAWSURFACE_GBL gpl = pCreateSurface->lplpSList[i]->lpGbl;
392
393 phSurface[i] = (HANDLE)lcl->hDDSurface;
394 ptmpDdSurfaceLocal->ddsCaps.dwCaps = lcl->ddsCaps.dwCaps;
395
396 ptmpDdSurfaceLocal->dwFlags = (ptmpDdSurfaceLocal->dwFlags &
397 (0xB0000000 | DDRAWISURF_INMASTERSPRITELIST |
401 (lcl->dwFlags & DDRAWISURF_DRIVERMANAGED);
402
403 ptmpDdSurfaceGlobal->wWidth = gpl->wWidth;
404 ptmpDdSurfaceGlobal->wHeight = gpl->wHeight;
405 ptmpDdSurfaceGlobal->lPitch = gpl->lPitch;
406 ptmpDdSurfaceGlobal->fpVidMem = gpl->fpVidMem;
407 ptmpDdSurfaceGlobal->dwBlockSizeX = gpl->dwBlockSizeX;
408 ptmpDdSurfaceGlobal->dwBlockSizeY = gpl->dwBlockSizeY;
409
410 if (lcl->dwFlags & DDRAWISURF_HASPIXELFORMAT)
411 {
412 RtlCopyMemory( &ptmpDdSurfaceGlobal->ddpfSurface ,
413 &gpl->ddpfSurface,
414 sizeof(DDPIXELFORMAT));
415
416 ptmpDdSurfaceGlobal->ddpfSurface.dwSize = sizeof(DDPIXELFORMAT);
417 }
418 else
419 {
420 RtlCopyMemory( &ptmpDdSurfaceGlobal->ddpfSurface ,
421 &gpl->lpDD->vmiData.ddpfDisplay,
422 sizeof(DDPIXELFORMAT));
423 }
424
425 /* Note if lcl->lpSurfMore is NULL zero out
426 * ptmpDdSurfaceMore->ddsCapsEx.dwCaps2,
427 * dwCaps3, dwCaps4, ptmpDdSurfaceMore->dwSurfaceHandle
428 */
429 if (lcl->lpSurfMore)
430 {
431 ptmpDdSurfaceMore->ddsCapsEx.dwCaps2 = lcl->lpSurfMore->ddsCapsEx.dwCaps2;
432 ptmpDdSurfaceMore->ddsCapsEx.dwCaps3 = lcl->lpSurfMore->ddsCapsEx.dwCaps3;
433 ptmpDdSurfaceMore->ddsCapsEx.dwCaps4 = lcl->lpSurfMore->ddsCapsEx.dwCaps4;
434 ptmpDdSurfaceMore->dwSurfaceHandle = lcl->lpSurfMore->dwSurfaceHandle;
435 }
436
437
438 /* count to next SurfaceCount */
439 ptmpDdSurfaceGlobal = (PDD_SURFACE_GLOBAL) (((PBYTE) ((ULONG_PTR) ptmpDdSurfaceGlobal)) + sizeof(DD_SURFACE_GLOBAL));
440 ptmpDdSurfaceLocal = (PDD_SURFACE_LOCAL) (((PBYTE) ((ULONG_PTR) ptmpDdSurfaceLocal)) + sizeof(DD_SURFACE_LOCAL));
441 ptmpDdSurfaceMore = (PDD_SURFACE_MORE) (((PBYTE) ((ULONG_PTR) ptmpDdSurfaceMore)) + sizeof(DD_SURFACE_MORE));
442 }
443 }
444
445 /* Call win32k now */
446 pCreateSurface->ddRVal = DDERR_GENERIC;
447
448 Return = NtGdiDdCreateSurface(GetDdHandle(pCreateSurface->lpDD->hDD),
449 (HANDLE *)phSurface,
450 pSurfaceDesc,
451 pDdSurfaceGlobal,
452 pDdSurfaceLocal,
453 pDdSurfaceMore,
454 (PDD_CREATESURFACEDATA)pCreateSurface,
455 puhSurface);
456
457 if (SurfaceCount == 0)
458 {
459 pCreateSurface->ddRVal = DDERR_GENERIC;
460 }
461 else
462 {
463 ptmpDdSurfaceMore = pDdSurfaceMore;
464 ptmpDdSurfaceGlobal = pDdSurfaceGlobal;
465 ptmpDdSurfaceLocal = pDdSurfaceLocal;
466
467 for (i=0; i<SurfaceCount; i++)
468 {
469 LPDDRAWI_DDRAWSURFACE_LCL lcl = pCreateSurface->lplpSList[i];
470 LPDDRAWI_DDRAWSURFACE_GBL gpl = pCreateSurface->lplpSList[i]->lpGbl;
471
472 gpl->lPitch = ptmpDdSurfaceGlobal->lPitch;
473 gpl->fpVidMem = ptmpDdSurfaceGlobal->fpVidMem;
474 gpl->dwBlockSizeX = ptmpDdSurfaceGlobal->dwBlockSizeX;
475 gpl->dwBlockSizeY = ptmpDdSurfaceGlobal->dwBlockSizeY;
476
477 if (lcl->dwFlags & DDRAWISURF_HASPIXELFORMAT)
478 {
479 RtlCopyMemory( &gpl->ddpfSurface, &ptmpDdSurfaceGlobal->ddpfSurface , sizeof(DDPIXELFORMAT));
480 }
481
482 if (pCreateSurface->ddRVal != DD_OK)
483 {
484 gpl->fpVidMem = 0;
485 if (lcl->hDDSurface)
486 {
487 NtGdiDdDeleteSurfaceObject( (HANDLE)lcl->hDDSurface);
488 }
489 lcl->hDDSurface = 0;
490 }
491 else
492 {
493
494 lcl->hDDSurface = (ULONG_PTR) puhSurface[i];
495 }
496
497 lcl->ddsCaps.dwCaps = ptmpDdSurfaceLocal->ddsCaps.dwCaps;
498 if (lcl->lpSurfMore)
499 {
500 lcl->lpSurfMore->ddsCapsEx.dwCaps2 = ptmpDdSurfaceMore->ddsCapsEx.dwCaps2;
501 lcl->lpSurfMore->ddsCapsEx.dwCaps3 = ptmpDdSurfaceMore->ddsCapsEx.dwCaps3;
502 lcl->lpSurfMore->ddsCapsEx.dwCaps4 = ptmpDdSurfaceMore->ddsCapsEx.dwCaps4;
503 }
504
505 /* count to next SurfaceCount */
506 ptmpDdSurfaceGlobal = (PDD_SURFACE_GLOBAL) (((PBYTE) ((ULONG_PTR) ptmpDdSurfaceGlobal)) + sizeof(DD_SURFACE_GLOBAL));
507 ptmpDdSurfaceLocal = (PDD_SURFACE_LOCAL) (((PBYTE) ((ULONG_PTR) ptmpDdSurfaceLocal)) + sizeof(DD_SURFACE_LOCAL));
508 ptmpDdSurfaceMore = (PDD_SURFACE_MORE) (((PBYTE) ((ULONG_PTR) ptmpDdSurfaceMore)) + sizeof(DD_SURFACE_MORE));
509 }
510 }
511
512 /* Check if we have to free all our local allocations */
513 if (SurfaceCount > 1)
514 {
515 if ( pDdSurfaceLocal != NULL )
516 {
517 HeapFree(GetProcessHeap(), 0, pDdSurfaceLocal);
518 }
519
520 if ( pDdSurfaceMore != NULL )
521 {
522 HeapFree(GetProcessHeap(), 0, pDdSurfaceMore);
523 }
524
525 if ( pDdSurfaceGlobal != NULL )
526 {
527 HeapFree(GetProcessHeap(), 0, pDdSurfaceGlobal);
528 }
529
530 if ( phSurface != NULL )
531 {
532 HeapFree(GetProcessHeap(), 0, phSurface);
533 }
534
535 if ( puhSurface != NULL )
536 {
537 HeapFree(GetProcessHeap(), 0, puhSurface);
538 }
539 }
540
541 /* Return */
542 return Return;
543}
544
545/*
546 * @implemented
547 *
548 * DdSetColorKey
549 */
550DWORD
551WINAPI
553{
554 /* Call win32k */
555 return NtGdiDdSetColorKey((HANDLE)pSetColorKey->lpDDSurface->hDDSurface,
556 (PDD_SETCOLORKEYDATA)pSetColorKey);
557}
558
559/*
560 * @implemented
561 *
562 * DdGetScanLine
563 */
564DWORD
565WINAPI
567{
568 /* Call win32k */
569 return NtGdiDdGetScanLine(GetDdHandle(pGetScanLine->lpDD->hDD),
570 (PDD_GETSCANLINEDATA)pGetScanLine);
571}
572
573
574/*
575 * @implemented
576 *
577 * DvpCreateVideoPort
578 */
579BOOL
580WINAPI
582{
583 pDvdCreatePort->lpVideoPort->hDDVideoPort =
585 (PDD_CREATEVPORTDATA) pDvdCreatePort);
586
587 return TRUE;
588}
589
590/*
591 * @implemented
592 *
593 * DvpCreateVideoPort
594 */
595DWORD
596WINAPI
598{
599 return NtGdiDvpDestroyVideoPort(pDvdDestoryPort->lpVideoPort->hDDVideoPort, (PDD_DESTROYVPORTDATA)pDvdDestoryPort);
600}
601
602/*
603 * @implemented
604 *
605 * DvpCreateVideoPort
606 */
607DWORD
608WINAPI
610{
611 return NtGdiDvpFlipVideoPort(pDvdPortFlip->lpVideoPort->hDDVideoPort,
612 (HANDLE)pDvdPortFlip->lpSurfCurr->hDDSurface,
613 (HANDLE)pDvdPortFlip->lpSurfTarg->hDDSurface,
614 (PDD_FLIPVPORTDATA) pDvdPortFlip);
615}
616
617/*
618 * @implemented
619 *
620 * DvpGetVideoPortBandwidth
621 */
622DWORD
623WINAPI
625{
626 return NtGdiDvpGetVideoPortBandwidth(pDvdPortBandWidth->lpVideoPort->hDDVideoPort, (PDD_GETVPORTBANDWIDTHDATA)pDvdPortBandWidth);
627}
628
629/*
630 * @implemented
631 *
632 * DvpColorControl
633 */
634DWORD
635WINAPI
637{
638 return NtGdiDvpColorControl(pDvdPortColorControl->lpVideoPort->hDDVideoPort, (PDD_VPORTCOLORDATA) pDvdPortColorControl);
639}
640
641/*
642 * @implemented
643 *
644 * DvpGetVideoSignalStatus
645 */
646DWORD
647WINAPI
649{
650 return NtGdiDvpGetVideoSignalStatus(pDvdPortVideoSignalStatus->lpVideoPort->hDDVideoPort, (PDD_GETVPORTSIGNALDATA) pDvdPortVideoSignalStatus);
651}
652
653/*
654 * @implemented
655 *
656 * DvpGetVideoPortFlipStatus
657 */
658DWORD
659WINAPI
661{
662 return NtGdiDvpGetVideoPortFlipStatus(GetDdHandle(pDvdPortVideoPortFlipStatus->lpDD->lpGbl->hDD), (PDD_GETVPORTFLIPSTATUSDATA) pDvdPortVideoPortFlipStatus);
663
664}
665
666/*
667 * @implemented
668 *
669 * DvpCanCreateVideoPort
670 */
671DWORD
672WINAPI
674{
675 return NtGdiDvpCanCreateVideoPort(GetDdHandle(pDvdCanCreateVideoPort->lpDD->lpGbl->hDD), (PDD_CANCREATEVPORTDATA) pDvdCanCreateVideoPort);
676}
677/*
678 * @implemented
679 *
680 * DvpWaitForVideoPortSync
681 */
682DWORD
683WINAPI
685{
686 return NtGdiDvpWaitForVideoPortSync(pDvdWaitForVideoPortSync->lpVideoPort->hDDVideoPort, (PDD_WAITFORVPORTSYNCDATA) pDvdWaitForVideoPortSync);
687}
688
689/*
690 * @implemented
691 *
692 * DvpUpdateVideoPort
693 */
694DWORD
695WINAPI
697{
698 /*
699 * Windows XP limit to max 10 handles of videoport surface and Vbi
700 * ReactOS doing same to keep compatible, if it is more that 10
701 * videoport surface or vbi the stack will be curpted in windows xp
702 * ReactOS safe guard againts that
703 *
704 */
705
706 HANDLE phSurfaceVideo[10];
707 HANDLE phSurfaceVbi[10];
708
709 if (pDvdUpdateVideoPort->dwFlags != DDRAWI_VPORTSTOP)
710 {
711 DWORD dwNumAutoflip;
712 DWORD dwNumVBIAutoflip;
713
714 /* Take copy of lplpDDSurface for the handle value will be modify in dxg */
715 dwNumAutoflip = pDvdUpdateVideoPort->dwNumAutoflip;
716 if ((dwNumAutoflip == 0) &&
717 (pDvdUpdateVideoPort->lplpDDSurface == 0))
718 {
719 dwNumAutoflip++;
720 }
721
722 if (dwNumAutoflip != 0)
723 {
724 if (dwNumAutoflip>10)
725 {
726 dwNumAutoflip = 10;
727 }
728 memcpy(phSurfaceVideo,pDvdUpdateVideoPort->lplpDDSurface,dwNumAutoflip*sizeof(HANDLE));
729 }
730
731 /* Take copy of lplpDDVBISurface for the handle value will be modify in dxg */
732 dwNumVBIAutoflip = pDvdUpdateVideoPort->dwNumVBIAutoflip;
733 if ( (dwNumVBIAutoflip == 0) &&
734 (pDvdUpdateVideoPort->lplpDDVBISurface == 0) )
735 {
736 dwNumVBIAutoflip++;
737 }
738
739 if (dwNumVBIAutoflip != 0)
740 {
741 if (dwNumVBIAutoflip>10)
742 {
743 dwNumVBIAutoflip = 10;
744 }
745 memcpy(phSurfaceVbi,pDvdUpdateVideoPort->lplpDDVBISurface,dwNumVBIAutoflip*sizeof(HANDLE));
746 }
747 }
748
749 /* Call Win32k */
750 return NtGdiDvpUpdateVideoPort(pDvdUpdateVideoPort->lpVideoPort->hDDVideoPort,phSurfaceVideo,phSurfaceVbi, (PDD_UPDATEVPORTDATA)pDvdUpdateVideoPort);
751}
752
753/*
754 * @implemented
755 *
756 * DvpWaitForVideoPortSync
757 */
758DWORD
759WINAPI
761{
762 return NtGdiDvpGetVideoPortField(pDvdGetVideoPortField->lpVideoPort->hDDVideoPort, (PDD_GETVPORTFIELDDATA)pDvdGetVideoPortField);
763}
764
765/*
766 * @implemented
767 *
768 * DvpWaitForVideoPortSync
769 */
770DWORD
771WINAPI
773{
774 return NtGdiDvpGetVideoPortInputFormats(pDvdGetVideoPortInputFormat->lpVideoPort->hDDVideoPort, (PDD_GETVPORTINPUTFORMATDATA) pDvdGetVideoPortInputFormat);
775}
776
777/*
778 * @implemented
779 *
780 * DvpGetVideoPortLine
781 */
782DWORD
783WINAPI
785{
786 return NtGdiDvpGetVideoPortLine(pDvdGetVideoPortLine->lpVideoPort->hDDVideoPort, (PDD_GETVPORTLINEDATA)pDvdGetVideoPortLine);
787}
788
789/*
790 * @implemented
791 *
792 * DvpGetVideoPortOutputFormats
793 */
794DWORD
795WINAPI
797{
798 return NtGdiDvpGetVideoPortLine(pDvdGetVideoPortOutputFormat->lpVideoPort->hDDVideoPort, (PDD_GETVPORTLINEDATA)pDvdGetVideoPortOutputFormat);
799}
800
801/*
802 * @implemented
803 *
804 * DvpGetVideoPortConnectInfo
805 */
806DWORD
807WINAPI
809{
810 return NtGdiDvpGetVideoPortConnectInfo( GetDdHandle( pDvdGetVideoPortInfo->lpDD->lpGbl->hDD) , (PDD_GETVPORTCONNECTDATA) pDvdGetVideoPortInfo);
811}
812
813/*
814 * @implemented
815 *
816 * DdGetAvailDriverMemory
817 */
818DWORD
819WINAPI
821{
822 return NtGdiDdGetAvailDriverMemory(GetDdHandle( pDdGetAvailDriverMemory->lpDD->hDD), (PDD_GETAVAILDRIVERMEMORYDATA) pDdGetAvailDriverMemory);
823}
824
825/*
826 * @implemented
827 *
828 * DdAlphaBlt
829 */
830DWORD
831WINAPI
833{
834 HANDLE hDDSrcSurface = 0;
835
836 if (pDdAlphaBlt->lpDDSrcSurface != 0)
837 {
838 hDDSrcSurface = (HANDLE) pDdAlphaBlt->lpDDSrcSurface->hDDSurface;
839 }
840
841 return NtGdiDdAlphaBlt((HANDLE)pDdAlphaBlt->lpDDDestSurface->hDDSurface, hDDSrcSurface, (PDD_BLTDATA)&pDdAlphaBlt);
842}
843
844/*
845 * @implemented
846 *
847 * DdCreateSurfaceEx
848 */
849DWORD
850WINAPI
852{
853 pDdCreateSurfaceEx->ddRVal = NtGdiDdCreateSurfaceEx( GetDdHandle(pDdCreateSurfaceEx->lpDDLcl->lpGbl->hDD),
854 (HANDLE)pDdCreateSurfaceEx->lpDDSLcl->hDDSurface,
855 pDdCreateSurfaceEx->lpDDSLcl->lpSurfMore->dwSurfaceHandle);
856 return TRUE;
857}
858
859/*
860 * @implemented
861 *
862 * DdColorControl
863 */
864DWORD
865WINAPI
867{
868 return NtGdiDdColorControl( (HANDLE) pDdColorControl->lpDDSurface->hDDSurface, (PDD_COLORCONTROLDATA) &pDdColorControl);
869}
870
871/*
872 * @implemented
873 *
874 * DdSetExclusiveMode
875 */
876DWORD
877WINAPI
879{
880 return NtGdiDdSetExclusiveMode( GetDdHandle(pDdSetExclusiveMode->lpDD->hDD), (PDD_SETEXCLUSIVEMODEDATA) &pDdSetExclusiveMode);
881}
882
883/*
884 * @implemented
885 *
886 * DdFlipToGDISurface
887 */
888DWORD
889WINAPI
891{
892 return NtGdiDdFlipToGDISurface( GetDdHandle(pDdFlipToGDISurface->lpDD->hDD), (PDD_FLIPTOGDISURFACEDATA) &pDdFlipToGDISurface);
893}
894
895/* TODO */
896DWORD
897WINAPI
899{
900 DDHAL_GETDRIVERINFODATA pDrvInfoData;
902 HANDLE hDD;
903
904 /* FIXME add SEH around this functions */
905
906 RtlZeroMemory(&pDrvInfoData, sizeof (DDHAL_GETDRIVERINFODATA));
907 RtlCopyMemory(&pDrvInfoData.guidInfo, &pData->guidInfo, sizeof(GUID));
908
909 hDD = GetDdHandle(pData->dwContext);
910
911 pDrvInfoData.dwSize = sizeof (DDHAL_GETDRIVERINFODATA);
912 pDrvInfoData.ddRVal = DDERR_GENERIC;
913 pDrvInfoData.dwContext = (ULONG_PTR)hDD;
914
915
916 /* Videoport Callbacks check and setup for DirectX/ ReactX */
917 if (IsEqualGUID(&pData->guidInfo, &GUID_VideoPortCallbacks))
918 {
921
922 /* Clear internal out buffer and set it up*/
925
926 /* set up internal buffer */
927 pDrvInfoData.lpvData = (PVOID)&pDvdPort;
929
930 /* Call win32k */
931 retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
932
933 /* Setup user out buffer and convert kmode callbacks to user mode */
934 pUserDvdPort->dwSize = DDVIDEOPORTCALLBACKSSIZE;
935 pUserDvdPort->dwFlags = pDrvInfoData.dwFlags = 0;
936
937 pUserDvdPort->dwFlags = (pDrvInfoData.dwFlags & ~(DDHAL_VPORT32_CREATEVIDEOPORT | DDHAL_VPORT32_FLIP |
941
942 pData->dwActualSize = DDVIDEOPORTCALLBACKSSIZE;
947
948 if (pDvdPort.CanCreateVideoPort)
949 {
951 }
952
953 if (pDvdPort.GetVideoPortBandwidth)
954 {
956 }
957
958 if (pDvdPort.GetVideoPortInputFormats)
959 {
961 }
962
963 if (pDvdPort.GetVideoPortOutputFormats)
964 {
966 }
967
968 if (pDvdPort.GetVideoPortField)
969 {
971 }
972
973 if (pDvdPort.GetVideoPortLine)
974 {
976 }
977
978 if (pDvdPort.GetVideoPortConnectInfo)
979 {
981 }
982
983 if (pDvdPort.GetVideoPortFlipStatus)
984 {
986 }
987
988 if (pDvdPort.WaitForVideoPortSync)
989 {
991 }
992
993 if (pDvdPort.GetVideoSignalStatus)
994 {
996 }
997
998 if (pDvdPort.ColorControl)
999 {
1001 }
1002
1003 /* Windows XP never repot back the true return value,
1004 * it only report back if we have a driver or not
1005 * ReactOS keep this behoir to be compatible with
1006 * Windows XP
1007 */
1008 pData->ddRVal = retValue;
1009 }
1010
1011 /* Color Control Callbacks check and setup for DirectX/ ReactX */
1012 if (IsEqualGUID(&pData->guidInfo, &GUID_ColorControlCallbacks))
1013 {
1014 DDHAL_DDCOLORCONTROLCALLBACKS pColorControl;
1015 DDHAL_DDCOLORCONTROLCALLBACKS* pUserColorControl = (DDHAL_DDCOLORCONTROLCALLBACKS *)pData->lpvData;
1016
1017 /* Clear internal out buffer and set it up*/
1019 pColorControl.dwSize = DDCOLORCONTROLCALLBACKSSIZE;
1020
1021 /* set up internal buffer */
1022 pDrvInfoData.lpvData = (PVOID)&pColorControl;
1024
1025 /* Call win32k */
1026 retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
1027
1028 pData->dwActualSize = DDCOLORCONTROLCALLBACKSSIZE;
1029 pData->dwFlags = pDrvInfoData.dwFlags;
1030
1031 pUserColorControl->dwSize = DDCOLORCONTROLCALLBACKSSIZE;
1032 pUserColorControl->dwFlags = pColorControl.dwFlags;
1033
1034 if (pColorControl.ColorControl != NULL)
1035 {
1037 }
1038
1039 /* Windows XP never repot back the true return value,
1040 * it only report back if we have a driver or not
1041 * ReactOS keep this behoir to be compatible with
1042 * Windows XP
1043 */
1044 pData->ddRVal = retValue;
1045 }
1046
1047 /* Misc Callbacks check and setup for DirectX/ ReactX */
1048 else if (IsEqualGUID(&pData->guidInfo, &GUID_MiscellaneousCallbacks))
1049 {
1052
1053 /* Clear internal out buffer and set it up*/
1056
1057 /* set up internal buffer */
1058 pDrvInfoData.lpvData = (PVOID)&pMisc;
1060
1061 /* Call win32k */
1062 retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
1063
1064 pData->dwActualSize = DDMISCELLANEOUSCALLBACKSSIZE;
1065
1066 /* Only one callbacks are supported */
1069
1070 /* This callbacks are only for win9x and theirfor it is not longer use in NT or ReactOS
1071 * pUserMisc->UpdateNonLocalHeap;
1072 * pUserMisc->GetHeapAlignment;
1073 * pUserMisc->GetSysmemBltStatus; */
1074
1075 /* Windows XP never repot back the true return value,
1076 * it only report back if we have a driver or not
1077 * ReactOS keep this behoir to be compatible with
1078 * Windows XP
1079 */
1080 pData->ddRVal = retValue;
1081 }
1082
1083 /* Misc 2 Callbacks check and setup for DirectX/ ReactX */
1084 else if (IsEqualGUID(&pData->guidInfo, &GUID_Miscellaneous2Callbacks))
1085 {
1088
1089 /* Clear internal out buffer and set it up*/
1092
1093 /* set up internal buffer */
1094 pDrvInfoData.lpvData = (PVOID)&pMisc;
1096
1097 /* Call win32k */
1098 retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
1099
1100 pData->dwActualSize = DDMISCELLANEOUS2CALLBACKSSIZE;
1101
1102 pUserMisc->dwFlags = pMisc.dwFlags;
1103
1104 /* This functions are not documneted in MSDN for this struct, here is directx/reactx alpha blend */
1105 if ( pMisc.Reserved )
1106 {
1107 pUserMisc->Reserved = (LPVOID) DdAlphaBlt;
1108 }
1109
1110 if ( pMisc.CreateSurfaceEx )
1111 {
1113 }
1114
1115 if ( pMisc.GetDriverState )
1116 {
1118 }
1119
1120 /* NOTE : pUserMisc->DestroyDDLocal is outdated and are not beign tuch */
1121
1122 /* Windows XP never repot back the true return value,
1123 * it only report back if we have a driver or not
1124 * ReactOS keep this behoir to be compatible with
1125 * Windows XP
1126 */
1127 pData->ddRVal = retValue;
1128 }
1129
1130 /* NT Callbacks check and setup for DirectX/ ReactX */
1131 else if (IsEqualGUID(&pData->guidInfo, &GUID_NTCallbacks))
1132 {
1133 /* MS does not have DHAL_* version of this callbacks
1134 * so we are force using PDD_* callbacks here
1135 */
1136 DD_NTCALLBACKS pNtKernel;
1137 PDD_NTCALLBACKS pUserNtKernel = (PDD_NTCALLBACKS)pData->lpvData;
1138
1139 /* Clear internal out buffer and set it up*/
1140 RtlZeroMemory(&pNtKernel, sizeof(DD_NTCALLBACKS));
1141 pNtKernel.dwSize = sizeof(DD_NTCALLBACKS);
1142
1143 /* set up internal buffer */
1144 pDrvInfoData.lpvData = (PVOID)&pNtKernel;
1145 pDrvInfoData.dwExpectedSize = sizeof(DD_NTCALLBACKS) ;
1146
1147 /* Call win32k */
1148 retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
1149
1150 pData->dwActualSize = sizeof(DD_NTCALLBACKS);
1151
1152 pUserNtKernel->dwSize = sizeof(DD_NTCALLBACKS);
1153 pUserNtKernel->dwFlags = pNtKernel.dwFlags;
1154 pUserNtKernel->FreeDriverMemory = 0;
1155
1156 if (pNtKernel.SetExclusiveMode)
1157 {
1159 }
1160
1161 if (pNtKernel.FlipToGDISurface)
1162 {
1164 }
1165
1166 /* Windows XP never repot back the true return value,
1167 * it only report back if we have a driver or not
1168 * ReactOS keep this behoir to be compatible with
1169 * Windows XP
1170 */
1171 pData->ddRVal = retValue;
1172 }
1173
1174 /* D3D Callbacks version 2 check and setup for DirectX/ ReactX */
1175 else if (IsEqualGUID(&pData->guidInfo, &GUID_D3DCallbacks2))
1176 {
1177 // FIXME GUID_D3DCallbacks2
1178 }
1179
1180 /* D3D Callbacks version 3 check and setup for DirectX/ ReactX */
1181 else if (IsEqualGUID(&pData->guidInfo, &GUID_D3DCallbacks3))
1182 {
1183 // FIXME GUID_D3DCallbacks3
1184 }
1185
1186 /* D3DParseUnknownCommand Callbacks check and setup for DirectX/ ReactX */
1187 else if (IsEqualGUID(&pData->guidInfo, &GUID_D3DParseUnknownCommandCallback))
1188 {
1189 // FIXME GUID_D3DParseUnknownCommandCallback
1190 }
1191
1192 /* MotionComp Callbacks check and setup for DirectX/ ReactX */
1193 else if (IsEqualGUID(&pData->guidInfo, &GUID_MotionCompCallbacks))
1194 {
1195 // FIXME GUID_MotionCompCallbacks
1196 }
1197
1198 /* FIXME VPE2 Callbacks check and setup for DirectX/ ReactX */
1199 //else if (IsEqualGUID(&pData->guidInfo, &GUID_VPE2Callbacks))
1200 //{
1201 // FIXME GUID_VPE2Callbacks
1202 //}
1203 else
1204 {
1205 /* set up internal buffer */
1206 pDrvInfoData.dwExpectedSize = pData->dwExpectedSize;
1207 pDrvInfoData.lpvData = pData->lpvData;
1208
1209 /* We do not cover all callbacks for user mode, they are only cover by kmode */
1210 retValue = NtGdiDdGetDriverInfo(hDD, (PDD_GETDRIVERINFODATA)&pDrvInfoData);
1211
1212 /* Setup return data */
1213 pData->dwActualSize = pDrvInfoData.dwActualSize;
1214 pData->lpvData = pDrvInfoData.lpvData;
1215 /* Windows XP never repot back the true return value,
1216 * it only report back if we have a driver or not
1217 * ReactOS keep this behoir to be compatible with
1218 * Windows XP
1219 */
1220 pData->ddRVal = retValue;
1221 }
1222
1223 return retValue;
1224}
1225
1226
1227/*
1228 * @implemented
1229 *
1230 * D3dContextCreate
1231 */
1232BOOL
1233WINAPI
1235{
1236 HANDLE hSurfZ = NULL;
1237
1238 if (pdcci->lpDDSZLcl)
1239 {
1240 hSurfZ = (HANDLE)pdcci->lpDDSZLcl->hDDSurface;
1241 }
1242
1243 return NtGdiD3dContextCreate(GetDdHandle(pdcci->lpDDLcl->hDD),
1244 (HANDLE)pdcci->lpDDSLcl->hDDSurface,
1245 hSurfZ,
1246 (D3DNTHAL_CONTEXTCREATEI *)pdcci);
1247}
1248
1249/*
1250 * @implemented
1251 *
1252 * DdCanCreateD3DBuffer
1253 */
1254DWORD
1255WINAPI
1257{
1258 /*
1259 * Note : This functions are basic same, in win32k
1260 * NtGdiDdCanCreateD3DBuffer and NtGdiDdCanCreateSurface are mergs
1261 * toghter in win32k at end and retrurn same data, it is still sepreated
1262 * at user mode but in kmode it is not.
1263 */
1264
1265 /* Call win32k */
1266 return NtGdiDdCanCreateD3DBuffer(GetDdHandle(CanCreateD3DBuffer->lpDD->hDD),
1267 (PDD_CANCREATESURFACEDATA)CanCreateD3DBuffer);
1268}
1269
1270
1271/*
1272 * @implemented
1273 *
1274 * DdCreateD3DBuffer
1275 */
1276DWORD
1277WINAPI
1279{
1280 HANDLE puhSurface = 0;
1281 DDRAWI_DDRAWSURFACE_GBL *pSurfGBL;
1282 DDRAWI_DDRAWSURFACE_LCL *pSurfLcl;
1283 DD_SURFACE_GLOBAL puSurfaceGlobalData;
1284 DD_SURFACE_MORE puSurfaceMoreData;
1285 DD_SURFACE_LOCAL puSurfaceLocalData;
1286 DWORD retValue;
1287
1288 /* Zero all local memory pointer */
1289 RtlZeroMemory(&puSurfaceGlobalData, sizeof(DD_SURFACE_GLOBAL) );
1290 RtlZeroMemory(&puSurfaceMoreData, sizeof(DD_SURFACE_MORE) ) ;
1291 RtlZeroMemory(&puSurfaceLocalData, sizeof(DD_SURFACE_LOCAL) );
1292
1293 pCreateSurface->dwSCnt = 1;
1294 pSurfLcl = pCreateSurface->lplpSList[0];
1295 pSurfGBL = pSurfLcl->lpGbl;
1296
1297 /* Convert DDRAWI_DDRAWSURFACE_GBL to DD_SURFACE_GLOBAL */
1298 puSurfaceGlobalData.wWidth = pSurfGBL->wWidth;
1299 puSurfaceGlobalData.wHeight = pSurfGBL->wHeight;
1300 puSurfaceGlobalData.dwLinearSize = pSurfGBL->dwLinearSize;
1301 puSurfaceGlobalData.fpVidMem = pSurfGBL->fpVidMem;
1302 puSurfaceGlobalData.dwBlockSizeX = pSurfGBL->dwBlockSizeX;
1303 puSurfaceGlobalData.dwBlockSizeY = pSurfGBL->dwBlockSizeY;
1304
1305 /* Convert DDRAWI_DDRAWSURFACE_MORE to DD_SURFACE_MORE */
1306 puSurfaceMoreData.dwSurfaceHandle = pSurfLcl->lpSurfMore->dwSurfaceHandle;
1307 puSurfaceMoreData.ddsCapsEx.dwCaps2 = pSurfLcl->lpSurfMore->ddsCapsEx.dwCaps2;
1308 puSurfaceMoreData.ddsCapsEx.dwCaps3 = pSurfLcl->lpSurfMore->ddsCapsEx.dwCaps3;
1309 puSurfaceMoreData.ddsCapsEx.dwCaps4 = pSurfLcl->lpSurfMore->ddsCapsEx.dwCaps4;
1310
1311 /* Convert DDRAWI_DDRAWSURFACE_LCL to DD_SURFACE_LOCAL */
1312 puSurfaceLocalData.dwFlags = pSurfLcl->dwFlags;
1313 puSurfaceLocalData.ddsCaps.dwCaps = pSurfLcl->ddsCaps.dwCaps;
1314
1315 /* Call win32k */
1316 retValue = NtGdiDdCreateD3DBuffer( GetDdHandle(pCreateSurface->lpDD->hDD),
1317 (HANDLE*)&pSurfLcl->hDDSurface,
1318 pCreateSurface->lpDDSurfaceDesc,
1319 &puSurfaceGlobalData,
1320 &puSurfaceLocalData,
1321 &puSurfaceMoreData,
1322 (DD_CREATESURFACEDATA *) pCreateSurface,
1323 &puhSurface);
1324
1325 /* Setup surface handle if we got one back */
1326 if ( puhSurface != NULL )
1327 {
1328 pCreateSurface->lplpSList[0]->hDDSurface = (ULONG_PTR)puhSurface;
1329 }
1330
1331 /* Convert DD_SURFACE_GLOBAL to DDRAWI_DDRAWSURFACE_GBL */
1332 pSurfGBL->dwLinearSize = puSurfaceGlobalData.dwLinearSize;
1333 pSurfGBL->fpVidMem = puSurfaceGlobalData.fpVidMem;
1334 pSurfGBL->dwBlockSizeX = puSurfaceGlobalData.dwBlockSizeX;
1335 pSurfGBL->dwBlockSizeY = puSurfaceGlobalData.dwBlockSizeY;
1336
1337 return retValue;
1338}
1339
1340/*
1341 * @implemented
1342 *
1343 * DdDestroyD3DBuffer
1344 */
1345DWORD
1346WINAPI
1348{
1349 DWORD retValue = 0;
1350 if ( pDestroySurface->lpDDSurface->hDDSurface)
1351 {
1352 /* Call win32k */
1353 retValue = NtGdiDdDestroyD3DBuffer((HANDLE)pDestroySurface->lpDDSurface->hDDSurface);
1354 }
1355
1356 return retValue;
1357}
1358
1359/*
1360 * @implemented
1361 *
1362 * DdLockD3D
1363 */
1364DWORD
1365WINAPI
1367{
1368
1369 /* Call win32k */
1370 return NtGdiDdLockD3D((HANDLE)Lock->lpDDSurface->hDDSurface, (PDD_LOCKDATA)Lock);
1371}
1372
1373/*
1374 * @implemented
1375 *
1376 * DdUnlockD3D
1377 */
1378DWORD
1379WINAPI
1381{
1382 /* Call win32k */
1383 return NtGdiDdUnlock((HANDLE)Unlock->lpDDSurface->hDDSurface,
1385}
1386
1387
1388/* PRIVATE FUNCTIONS *********************************************************/
1389
1390BOOL
1391WINAPI
1393 BOOL bComplete)
1394{
1395 DD_SURFACE_LOCAL SurfaceLocal;
1396 DD_SURFACE_GLOBAL SurfaceGlobal;
1397 DD_SURFACE_MORE SurfaceMore;
1398
1399 /* Zero struct */
1400 RtlZeroMemory(&SurfaceLocal, sizeof(DD_SURFACE_LOCAL));
1401 RtlZeroMemory(&SurfaceGlobal, sizeof(DD_SURFACE_GLOBAL));
1402 RtlZeroMemory(&SurfaceMore, sizeof(DD_SURFACE_MORE));
1403
1404 /* Set up SurfaceLocal struct */
1405 SurfaceLocal.ddsCaps.dwCaps = pSurface->ddsCaps.dwCaps;
1406 SurfaceLocal.dwFlags = pSurface->dwFlags;
1407
1408 /* Set up SurfaceMore struct */
1409 RtlMoveMemory(&SurfaceMore.ddsCapsEx,
1410 &pSurface->ddckCKDestBlt,
1411 sizeof(DDSCAPSEX));
1412 SurfaceMore.dwSurfaceHandle = pSurface->lpSurfMore->dwSurfaceHandle;
1413
1414 /* Set up SurfaceGlobal struct */
1415 SurfaceGlobal.fpVidMem = pSurface->lpGbl->fpVidMem;
1416 SurfaceGlobal.dwLinearSize = pSurface->lpGbl->dwLinearSize;
1417 SurfaceGlobal.wHeight = pSurface->lpGbl->wHeight;
1418 SurfaceGlobal.wWidth = pSurface->lpGbl->wWidth;
1419
1420 /* Check if we have a pixel format */
1421 if (pSurface->dwFlags & DDSD_PIXELFORMAT)
1422 {
1423 /* Use global one */
1424 SurfaceGlobal.ddpfSurface = pSurface->lpGbl->lpDD->vmiData.ddpfDisplay;
1425 SurfaceGlobal.ddpfSurface.dwSize = sizeof(DDPIXELFORMAT);
1426 }
1427 else
1428 {
1429 /* Use local one */
1430 SurfaceGlobal.ddpfSurface = pSurface->lpGbl->lpDD->vmiData.ddpfDisplay;
1431 }
1432
1433 /* Create the object */
1434 pSurface->hDDSurface = (DWORD_PTR)NtGdiDdCreateSurfaceObject(GetDdHandle(pSurface->lpGbl->lpDD->hDD),
1435 (HANDLE)pSurface->hDDSurface,
1436 &SurfaceLocal,
1437 &SurfaceMore,
1438 &SurfaceGlobal,
1439 bComplete);
1440
1441 /* Return status */
1442 if (pSurface->hDDSurface) return TRUE;
1443 return FALSE;
1444}
1445
1446/* PUBLIC FUNCTIONS **********************************************************/
1447
1448/*
1449 * @implemented
1450 *
1451 * GDIEntry 1
1452 */
1453BOOL
1454WINAPI
1456 HDC hdc)
1457{
1458 BOOL Return = FALSE;
1459
1460 /* Check if the global hDC (hdc == 0) is being used */
1461 if (!hdc)
1462 {
1463 /* We'll only allow this if the global object doesn't exist yet */
1464 if (!ghDirectDraw)
1465 {
1466 /* Create the DC */
1467 if ((hdc = CreateDCW(L"Display", NULL, NULL, NULL)))
1468 {
1469 /* Create the DDraw Object */
1471
1472 /* Delete our DC */
1473 DeleteDC(hdc);
1474 }
1475 }
1476
1477 /* If we created the object, or had one ...*/
1478 if (ghDirectDraw)
1479 {
1480 /* Increase count and set success */
1481 gcDirectDraw++;
1482 Return = TRUE;
1483 }
1484
1485 /* Zero the handle */
1486 pDirectDrawGlobal->hDD = 0;
1487 }
1488 else
1489 {
1490 /* Using the per-process object, so create it */
1491 pDirectDrawGlobal->hDD = (ULONG_PTR)NtGdiDdCreateDirectDrawObject(hdc);
1492
1493 /* Set the return value */
1494 Return = pDirectDrawGlobal->hDD ? TRUE : FALSE;
1495 }
1496
1497 /* Return to caller */
1498 return Return;
1499}
1500
1501/*
1502 * @implemented
1503 *
1504 * GDIEntry 2
1505 */
1506BOOL
1507WINAPI
1519{
1520 PVIDEOMEMORY VidMemList = NULL;
1521 DD_HALINFO HalInfo;
1522 D3DNTHAL_CALLBACKS D3dCallbacks;
1523 D3DNTHAL_GLOBALDRIVERDATA D3dDriverData;
1524 DD_D3DBUFCALLBACKS D3dBufferCallbacks;
1525 DWORD CallbackFlags[3];
1526 DWORD dwNumHeaps=0, FourCCs=0;
1527 DWORD Flags;
1528 BOOL retVal = TRUE;
1529
1530 /* Clear the structures */
1531 RtlZeroMemory(&HalInfo, sizeof(DD_HALINFO));
1532 RtlZeroMemory(&D3dCallbacks, sizeof(D3DNTHAL_CALLBACKS));
1533 RtlZeroMemory(&D3dDriverData, sizeof(D3DNTHAL_GLOBALDRIVERDATA));
1534 RtlZeroMemory(&D3dBufferCallbacks, sizeof(DD_D3DBUFCALLBACKS));
1535 RtlZeroMemory(CallbackFlags, sizeof(DWORD)*3);
1536
1537 /* Note : XP always alloc 24*sizeof(VIDEOMEMORY) of pvmlist so we change it to it */
1538 if ( (pvmList != NULL) &&
1539 (pHalInfo->vmiData.dwNumHeaps != 0) )
1540 {
1541 VidMemList = (PVIDEOMEMORY) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (sizeof(VIDEOMEMORY) * 24 ) * pHalInfo->vmiData.dwNumHeaps);
1542 }
1543
1544
1545 /* Do the query */
1546 if (!NtGdiDdQueryDirectDrawObject(GetDdHandle(pDirectDrawGlobal->hDD),
1547 &HalInfo,
1548 CallbackFlags,
1549 &D3dCallbacks,
1550 &D3dDriverData,
1551 &D3dBufferCallbacks,
1553 &dwNumHeaps,
1554 VidMemList,
1555 &FourCCs,
1556 pdwFourCC))
1557 {
1558 /* We failed, free the memory and return */
1559 retVal = FALSE;
1560 goto cleanup;
1561 }
1562
1563 /* Clear the incoming pointer */
1565
1566 /* Convert all the data */
1567 pHalInfo->dwSize = sizeof(DDHALINFO);
1568 pHalInfo->lpDDCallbacks = pDDCallbacks;
1571
1572 /* Check for NT5+ D3D Data */
1573 if ( (D3dCallbacks.dwSize != 0) &&
1574 (D3dDriverData.dwSize != 0) )
1575 {
1576 /* Write these down */
1579
1580 /* Check for Buffer Callbacks */
1581 if (D3dBufferCallbacks.dwSize)
1582 {
1583 /* Write this one too */
1585 }
1586 }
1587
1588 /* Continue converting the rest */
1590 pHalInfo->vmiData.dwDisplayWidth = HalInfo.vmiData.dwDisplayWidth;
1591 pHalInfo->vmiData.dwDisplayHeight = HalInfo.vmiData.dwDisplayHeight;
1592 pHalInfo->vmiData.lDisplayPitch = HalInfo.vmiData.lDisplayPitch;
1593 pHalInfo->vmiData.fpPrimary = 0;
1594
1595 RtlCopyMemory( &pHalInfo->vmiData.ddpfDisplay,
1596 &HalInfo.vmiData.ddpfDisplay,
1597 sizeof(DDPIXELFORMAT));
1598
1599 pHalInfo->vmiData.dwOffscreenAlign = HalInfo.vmiData.dwOffscreenAlign;
1600 pHalInfo->vmiData.dwOverlayAlign = HalInfo.vmiData.dwOverlayAlign;
1601 pHalInfo->vmiData.dwTextureAlign = HalInfo.vmiData.dwTextureAlign;
1602 pHalInfo->vmiData.dwZBufferAlign = HalInfo.vmiData.dwZBufferAlign;
1603 pHalInfo->vmiData.dwAlphaAlign = HalInfo.vmiData.dwAlphaAlign;
1604
1605 pHalInfo->vmiData.dwNumHeaps = dwNumHeaps;
1606 pHalInfo->vmiData.pvmList = pvmList;
1607
1608 RtlCopyMemory( &pHalInfo->ddCaps,
1609 &HalInfo.ddCaps,
1610 sizeof(DDCORECAPS ));
1611
1612 pHalInfo->ddCaps.dwNumFourCCCodes = FourCCs;
1613 pHalInfo->lpdwFourCC = pdwFourCC;
1614
1615 /* always force rope 0x1000 for hal it mean only source copy is supported */
1616 pHalInfo->ddCaps.dwRops[6] = 0x1000;
1617
1618 /* Set the HAL flags what ReactX got from the driver
1619 * Windows XP force setting DDHALINFO_GETDRIVERINFOSET if the driver does not set it
1620 * and ReactX doing same to keep compatible with drivers, but the driver are
1621 * force support DdGetDriverInfo acoriding MSDN but it seam some driver do not set
1622 * this flag even it is being supported. that is mean. It is small hack to keep
1623 * bad driver working, that trust this is always being setting by it self at end
1624 */
1625 pHalInfo->dwFlags = (HalInfo.dwFlags & ~DDHALINFO_GETDRIVERINFOSET) | DDHALINFO_GETDRIVERINFOSET;
1627
1628 /* Now check if we got any DD callbacks */
1629 if (pDDCallbacks)
1630 {
1631 /* Zero the structure */
1634
1635 /* Set the flags for this structure
1636 * Windows XP force setting DDHAL_CB32_CREATESURFACE if the driver does not set it
1637 * and ReactX doing same to keep compatible with drivers, but the driver are
1638 * force support pDDCallbacks acoriding MSDN but it seam some driver do not set
1639 * this flag even it is being supported. that is mean. It is small hack to keep
1640 * bad driver working, that trust this is always being setting by it self at end
1641 */
1642 Flags = (CallbackFlags[0] & ~DDHAL_CB32_CREATESURFACE) | DDHAL_CB32_CREATESURFACE;
1644
1645 /* Write the always-on functions */
1646 pDDCallbacks->CreateSurface = DdCreateSurface;
1647
1648 /* Now write the pointers, if applicable */
1650 {
1651 pDDCallbacks->WaitForVerticalBlank = DdWaitForVerticalBlank;
1652 }
1654 {
1655 pDDCallbacks->CanCreateSurface = DdCanCreateSurface;
1656 }
1658 {
1659 pDDCallbacks->GetScanLine = DdGetScanLine;
1660 }
1661 }
1662
1663 /* Check for DD Surface Callbacks */
1665 {
1666 /* Zero the structures */
1669
1670 /* Set the flags for this structure
1671 * Windows XP force setting DDHAL_SURFCB32_LOCK, DDHAL_SURFCB32_UNLOCK,
1672 * DDHAL_SURFCB32_SETCOLORKEY, DDHAL_SURFCB32_DESTROYSURFACE if the driver
1673 * does not set it and ReactX doing same to keep compatible with drivers,
1674 * but the driver are force support pDDSurfaceCallbacks acoriding MSDN but it seam
1675 * some driver do not set this flag even it is being supported. that is mean.
1676 * It is small hack to keep bad driver working, that trust this is always being
1677 * setting by it self at end
1678 */
1679
1680 Flags = (CallbackFlags[1] & ~(DDHAL_SURFCB32_LOCK | DDHAL_SURFCB32_UNLOCK |
1684
1686
1687 /* Write the always-on functions */
1689 pDDSurfaceCallbacks->Unlock = DdUnlock;
1690 pDDSurfaceCallbacks->SetColorKey = DdSetColorKey;
1691 pDDSurfaceCallbacks->DestroySurface = DdDestroySurface;
1692
1693 /* Write the optional ones */
1695 {
1697 }
1699 {
1701 }
1703 {
1704 pDDSurfaceCallbacks->GetBltStatus = DdGetBltStatus;
1705 }
1707 {
1708 pDDSurfaceCallbacks->GetFlipStatus = DdGetFlipStatus;
1709 }
1711 {
1712 pDDSurfaceCallbacks->UpdateOverlay = DdUpdateOverlay;
1713 }
1715 {
1716 pDDSurfaceCallbacks->SetOverlayPosition = DdSetOverlayPosition;
1717 }
1719 {
1720 pDDSurfaceCallbacks->AddAttachedSurface = DdAddAttachedSurface;
1721 }
1722 }
1723
1724 /* Check for DD Palette Callbacks, This interface are dead for user mode,
1725 * only what it can support are being report back.
1726 */
1728 {
1729 /* Zero the struct */
1731
1732 /* Write the header */
1734 pDDPaletteCallbacks->dwFlags = CallbackFlags[2];
1735 }
1736
1737 if (pD3dCallbacks)
1738 {
1739 /* Zero the struct */
1741
1742 /* Check if we have one */
1743 if (D3dCallbacks.dwSize)
1744 {
1745 /* Write the header */
1747
1748 /* Now check for each callback */
1749 if (D3dCallbacks.ContextCreate)
1750 {
1752 }
1753 if (D3dCallbacks.ContextDestroy)
1754 {
1756 }
1757 if (D3dCallbacks.ContextDestroyAll)
1758 {
1760 }
1761 }
1762 }
1763
1764 /* Check for D3D Driver Data */
1765 if (pD3dDriverData)
1766 {
1767 /* Copy the struct */
1768 RtlMoveMemory(pD3dDriverData, &D3dDriverData, sizeof(D3DHAL_GLOBALDRIVERDATA));
1769
1770 /* Write the pointer to the texture formats */
1771 pD3dDriverData->lpTextureFormats = pD3dTextureFormats;
1772 }
1773
1774 /* Check for D3D Buffer Callbacks */
1776 {
1777 /* Zero the struct */
1779
1780 if ( D3dBufferCallbacks.dwSize)
1781 {
1782 pD3dBufferCallbacks->dwSize = D3dBufferCallbacks.dwSize;
1783
1784 pD3dBufferCallbacks->dwFlags = D3dBufferCallbacks.dwFlags;
1785 if ( D3dBufferCallbacks.CanCreateD3DBuffer)
1786 {
1788 }
1789
1790 if (D3dBufferCallbacks.CreateD3DBuffer)
1791 {
1793 }
1794
1795 if ( D3dBufferCallbacks.DestroyD3DBuffer )
1796 {
1798 }
1799
1800 if ( D3dBufferCallbacks.LockD3DBuffer )
1801 {
1803 }
1804
1805 if ( D3dBufferCallbacks.UnlockD3DBuffer )
1806 {
1808 }
1809
1810 }
1811 }
1812
1813 /* FIXME VidMemList */
1814
1815cleanup:
1816 if (VidMemList)
1817 {
1818 HeapFree(GetProcessHeap(), 0, VidMemList);
1819 }
1820
1821 return retVal;
1822}
1823
1824/*
1825 * @implemented
1826 *
1827 * GDIEntry 3
1828 */
1829BOOL
1830WINAPI
1832{
1833 BOOL Return = FALSE;
1834
1835 /* If this is the global object */
1836 if(pDirectDrawGlobal->hDD)
1837 {
1838 /* Free it */
1839 Return = NtGdiDdDeleteDirectDrawObject((HANDLE)pDirectDrawGlobal->hDD);
1840 if (Return)
1841 {
1842 pDirectDrawGlobal->hDD = 0;
1843 }
1844 }
1845 else if (ghDirectDraw)
1846 {
1847 /* Always success here */
1848 Return = TRUE;
1849
1850 /* Make sure this is the last instance */
1851 if (!(--gcDirectDraw))
1852 {
1853 /* Delete the object */
1855 if (Return)
1856 {
1857 ghDirectDraw = 0;
1858 }
1859 }
1860 }
1861
1862 /* Return */
1863 return Return;
1864}
1865
1866/*
1867 * @implemented
1868 *
1869 * GDIEntry 4
1870 */
1871BOOL
1872WINAPI
1874 BOOL bPrimarySurface)
1875{
1876 return bDDCreateSurface(pSurfaceLocal, TRUE);
1877}
1878
1879
1880/*
1881 * @implemented
1882 *
1883 * GDIEntry 5
1884 */
1885BOOL
1886WINAPI
1888{
1889 BOOL Return = FALSE;
1890
1891 /* Make sure there is one */
1892 if (pSurfaceLocal->hDDSurface)
1893 {
1894 /* Delete it */
1895 Return = NtGdiDdDeleteSurfaceObject((HANDLE)pSurfaceLocal->hDDSurface);
1896 pSurfaceLocal->hDDSurface = 0;
1897 }
1898
1899 return Return;
1900}
1901
1902/*
1903 * @implemented
1904 *
1905 * GDIEntry 6
1906 */
1907BOOL
1908WINAPI
1910 HWND hWnd)
1911{
1912 /* Call win32k directly */
1913 return NtGdiDdResetVisrgn((HANDLE) pSurfaceLocal->hDDSurface, hWnd);
1914}
1915
1916/*
1917 * @implemented
1918 *
1919 * GDIEntry 7
1920 */
1921HDC
1922WINAPI
1924 LPPALETTEENTRY pColorTable)
1925{
1926 /* Call win32k directly */
1927 return NtGdiDdGetDC((HANDLE)pSurfaceLocal->hDDSurface, pColorTable);
1928}
1929
1930/*
1931 * @implemented
1932 *
1933 * GDIEntry 8
1934 */
1935BOOL
1936WINAPI
1938{
1939 /* Call win32k directly */
1940 return NtGdiDdReleaseDC((HANDLE) pSurfaceLocal->hDDSurface);
1941}
1942
1943/*
1944 * @unimplemented
1945 * GDIEntry 9
1946 */
1947HBITMAP
1948WINAPI
1951 UINT iUsage,
1952 VOID **ppvBits,
1953 HANDLE hSectionApp,
1955{
1957 return 0;
1958}
1959
1960/*
1961 * @implemented
1962 *
1963 * GDIEntry 10
1964 */
1965BOOL
1966WINAPI
1968 BOOL *pbNewMode)
1969{
1970 /* Call win32k directly */
1971 return NtGdiDdReenableDirectDrawObject(GetDdHandle(pDirectDrawGlobal->hDD),
1972 pbNewMode);
1973}
1974
1975
1976/*
1977 * @implemented
1978 *
1979 * GDIEntry 11
1980 */
1981BOOL
1982WINAPI
1985{
1986 /* Create Surface if it does not exits one */
1987 if (!pSurfaceFrom->hDDSurface)
1988 {
1989 if (!bDDCreateSurface(pSurfaceFrom, FALSE))
1990 {
1991 return FALSE;
1992 }
1993 }
1994
1995 /* Create Surface if it does not exits one */
1996 if (!pSurfaceTo->hDDSurface)
1997 {
1999 {
2000 return FALSE;
2001 }
2002 }
2003
2004 /* Call win32k */
2005 return NtGdiDdAttachSurface((HANDLE)pSurfaceFrom->hDDSurface,
2006 (HANDLE)pSurfaceTo->hDDSurface);
2007}
2008
2009/*
2010 * @implemented
2011 *
2012 * GDIEntry 12
2013 */
2014VOID
2015WINAPI
2017 LPDDRAWI_DDRAWSURFACE_LCL pSurfaceAttached)
2018{
2019 /* Call win32k */
2021 (HANDLE)pSurfaceAttached->hDDSurface);
2022}
2023
2024/*
2025 * @implemented
2026 *
2027 * GDIEntry 13
2028 */
2029ULONG
2030WINAPI
2032{
2034}
2035
2036/*
2037 * @implemented
2038 *
2039 * GDIEntry 14
2040 */
2041HANDLE
2042WINAPI
2045 BOOL bRelease)
2046{
2047 HANDLE hDD = NULL;
2048 HANDLE hSurface = NULL;
2049
2050 /* Check if we already have a surface */
2051 if (!pSurface)
2052 {
2053 /* We don't have one, use the DirectDraw Object handle instead */
2054 hDD = GetDdHandle(pDDraw->lpGbl->hDD);
2055 }
2056 else
2057 {
2058 hSurface = (HANDLE)pSurface->hDDSurface;
2059 }
2060
2061 /* Call the API */
2062 return (HANDLE)NtGdiDdGetDxHandle(hDD, hSurface, bRelease);
2063}
2064
2065/*
2066 * @implemented
2067 *
2068 * GDIEntry 15
2069 */
2070BOOL
2071WINAPI
2073 HDC hdc,
2074 LPVOID lpGammaRamp)
2075{
2076 /* Call win32k directly */
2077 return NtGdiDdSetGammaRamp(GetDdHandle(pDDraw->lpGbl->hDD),
2078 hdc,
2079 lpGammaRamp);
2080}
2081
2082
2083
2084
HWND hWnd
Definition: settings.c:17
DWORD(PASCAL * LPD3DHAL_CONTEXTDESTROYALLCB)(LPD3DHAL_CONTEXTDESTROYALLDATA)
Definition: d3dhal.h:137
DWORD(PASCAL * LPD3DHAL_CONTEXTCREATECB)(LPD3DHAL_CONTEXTCREATEDATA)
Definition: d3dhal.h:135
struct _DDRAWI_DIRECTDRAW_GBL FAR * LPDDRAWI_DIRECTDRAW_GBL
Definition: d3dhal.h:39
DWORD(PASCAL * LPD3DHAL_CONTEXTDESTROYCB)(LPD3DHAL_CONTEXTDESTROYDATA)
Definition: d3dhal.h:136
struct _DDRAWI_DIRECTDRAW_LCL FAR * LPDDRAWI_DIRECTDRAW_LCL
Definition: d3dhal.h:40
struct _DDRAWI_DDRAWSURFACE_LCL FAR * LPDDRAWI_DDRAWSURFACE_LCL
Definition: d3dhal.h:45
#define DdCreateDirectDrawObject
Definition: ddrawgdi.h:24
#define DdQueryDirectDrawObject
Definition: ddrawgdi.h:25
#define DdCreateDIBSection
Definition: ddrawgdi.h:32
#define DdUnattachSurface
Definition: ddrawgdi.h:35
#define DdCreateSurfaceObject
Definition: ddrawgdi.h:27
#define DdDeleteDirectDrawObject
Definition: ddrawgdi.h:26
#define DdReleaseDC
Definition: ddrawgdi.h:31
#define DdResetVisrgn
Definition: ddrawgdi.h:29
#define DdSetGammaRamp
Definition: ddrawgdi.h:38
#define DdReenableDirectDrawObject
Definition: ddrawgdi.h:33
#define DdDeleteSurfaceObject
Definition: ddrawgdi.h:28
#define DdAttachSurface
Definition: ddrawgdi.h:34
#define DdQueryDisplaySettingsUniqueness
Definition: ddrawgdi.h:36
#define DdGetDC
Definition: ddrawgdi.h:30
#define DdGetDxHandle
Definition: ddrawgdi.h:37
#define DDHAL_DRIVER_HANDLED
Definition: ddrawi.h:321
DWORD(PASCAL * LPDDHALVPORTCB_GETFIELD)(LPDDHAL_GETVPORTFIELDDATA)
Definition: ddrawi.h:494
DWORD(PASCAL * LPDDHALEXEBUFCB_DESTROYEXEBUF)(LPDDHAL_DESTROYSURFACEDATA)
Definition: ddrawi.h:424
#define DDRAWISURF_INVALID
Definition: ddrawi.h:1530
DWORD(PASCAL * LPDDHALVPORTCB_CREATEVIDEOPORT)(LPDDHAL_CREATEVPORTDATA)
Definition: ddrawi.h:489
DWORD(PASCAL * LPDDHALEXEBUFCB_UNLOCKEXEBUF)(LPDDHAL_UNLOCKDATA)
Definition: ddrawi.h:426
DWORD(PASCAL * LPDDHALVPORTCB_WAITFORSYNC)(LPDDHAL_WAITFORVPORTSYNCDATA)
Definition: ddrawi.h:500
#define DDHAL_SURFCB32_DESTROYSURFACE
Definition: ddrawi.h:674
DWORD(PASCAL * LPDDHALVPORTCB_GETSIGNALSTATUS)(LPDDHAL_GETVPORTSIGNALDATA)
Definition: ddrawi.h:501
#define DDHAL_VPORT32_UPDATE
Definition: ddrawi.h:712
#define DDRAWI_VPORTSTOP
Definition: ddrawi.h:670
#define DDRAWISURF_DCILOCK
Definition: ddrawi.h:1535
#define DDRAWISURF_INMASTERSPRITELIST
Definition: ddrawi.h:1526
DWORD(PASCAL * LPDDHALEXEBUFCB_LOCKEXEBUF)(LPDDHAL_LOCKDATA)
Definition: ddrawi.h:425
DWORD(PASCAL * LPDDHALVPORTCB_COLORCONTROL)(LPDDHAL_VPORTCOLORDATA)
Definition: ddrawi.h:502
#define DDHAL_VPORT32_WAITFORSYNC
Definition: ddrawi.h:713
#define DDHAL_VPORT32_DESTROY
Definition: ddrawi.h:710
#define DDHAL_SURFCB32_BLT
Definition: ddrawi.h:679
#define DDHAL_SURFCB32_GETFLIPSTATUS
Definition: ddrawi.h:683
#define DDRAWISURF_DRIVERMANAGED
Definition: ddrawi.h:1534
#define DDMISCELLANEOUS2CALLBACKSSIZE
Definition: ddrawi.h:631
DWORD(PASCAL * LPDDHALVPORTCB_GETLINE)(LPDDHAL_GETVPORTLINEDATA)
Definition: ddrawi.h:495
#define DDHAL_MISCCB32_GETAVAILDRIVERMEMORY
Definition: ddrawi.h:688
#define DDMISCELLANEOUSCALLBACKSSIZE
Definition: ddrawi.h:630
#define DDHAL_SURFCB32_LOCK
Definition: ddrawi.h:677
struct _DDHAL_GETDRIVERINFODATA DDHAL_GETDRIVERINFODATA
#define DDHAL_CB32_GETSCANLINE
Definition: ddrawi.h:660
DWORD(PASCAL * LPDDHALVPORTCB_CANCREATEVIDEOPORT)(LPDDHAL_CANCREATEVPORTDATA)
Definition: ddrawi.h:488
DWORD(PASCAL * LPDDHAL_GETAVAILDRIVERMEMORY)(LPDDHAL_GETAVAILDRIVERMEMORYDATA)
Definition: ddrawi.h:442
#define DDHAL_SURFCB32_GETBLTSTATUS
Definition: ddrawi.h:682
struct _DDHAL_DDEXEBUFCALLBACKS DDHAL_DDEXEBUFCALLBACKS
#define DDHAL_SURFCB32_UNLOCK
Definition: ddrawi.h:678
#define DDHAL_SURFCB32_SETOVERLAYPOSITION
Definition: ddrawi.h:685
DWORD(PASCAL * LPDDHALVPORTCB_GETFLIPSTATUS)(LPDDHAL_GETVPORTFLIPSTATUSDATA)
Definition: ddrawi.h:498
#define DDHAL_VPORT32_FLIP
Definition: ddrawi.h:703
#define DDHAL_CB32_CANCREATESURFACE
Definition: ddrawi.h:658
#define DDRAWISURF_DCIBUSY
Definition: ddrawi.h:1531
#define DDHAL_VPORT32_CREATEVIDEOPORT
Definition: ddrawi.h:702
DWORD(PASCAL * LPDDHALVPORTCB_GETOUTPUTFORMATS)(LPDDHAL_GETVPORTOUTPUTFORMATDATA)
Definition: ddrawi.h:493
#define DDRAWISURF_BACKBUFFER
Definition: ddrawi.h:1529
DWORD(PASCAL * LPDDHALEXEBUFCB_CREATEEXEBUF)(LPDDHAL_CREATESURFACEDATA)
Definition: ddrawi.h:423
DWORD(PASCAL * LPDDHALCOLORCB_COLORCONTROL)(LPDDHAL_COLORCONTROLDATA)
Definition: ddrawi.h:527
DWORD(PASCAL * LPDDHAL_GETDRIVERSTATE)(LPDDHAL_GETDRIVERSTATEDATA)
Definition: ddrawi.h:460
#define DDHALINFO_GETDRIVERINFOSET
Definition: ddrawi.h:667
DWORD(PASCAL * LPDDHALVPORTCB_GETINPUTFORMATS)(LPDDHAL_GETVPORTINPUTFORMATDATA)
Definition: ddrawi.h:492
struct _DDHAL_DDSURFACECALLBACKS DDHAL_DDSURFACECALLBACKS
#define DDCOLORCONTROLCALLBACKSSIZE
Definition: ddrawi.h:634
#define DDHAL_SURFCB32_ADDATTACHEDSURFACE
Definition: ddrawi.h:681
struct _DDHAL_DDCALLBACKS DDHAL_DDCALLBACKS
#define DDHAL_SURFCB32_SETCOLORKEY
Definition: ddrawi.h:680
#define DDHAL_SURFCB32_UPDATEOVERLAY
Definition: ddrawi.h:684
DWORD(PASCAL * LPDDHALVPORTCB_UPDATE)(LPDDHAL_UPDATEVPORTDATA)
Definition: ddrawi.h:499
#define DDHAL_CB32_WAITFORVERTICALBLANK
Definition: ddrawi.h:657
#define DDHAL_SURFCB32_FLIP
Definition: ddrawi.h:675
struct _DDHAL_DDPALETTECALLBACKS DDHAL_DDPALETTECALLBACKS
DWORD(PASCAL * LPDDHALVPORTCB_FLIP)(LPDDHAL_FLIPVPORTDATA)
Definition: ddrawi.h:490
#define DDRAWISURF_HASPIXELFORMAT
Definition: ddrawi.h:1515
#define DDRAWISURF_FRONTBUFFER
Definition: ddrawi.h:1528
struct _DDHALINFO DDHALINFO
#define DDHAL_CB32_CREATESURFACE
Definition: ddrawi.h:654
DWORD(PASCAL * LPDDHALVPORTCB_GETVPORTCONNECT)(LPDDHAL_GETVPORTCONNECTDATA)
Definition: ddrawi.h:496
DWORD(PASCAL * LPDDHAL_GETDRIVERINFO)(LPDDHAL_GETDRIVERINFODATA)
Definition: ddrawi.h:593
#define DDVIDEOPORTCALLBACKSSIZE
Definition: ddrawi.h:633
DWORD(PASCAL * LPDDHALEXEBUFCB_CANCREATEEXEBUF)(LPDDHAL_CANCREATESURFACEDATA)
Definition: ddrawi.h:422
DWORD(PASCAL * LPDDHALVPORTCB_DESTROYVPORT)(LPDDHAL_DESTROYVPORTDATA)
Definition: ddrawi.h:497
DWORD(PASCAL * LPDDHAL_CREATESURFACEEX)(LPDDHAL_CREATESURFACEEXDATA)
Definition: ddrawi.h:459
#define DDRAWISURF_HELCB
Definition: ddrawi.h:1527
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
DWORD(PASCAL * LPDDHALVPORTCB_GETBANDWIDTH)(LPDDHAL_GETVPORTBANDWIDTHDATA)
Definition: ddrawi.h:491
DWORD(WINAPI * PDD_SETEXCLUSIVEMODE)(PDD_SETEXCLUSIVEMODEDATA)
Definition: ddrawint.h:597
struct _VIDEOMEMORY * PVIDEOMEMORY
struct _DD_NTCALLBACKS * PDD_NTCALLBACKS
struct _DD_SURFACE_GLOBAL DD_SURFACE_GLOBAL
struct _VIDEOMEMORY VIDEOMEMORY
struct _DD_SURFACE_GLOBAL * PDD_SURFACE_GLOBAL
DWORD(WINAPI * PDD_FLIPTOGDISURFACE)(PDD_FLIPTOGDISURFACEDATA)
Definition: ddrawint.h:606
struct _DD_SURFACE_LOCAL DD_SURFACE_LOCAL
struct _DD_NTCALLBACKS DD_NTCALLBACKS
struct _DD_SURFACE_MORE DD_SURFACE_MORE
struct _DD_SURFACE_LOCAL * PDD_SURFACE_LOCAL
struct _DD_SURFACE_MORE * PDD_SURFACE_MORE
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define GetProcessHeap()
Definition: compat.h:736
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define SetLastError(x)
Definition: compat.h:752
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
static void cleanup(void)
Definition: main.c:1335
#define __FUNCTION__
Definition: types.h:116
#define ULONG_PTR
Definition: config.h:101
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
PGDI_SHARED_HANDLE_TABLE GdiSharedHandleTable
Definition: misc.c:34
DWORD WINAPI DdGetBltStatus(LPDDHAL_GETBLTSTATUSDATA GetBltStatus)
Definition: gdientry.c:163
DWORD WINAPI DvpGetVideoPortBandwidth(LPDDHAL_GETVPORTBANDWIDTHDATA pDvdPortBandWidth)
Definition: gdientry.c:624
BOOL WINAPI D3dContextCreate(LPD3DHAL_CONTEXTCREATEDATA pdcci)
Definition: gdientry.c:1234
DWORD WINAPI DdGetDriverInfo(LPDDHAL_GETDRIVERINFODATA pData)
Definition: gdientry.c:898
DWORD WINAPI DdAddAttachedSurface(LPDDHAL_ADDATTACHEDSURFACEDATA Attach)
Definition: gdientry.c:35
DWORD WINAPI DvpUpdateVideoPort(LPDDHAL_UPDATEVPORTDATA pDvdUpdateVideoPort)
Definition: gdientry.c:696
DWORD WINAPI DdUnlockD3D(LPDDHAL_UNLOCKDATA Unlock)
Definition: gdientry.c:1380
DWORD WINAPI DdSetExclusiveMode(LPDDHAL_SETEXCLUSIVEMODEDATA pDdSetExclusiveMode)
Definition: gdientry.c:878
DWORD WINAPI DdUnlock(LPDDHAL_UNLOCKDATA Unlock)
Definition: gdientry.c:149
BOOL WINAPI DvpCreateVideoPort(LPDDHAL_CREATEVPORTDATA pDvdCreatePort)
Definition: gdientry.c:581
DWORD WINAPI DvpGetVideoPortField(LPDDHAL_FLIPVPORTDATA pDvdGetVideoPortField)
Definition: gdientry.c:760
DWORD WINAPI DvpFlipVideoPort(LPDDHAL_FLIPVPORTDATA pDvdPortFlip)
Definition: gdientry.c:609
DWORD WINAPI DdColorControl(LPDDHAL_COLORCONTROLDATA pDdColorControl)
Definition: gdientry.c:866
DWORD WINAPI DdGetAvailDriverMemory(LPDDHAL_GETAVAILDRIVERMEMORYDATA pDdGetAvailDriverMemory)
Definition: gdientry.c:820
DWORD WINAPI DdUpdateOverlay(LPDDHAL_UPDATEOVERLAYDATA UpdateOverlay)
Definition: gdientry.c:191
DWORD WINAPI DdGetFlipStatus(LPDDHAL_GETFLIPSTATUSDATA GetFlipStatus)
Definition: gdientry.c:177
DWORD WINAPI DdBlt(LPDDHAL_BLTDATA Blt)
Definition: gdientry.c:50
#define GetDdHandle(Handle)
Definition: gdientry.c:22
DWORD WINAPI DdDestroyD3DBuffer(LPDDHAL_DESTROYSURFACEDATA pDestroySurface)
Definition: gdientry.c:1347
DWORD WINAPI DdLock(LPDDHAL_LOCKDATA Lock)
Definition: gdientry.c:133
DWORD WINAPI DvpGetVideoPortConnectInfo(LPDDHAL_GETVPORTCONNECTDATA pDvdGetVideoPortInfo)
Definition: gdientry.c:808
DWORD WINAPI DdCanCreateD3DBuffer(LPDDHAL_CANCREATESURFACEDATA CanCreateD3DBuffer)
Definition: gdientry.c:1256
BOOL WINAPI bDDCreateSurface(LPDDRAWI_DDRAWSURFACE_LCL pSurface, BOOL bComplete)
Definition: gdientry.c:1392
ULONG gcDirectDraw
Definition: gdientry.c:20
DWORD WINAPI DdFlipToGDISurface(LPDDHAL_FLIPTOGDISURFACEDATA pDdFlipToGDISurface)
Definition: gdientry.c:890
DWORD WINAPI DdFlip(LPDDHAL_FLIPDATA Flip)
Definition: gdientry.c:96
DWORD WINAPI DvpColorControl(LPDDHAL_VPORTCOLORDATA pDvdPortColorControl)
Definition: gdientry.c:636
DWORD WINAPI DdDestroySurface(LPDDHAL_DESTROYSURFACEDATA pDestroySurface)
Definition: gdientry.c:71
DWORD WINAPI DvpCanCreateVideoPort(LPDDHAL_CANCREATEVPORTDATA pDvdCanCreateVideoPort)
Definition: gdientry.c:673
DWORD WINAPI DvpGetVideoPortLine(LPDDHAL_GETVPORTLINEDATA pDvdGetVideoPortLine)
Definition: gdientry.c:784
DWORD WINAPI DvpGetVideoPortFlipStatus(LPDDHAL_GETVPORTFLIPSTATUSDATA pDvdPortVideoPortFlipStatus)
Definition: gdientry.c:660
DWORD WINAPI DdCreateSurface(LPDDHAL_CREATESURFACEDATA pCreateSurface)
Definition: gdientry.c:281
DWORD WINAPI DvpGetVideoPortInputFormats(LPDDHAL_GETVPORTINPUTFORMATDATA pDvdGetVideoPortInputFormat)
Definition: gdientry.c:772
DWORD WINAPI DdSetOverlayPosition(LPDDHAL_SETOVERLAYPOSITIONDATA SetOverlayPosition)
Definition: gdientry.c:229
DWORD WINAPI DdCreateSurfaceEx(LPDDHAL_CREATESURFACEEXDATA pDdCreateSurfaceEx)
Definition: gdientry.c:851
HANDLE ghDirectDraw
Definition: gdientry.c:19
DWORD WINAPI DdGetScanLine(LPDDHAL_GETSCANLINEDATA pGetScanLine)
Definition: gdientry.c:566
DWORD WINAPI DvpWaitForVideoPortSync(LPDDHAL_WAITFORVPORTSYNCDATA pDvdWaitForVideoPortSync)
Definition: gdientry.c:684
DWORD WINAPI DdLockD3D(LPDDHAL_LOCKDATA Lock)
Definition: gdientry.c:1366
DWORD WINAPI DdSetColorKey(LPDDHAL_SETCOLORKEYDATA pSetColorKey)
Definition: gdientry.c:552
DWORD WINAPI DdCreateD3DBuffer(LPDDHAL_CREATESURFACEDATA pCreateSurface)
Definition: gdientry.c:1278
DWORD WINAPI DdWaitForVerticalBlank(LPDDHAL_WAITFORVERTICALBLANKDATA WaitForVerticalBlank)
Definition: gdientry.c:244
DWORD WINAPI DvpGetVideoPortOutputFormats(LPDDHAL_GETVPORTLINEDATA pDvdGetVideoPortOutputFormat)
Definition: gdientry.c:796
DWORD WINAPI DdCanCreateSurface(LPDDHAL_CANCREATESURFACEDATA CanCreateSurface)
Definition: gdientry.c:260
DWORD WINAPI DvpDestroyVideoPort(LPDDHAL_DESTROYVPORTDATA pDvdDestoryPort)
Definition: gdientry.c:597
DWORD WINAPI DdAlphaBlt(LPDDHAL_BLTDATA pDdAlphaBlt)
Definition: gdientry.c:832
DWORD WINAPI DvpGetVideoSignalStatus(LPDDHAL_GETVPORTSIGNALDATA pDvdPortVideoSignalStatus)
Definition: gdientry.c:648
GLuint buffer
Definition: glext.h:5915
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void WINAPI SHIM_OBJ_NAME() OutputDebugStringA(LPCSTR lpOutputString)
Definition: ignoredbgout.c:18
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
HDC hdc
Definition: main.c:9
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS LPD3DHAL_CALLBACKS LPD3DHAL_GLOBALDRIVERDATA LPDDHAL_DDEXEBUFCALLBACKS pD3dBufferCallbacks
Definition: main.h:44
LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo
Definition: main.h:121
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS pDDPaletteCallbacks
Definition: main.h:41
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS pDDSurfaceCallbacks
Definition: main.h:40
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS LPD3DHAL_CALLBACKS pD3dCallbacks
Definition: main.h:42
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS LPD3DHAL_CALLBACKS LPD3DHAL_GLOBALDRIVERDATA LPDDHAL_DDEXEBUFCALLBACKS LPDDSURFACEDESC pD3dTextureFormats
Definition: main.h:45
LPDDHALINFO LPDDHAL_DDCALLBACKS pDDCallbacks
Definition: main.h:39
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS LPD3DHAL_CALLBACKS LPD3DHAL_GLOBALDRIVERDATA pD3dDriverData
Definition: main.h:43
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:92
unsigned int UINT
Definition: ndis.h:50
#define LPVOID
Definition: nt_native.h:45
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdQueryDirectDrawObject(_In_ HANDLE hDirectDrawLocal, _Out_ PDD_HALINFO pHalInfo, _Out_writes_(3) DWORD *pCallBackFlags, _Out_opt_ LPD3DNTHAL_CALLBACKS puD3dCallbacks, _Out_opt_ LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData, _Out_opt_ PDD_D3DBUFCALLBACKS puD3dBufferCallbacks, _Out_opt_ LPDDSURFACEDESC puD3dTextureFormats, _Out_ DWORD *puNumHeaps, _Out_opt_ VIDEOMEMORY *puvmList, _Out_ DWORD *puNumFourCC, _Out_opt_ DWORD *puFourCC)
__kernel_entry W32KAPI HDC APIENTRY NtGdiDdGetDC(_In_ HANDLE hSurface, _In_ PALETTEENTRY *puColorTable)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdWaitForVerticalBlank(_In_ HANDLE hDirectDraw, _Inout_ PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpCanCreateVideoPort(_In_ HANDLE hDirectDraw, _Inout_ PDD_CANCREATEVPORTDATA puCanCreateVPortData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdFlipToGDISurface(_In_ HANDLE hDirectDraw, _Inout_ PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData)
_In_ DWORD _In_ DWORD dwOffset
Definition: ntgdi.h:2033
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdSetExclusiveMode(_In_ HANDLE hDirectDraw, _Inout_ PDD_SETEXCLUSIVEMODEDATA puSetExclusiveModeData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdSetOverlayPosition(_In_ HANDLE hSurfaceSource, _In_ HANDLE hSurfaceDestination, _Inout_ PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortInputFormats(_In_ HANDLE hVideoPort, _Inout_ PDD_GETVPORTINPUTFORMATDATA puGetVPortInputFormatData)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdDeleteDirectDrawObject(_In_ HANDLE hDirectDrawLocal)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiD3dContextDestroy(_In_ LPD3DNTHAL_CONTEXTDESTROYDATA pdcdd)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdCreateSurfaceEx(_In_ HANDLE hDirectDraw, _In_ HANDLE hSurface, _In_ DWORD dwSurfaceHandle)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdUnlock(_In_ HANDLE hSurface, _Inout_ PDD_UNLOCKDATA puUnlockData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpFlipVideoPort(_In_ HANDLE hVideoPort, _In_ HANDLE hDDSurfaceCurrent, _In_ HANDLE hDDSurfaceTarget, _Inout_ PDD_FLIPVPORTDATA puFlipVPortData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoSignalStatus(_In_ HANDLE hVideoPort, _Inout_ PDD_GETVPORTSIGNALDATA puGetVPortSignalData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdFlip(_In_ HANDLE hSurfaceCurrent, _In_ HANDLE hSurfaceTarget, _In_ HANDLE hSurfaceCurrentLeft, _In_ HANDLE hSurfaceTargetLeft, _Inout_ PDD_FLIPDATA puFlipData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdSetColorKey(_In_ HANDLE hSurface, _Inout_ PDD_SETCOLORKEYDATA puSetColorKeyData)
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiDdCreateDirectDrawObject(_In_ HDC hdc)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdCreateD3DBuffer(_In_ HANDLE hDirectDraw, _Inout_ HANDLE *hSurface, _Inout_ DDSURFACEDESC *puSurfaceDescription, _Inout_ DD_SURFACE_GLOBAL *puSurfaceGlobalData, _Inout_ DD_SURFACE_LOCAL *puSurfaceLocalData, _Inout_ DD_SURFACE_MORE *puSurfaceMoreData, _Inout_ DD_CREATESURFACEDATA *puCreateSurfaceData, _Inout_ HANDLE *puhSurface)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdSetGammaRamp(_In_ HANDLE hDirectDraw, _In_ HDC hdc, _In_reads_bytes_(sizeof(GAMMARAMP)) LPVOID lpGammaRamp)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpWaitForVideoPortSync(_In_ HANDLE hVideoPort, _Inout_ PDD_WAITFORVPORTSYNCDATA puWaitForVPortSyncData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdUpdateOverlay(_In_ HANDLE hSurfaceDestination, _In_ HANDLE hSurfaceSource, _Inout_ PDD_UPDATEOVERLAYDATA puUpdateOverlayData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdCreateSurface(_In_ HANDLE hDirectDraw, _In_ HANDLE *hSurface, _Inout_ DDSURFACEDESC *puSurfaceDescription, _Inout_ DD_SURFACE_GLOBAL *puSurfaceGlobalData, _Inout_ DD_SURFACE_LOCAL *puSurfaceLocalData, _Inout_ DD_SURFACE_MORE *puSurfaceMoreData, _Inout_ DD_CREATESURFACEDATA *puCreateSurfaceData, _Out_ HANDLE *puhSurface)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdDeleteSurfaceObject(_In_ HANDLE hSurface)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetFlipStatus(_In_ HANDLE hSurface, _Inout_ PDD_GETFLIPSTATUSDATA puGetFlipStatusData)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdReenableDirectDrawObject(_In_ HANDLE hDirectDrawLocal, _Inout_ BOOL *pubNewMode)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetScanLine(_In_ HANDLE hDirectDraw, _Inout_ PDD_GETSCANLINEDATA puGetScanLineData)
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiDvpCreateVideoPort(_In_ HANDLE hDirectDraw, _Inout_ PDD_CREATEVPORTDATA puCreateVPortData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpUpdateVideoPort(_In_ HANDLE hVideoPort, _In_ HANDLE *phSurfaceVideo, _In_ HANDLE *phSurfaceVbi, _Inout_ PDD_UPDATEVPORTDATA puUpdateVPortData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortFlipStatus(_In_ HANDLE hDirectDraw, _Inout_ PDD_GETVPORTFLIPSTATUSDATA puGetVPortFlipStatusData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdLock(_In_ HANDLE hSurface, _Inout_ PDD_LOCKDATA puLockData, _In_ HDC hdcClip)
__kernel_entry W32KAPI NTSTATUS APIENTRY NtGdiDdUnattachSurface(_In_ HANDLE hSurface, _In_ HANDLE hSurfaceAttached)
_In_ HBITMAP _In_ UINT _In_ UINT _Inout_ LPBITMAPINFO pbmi
Definition: ntgdi.h:2780
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpColorControl(_In_ HANDLE hVideoPort, _Inout_ PDD_VPORTCOLORDATA puVPortColorData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortLine(_In_ HANDLE hVideoPort, _Inout_ PDD_GETVPORTLINEDATA puGetVPortLineData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdColorControl(_In_ HANDLE hSurface, _Inout_ PDD_COLORCONTROLDATA puColorControlData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdCanCreateD3DBuffer(_In_ HANDLE hDirectDraw, _Inout_ PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiDdGetDxHandle(_In_opt_ HANDLE hDirectDraw, _In_opt_ HANDLE hSurface, _In_ BOOL bRelease)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdCanCreateSurface(_In_ HANDLE hDirectDraw, _Inout_ PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetBltStatus(_In_ HANDLE hSurface, _Inout_ PDD_GETBLTSTATUSDATA puGetBltStatusData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortField(_In_ HANDLE hVideoPort, _Inout_ PDD_GETVPORTFIELDDATA puGetVPortFieldData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdAddAttachedSurface(_In_ HANDLE hSurface, _In_ HANDLE hSurfaceAttached, _Inout_ PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdDestroySurface(_In_ HANDLE hSurface, _In_ BOOL bRealDestroy)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdAlphaBlt(_In_ HANDLE hSurfaceDest, _In_opt_ HANDLE hSurfaceSrc, _Inout_ PDD_BLTDATA puBltData)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiD3dContextCreate(_In_ HANDLE hDirectDrawLocal, _In_ HANDLE hSurfColor, _In_ HANDLE hSurfZ, _Inout_ D3DNTHAL_CONTEXTCREATEI *pdcci)
_In_ HBITMAP _In_ UINT _In_ UINT _Inout_ LPBITMAPINFO _In_ UINT iUsage
Definition: ntgdi.h:2781
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdResetVisrgn(_In_ HANDLE hSurface, _In_ HWND hwnd)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortBandwidth(_In_ HANDLE hVideoPort, _Inout_ PDD_GETVPORTBANDWIDTHDATA puGetVPortBandwidthData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdDestroyD3DBuffer(_In_ HANDLE hSurface)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetDriverState(_Inout_ PDD_GETDRIVERSTATEDATA pdata)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpDestroyVideoPort(_In_ HANDLE hVideoPort, _Inout_ PDD_DESTROYVPORTDATA puDestroyVPortData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortConnectInfo(_In_ HANDLE hDirectDraw, _Inout_ PDD_GETVPORTCONNECTDATA puGetVPortConnectData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiD3dContextDestroyAll(_Out_ LPD3DNTHAL_CONTEXTDESTROYALLDATA pdcdad)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdAttachSurface(_In_ HANDLE hSurfaceFrom, _In_ HANDLE hSurfaceTo)
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiDdCreateSurfaceObject(_In_ HANDLE hDirectDrawLocal, _In_ HANDLE hSurface, _In_ PDD_SURFACE_LOCAL puSurfaceLocal, _In_ PDD_SURFACE_MORE puSurfaceMore, _In_ PDD_SURFACE_GLOBAL puSurfaceGlobal, _In_ BOOL bComplete)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdReleaseDC(_In_ HANDLE hSurface)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdLockD3D(_In_ HANDLE hSurface, _Inout_ PDD_LOCKDATA puLockData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdBlt(_In_ HANDLE hSurfaceDest, _In_ HANDLE hSurfaceSrc, _Inout_ PDD_BLTDATA puBltData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetAvailDriverMemory(_In_ HANDLE hDirectDraw, _Inout_ PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetDriverInfo(_In_ HANDLE hDirectDraw, _Inout_ PDD_GETDRIVERINFODATA puGetDriverInfoData)
@ Unlock
Definition: ntsecapi.h:294
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
#define L(x)
Definition: ntvdm.h:50
#define CONST
Definition: pedump.c:81
BYTE * PBYTE
Definition: pedump.c:66
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define DDOVER_KEYDESTOVERRIDE
Definition: ddraw.h:605
#define DDOVER_KEYDEST
Definition: ddraw.h:604
#define DDSD_PIXELFORMAT
Definition: ddraw.h:216
#define DDFLIP_STEREO
Definition: ddraw.h:587
struct _DDPIXELFORMAT DDPIXELFORMAT
#define DDOVER_KEYSRC
Definition: ddraw.h:606
#define DDERR_OUTOFMEMORY
Definition: ddraw.h:111
#define DDOVER_KEYSRCOVERRIDE
Definition: ddraw.h:607
#define DD_OK
Definition: ddraw.h:186
#define DDERR_GENERIC
Definition: ddraw.h:72
LPDDRAWI_DDRAWSURFACE_LCL lpDDSZLcl
Definition: d3dhal.h:245
LPDDRAWI_DDRAWSURFACE_LCL lpDDSLcl
Definition: d3dhal.h:241
LPDDRAWI_DIRECTDRAW_LCL lpDDLcl
Definition: d3dhal.h:237
LPD3DNTHAL_CONTEXTDESTROYCB ContextDestroy
Definition: d3dnthal.h:138
LPD3DNTHAL_CONTEXTCREATECB ContextCreate
Definition: d3dnthal.h:137
LPD3DNTHAL_CONTEXTDESTROYALLCB ContextDestroyAll
Definition: d3dnthal.h:139
DWORD dwFlags
Definition: ddrawi.h:619
LPDDHAL_DDEXEBUFCALLBACKS lpDDExeBufCallbacks
Definition: ddrawi.h:625
ULONG_PTR lpD3DGlobalDriverData
Definition: ddrawi.h:623
LPDDHAL_DDPALETTECALLBACKS lpDDPaletteCallbacks
Definition: ddrawi.h:610
VIDMEMINFO vmiData
Definition: ddrawi.h:611
DWORD dwSize
Definition: ddrawi.h:607
LPDDHAL_DDSURFACECALLBACKS lpDDSurfaceCallbacks
Definition: ddrawi.h:609
ULONG_PTR lpD3DHALCallbacks
Definition: ddrawi.h:624
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:1689
LPDDRAWI_DDRAWSURFACE_LCL lpSurfAttached
Definition: ddrawi.h:1690
LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface
Definition: ddrawi.h:849
LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface
Definition: ddrawi.h:847
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:784
LPDDRAWI_DIRECTDRAW_LCL lpDD
Definition: ddrawi.h:891
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:1709
LPDDSURFACEDESC lpDDSurfaceDesc
Definition: ddrawi.h:776
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:775
LPDDRAWI_DDRAWSURFACE_LCL * lplpSList
Definition: ddrawi.h:777
LPDDRAWI_DIRECTDRAW_LCL lpDDLcl
Definition: ddrawi.h:1065
LPDDRAWI_DDRAWSURFACE_LCL lpDDSLcl
Definition: ddrawi.h:1066
LPDDRAWI_DIRECTDRAW_LCL lpDD
Definition: ddrawi.h:898
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:900
LPDDHALCOLORCB_COLORCONTROL ColorControl
Definition: ddrawi.h:532
LPDDHAL_CREATESURFACEEX CreateSurfaceEx
Definition: ddrawi.h:467
LPDDHAL_GETDRIVERSTATE GetDriverState
Definition: ddrawi.h:468
LPDDHAL_GETAVAILDRIVERMEMORY GetAvailDriverMemory
Definition: ddrawi.h:449
LPDDHALVPORTCB_GETFIELD GetVideoPortField
Definition: ddrawi.h:514
LPDDHALVPORTCB_WAITFORSYNC WaitForVideoPortSync
Definition: ddrawi.h:520
LPDDHALVPORTCB_GETVPORTCONNECT GetVideoPortConnectInfo
Definition: ddrawi.h:516
LPDDHALVPORTCB_GETINPUTFORMATS GetVideoPortInputFormats
Definition: ddrawi.h:511
LPDDHALVPORTCB_GETOUTPUTFORMATS GetVideoPortOutputFormats
Definition: ddrawi.h:512
LPDDHALVPORTCB_CREATEVIDEOPORT CreateVideoPort
Definition: ddrawi.h:508
LPDDHALVPORTCB_GETFLIPSTATUS GetVideoPortFlipStatus
Definition: ddrawi.h:518
LPDDHALVPORTCB_GETSIGNALSTATUS GetVideoSignalStatus
Definition: ddrawi.h:521
LPDDHALVPORTCB_DESTROYVPORT DestroyVideoPort
Definition: ddrawi.h:517
LPDDHALVPORTCB_GETLINE GetVideoPortLine
Definition: ddrawi.h:515
LPDDHALVPORTCB_GETBANDWIDTH GetVideoPortBandwidth
Definition: ddrawi.h:510
LPDDHALVPORTCB_FLIP FlipVideoPort
Definition: ddrawi.h:509
LPDDHALVPORTCB_COLORCONTROL ColorControl
Definition: ddrawi.h:522
LPDDHALVPORTCB_UPDATE UpdateVideoPort
Definition: ddrawi.h:519
LPDDHALVPORTCB_CANCREATEVIDEOPORT CanCreateVideoPort
Definition: ddrawi.h:507
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:811
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:956
LPDDRAWI_DDRAWSURFACE_LCL lpSurfTargLeft
Definition: ddrawi.h:824
LPDDRAWI_DDRAWSURFACE_LCL lpSurfCurr
Definition: ddrawi.h:818
LPDDRAWI_DDRAWSURFACE_LCL lpSurfTarg
Definition: ddrawi.h:819
LPDDRAWI_DDRAWSURFACE_LCL lpSurfCurrLeft
Definition: ddrawi.h:823
DWORD dwFlags
Definition: ddrawi.h:820
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1746
LPDDRAWI_DDRAWSURFACE_LCL lpSurfCurr
Definition: ddrawi.h:1011
LPDDRAWI_DDRAWSURFACE_LCL lpSurfTarg
Definition: ddrawi.h:1012
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:1010
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1754
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:1765
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:1773
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1820
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:907
LPDDRAWI_DIRECTDRAW_LCL lpDD
Definition: ddrawi.h:1018
LPDDRAWI_DIRECTDRAW_LCL lpDD
Definition: ddrawi.h:962
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:919
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:948
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:993
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:1851
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:801
LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface
Definition: ddrawi.h:1860
LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface
Definition: ddrawi.h:1861
LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface
Definition: ddrawi.h:1870
DDOVERLAYFX overlayFX
Definition: ddrawi.h:1875
LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface
Definition: ddrawi.h:1872
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:970
LPDDRAWI_DDRAWSURFACE_INT * lplpDDSurface
Definition: ddrawi.h:971
LPDDRAWI_DDRAWSURFACE_INT * lplpDDVBISurface
Definition: ddrawi.h:972
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:1001
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1881
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:983
DWORD dwRops[DD_ROP_SPACE]
Definition: ddrawint.h:1087
DDCOLORKEY dckDestColorkey
Definition: ddraw.h:1388
DDCOLORKEY dckSrcColorkey
Definition: ddraw.h:1389
DWORD dwSize
Definition: ddraw.h:1070
DDPIXELFORMAT ddpfSurface
Definition: ddrawi.h:1358
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1346
DDCOLORKEY ddckCKSrcOverlay
Definition: ddrawi.h:1490
LPDDRAWI_DDRAWSURFACE_GBL lpGbl
Definition: ddrawi.h:1468
LPDDRAWI_DDRAWSURFACE_MORE lpSurfMore
Definition: ddrawi.h:1467
DDCOLORKEY ddckCKDestOverlay
Definition: ddrawi.h:1491
VIDMEMINFO vmiData
Definition: ddrawi.h:1236
LPDDRAWI_DIRECTDRAW_GBL lpGbl
Definition: ddrawi.h:1155
DWORD dwCaps4
Definition: ddraw.h:1063
DWORD dwCaps3
Definition: ddraw.h:1060
DWORD dwCaps2
Definition: ddraw.h:1059
DWORD dwCaps
Definition: ddraw.h:727
PDD_CANCREATESURFACE CanCreateD3DBuffer
Definition: ddrawint.h:1032
PDD_CREATESURFACE CreateD3DBuffer
Definition: ddrawint.h:1033
PDD_SURFCB_DESTROYSURFACE DestroyD3DBuffer
Definition: ddrawint.h:1034
PDD_SURFCB_LOCK LockD3DBuffer
Definition: ddrawint.h:1035
PDD_SURFCB_UNLOCK UnlockD3DBuffer
Definition: ddrawint.h:1036
DWORD dwActualSize
Definition: main.c:57
DWORD dwFlags
Definition: ddrawint.h:1128
DDNTCORECAPS ddCaps
Definition: ddrawint.h:1126
VIDEOMEMORYINFO vmiData
Definition: ddrawint.h:1125
PDD_FREEDRIVERMEMORY FreeDriverMemory
Definition: ddrawint.h:611
PDD_SETEXCLUSIVEMODE SetExclusiveMode
Definition: ddrawint.h:612
PDD_FLIPTOGDISURFACE FlipToGDISurface
Definition: ddrawint.h:613
DDPIXELFORMAT ddpfSurface
Definition: ddrawint.h:156
FLATPTR fpVidMem
Definition: ddrawint.h:146
DDSCAPS ddsCaps
Definition: ddrawint.h:174
DDSCAPSEX ddsCapsEx
Definition: ddrawint.h:165
DWORD dwSurfaceHandle
Definition: ddrawint.h:166
DWORD dwOffscreenAlign
Definition: ddrawint.h:117
DWORD dwZBufferAlign
Definition: ddrawint.h:120
DWORD dwDisplayHeight
Definition: ddrawint.h:114
DWORD dwDisplayWidth
Definition: ddrawint.h:113
DWORD dwOverlayAlign
Definition: ddrawint.h:118
LONG lDisplayPitch
Definition: ddrawint.h:115
DWORD dwTextureAlign
Definition: ddrawint.h:119
DWORD dwAlphaAlign
Definition: ddrawint.h:121
DDPIXELFORMAT ddpfDisplay
Definition: ddrawint.h:116
DWORD dwFlags
Definition: ddrawi.h:217
DDPIXELFORMAT ddpfDisplay
Definition: ddrawi.h:221
#define DWORD_PTR
Definition: treelist.c:76
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
void * PVOID
Definition: typedefs.h:50
PVOID HANDLE
Definition: typedefs.h:73
uint32_t * LPDWORD
Definition: typedefs.h:59
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:264
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127
_In_ DD_SURFACE_LOCAL * pSurface
Definition: winddi.h:3481
_Out_ DD_HALINFO _Out_ DWORD _Out_ VIDEOMEMORY _Out_ DWORD _Out_ DWORD * pdwFourCC
Definition: winddi.h:4230
_Out_ DD_HALINFO * pHalInfo
Definition: winddi.h:4226
_Out_ DD_HALINFO _Out_ DWORD _Out_ VIDEOMEMORY * pvmList
Definition: winddi.h:4228
#define WINAPI
Definition: msvc.h:6
BOOL WINAPI DeleteDC(_In_ HDC)
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170