ReactOS  0.4.14-dev-49-gfb4591c
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  */
33 DWORD
34 WINAPI
36 {
37  /* Call win32k */
38  return NtGdiDdAddAttachedSurface((HANDLE)Attach->lpDDSurface->hDDSurface,
39  (HANDLE)Attach->lpSurfAttached->hDDSurface,
41 }
42 
43 /*
44  * @implemented
45  *
46  * DdBlt
47  */
48 DWORD
49 WINAPI
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  */
69 DWORD
70 WINAPI
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  */
94 DWORD
95 WINAPI
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,
120  (HANDLE) Flip->lpSurfTarg->hDDSurface,
121  hSurfaceCurrentLeft,
122  hSurfaceTargetLeft,
123  (PDD_FLIPDATA) Flip);
124 }
125 
126 /*
127  * @implemented
128  *
129  * DdLock
130  */
131 DWORD
132 WINAPI
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  */
147 DWORD
148 WINAPI
150 {
151  /* Call win32k */
152  return NtGdiDdUnlock((HANDLE)Unlock->lpDDSurface->hDDSurface,
154 }
155 
156 /*
157  * @implemented
158  *
159  * DdGetBltStatus
160  */
161 DWORD
162 WINAPI
164 {
165  /* Call win32k */
166  return NtGdiDdGetBltStatus((HANDLE)GetBltStatus->lpDDSurface->hDDSurface,
167  (PDD_GETBLTSTATUSDATA)GetBltStatus);
168 }
169 
170 /*
171  * @implemented
172  *
173  * DdGetBltStatus
174  */
175 DWORD
176 WINAPI
178 {
179  /* Call win32k */
180  return NtGdiDdGetFlipStatus((HANDLE)GetFlipStatus->lpDDSurface->hDDSurface,
181  (PDD_GETFLIPSTATUSDATA)GetFlipStatus);
182 }
183 
184 /*
185  * @implemented
186  *
187  * DdUpdateOverlay
188  */
189 DWORD
190 WINAPI
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 */
217  return NtGdiDdUpdateOverlay((HANDLE)UpdateOverlay->lpDDDestSurface->hDDSurface,
218  (HANDLE)UpdateOverlay->lpDDSrcSurface->hDDSurface,
219  (PDD_UPDATEOVERLAYDATA)UpdateOverlay);
220 }
221 
222 /*
223  * @implemented
224  *
225  * DdSetOverlayPosition
226  */
227 DWORD
228 WINAPI
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  */
242 DWORD
243 WINAPI
245 {
246  /* Call win32k */
248  WaitForVerticalBlank->lpDD->hDD),
250  WaitForVerticalBlank);
251 }
252 
253 /*
254  * @implemented
255  *
256  * DdCanCreateSurface
257  */
258 DWORD
259 WINAPI
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  */
279 DWORD
280 WINAPI
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 
361  return DDHAL_DRIVER_HANDLED;
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  */
550 DWORD
551 WINAPI
553 {
554  /* Call win32k */
555  return NtGdiDdSetColorKey((HANDLE)pSetColorKey->lpDDSurface->hDDSurface,
556  (PDD_SETCOLORKEYDATA)pSetColorKey);
557 }
558 
559 /*
560  * @implemented
561  *
562  * DdGetScanLine
563  */
564 DWORD
565 WINAPI
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  */
579 BOOL
580 WINAPI
582 {
583  pDvdCreatePort->lpVideoPort->hDDVideoPort =
584  NtGdiDvpCreateVideoPort(GetDdHandle(pDvdCreatePort->lpDD->lpGbl->hDD),
585  (PDD_CREATEVPORTDATA) pDvdCreatePort);
586 
587  return TRUE;
588 }
589 
590 /*
591  * @implemented
592  *
593  * DvpCreateVideoPort
594  */
595 DWORD
596 WINAPI
598 {
599  return NtGdiDvpDestroyVideoPort(pDvdDestoryPort->lpVideoPort->hDDVideoPort, (PDD_DESTROYVPORTDATA)pDvdDestoryPort);
600 }
601 
602 /*
603  * @implemented
604  *
605  * DvpCreateVideoPort
606  */
607 DWORD
608 WINAPI
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  */
622 DWORD
623 WINAPI
625 {
626  return NtGdiDvpGetVideoPortBandwidth(pDvdPortBandWidth->lpVideoPort->hDDVideoPort, (PDD_GETVPORTBANDWIDTHDATA)pDvdPortBandWidth);
627 }
628 
629 /*
630  * @implemented
631  *
632  * DvpColorControl
633  */
634 DWORD
635 WINAPI
637 {
638  return NtGdiDvpColorControl(pDvdPortColorControl->lpVideoPort->hDDVideoPort, (PDD_VPORTCOLORDATA) pDvdPortColorControl);
639 }
640 
641 /*
642  * @implemented
643  *
644  * DvpGetVideoSignalStatus
645  */
646 DWORD
647 WINAPI
649 {
650  return NtGdiDvpGetVideoSignalStatus(pDvdPortVideoSignalStatus->lpVideoPort->hDDVideoPort, (PDD_GETVPORTSIGNALDATA) pDvdPortVideoSignalStatus);
651 }
652 
653 /*
654  * @implemented
655  *
656  * DvpGetVideoPortFlipStatus
657  */
658 DWORD
659 WINAPI
661 {
662  return NtGdiDvpGetVideoPortFlipStatus(GetDdHandle(pDvdPortVideoPortFlipStatus->lpDD->lpGbl->hDD), (PDD_GETVPORTFLIPSTATUSDATA) pDvdPortVideoPortFlipStatus);
663 
664 }
665 
666 /*
667  * @implemented
668  *
669  * DvpCanCreateVideoPort
670  */
671 DWORD
672 WINAPI
674 {
675  return NtGdiDvpCanCreateVideoPort(GetDdHandle(pDvdCanCreateVideoPort->lpDD->lpGbl->hDD), (PDD_CANCREATEVPORTDATA) pDvdCanCreateVideoPort);
676 }
677 /*
678  * @implemented
679  *
680  * DvpWaitForVideoPortSync
681  */
682 DWORD
683 WINAPI
685 {
686  return NtGdiDvpWaitForVideoPortSync(pDvdWaitForVideoPortSync->lpVideoPort->hDDVideoPort, (PDD_WAITFORVPORTSYNCDATA) pDvdWaitForVideoPortSync);
687 }
688 
689 /*
690  * @implemented
691  *
692  * DvpUpdateVideoPort
693  */
694 DWORD
695 WINAPI
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  */
758 DWORD
759 WINAPI
761 {
762  return NtGdiDvpGetVideoPortField(pDvdGetVideoPortField->lpVideoPort->hDDVideoPort, (PDD_GETVPORTFIELDDATA)pDvdGetVideoPortField);
763 }
764 
765 /*
766  * @implemented
767  *
768  * DvpWaitForVideoPortSync
769  */
770 DWORD
771 WINAPI
773 {
774  return NtGdiDvpGetVideoPortInputFormats(pDvdGetVideoPortInputFormat->lpVideoPort->hDDVideoPort, (PDD_GETVPORTINPUTFORMATDATA) pDvdGetVideoPortInputFormat);
775 }
776 
777 /*
778  * @implemented
779  *
780  * DvpGetVideoPortLine
781  */
782 DWORD
783 WINAPI
785 {
786  return NtGdiDvpGetVideoPortLine(pDvdGetVideoPortLine->lpVideoPort->hDDVideoPort, (PDD_GETVPORTLINEDATA)pDvdGetVideoPortLine);
787 }
788 
789 /*
790  * @implemented
791  *
792  * DvpGetVideoPortOutputFormats
793  */
794 DWORD
795 WINAPI
797 {
798  return NtGdiDvpGetVideoPortLine(pDvdGetVideoPortOutputFormat->lpVideoPort->hDDVideoPort, (PDD_GETVPORTLINEDATA)pDvdGetVideoPortOutputFormat);
799 }
800 
801 /*
802  * @implemented
803  *
804  * DvpGetVideoPortConnectInfo
805  */
806 DWORD
807 WINAPI
809 {
810  return NtGdiDvpGetVideoPortConnectInfo( GetDdHandle( pDvdGetVideoPortInfo->lpDD->lpGbl->hDD) , (PDD_GETVPORTCONNECTDATA) pDvdGetVideoPortInfo);
811 }
812 
813 /*
814  * @implemented
815  *
816  * DdGetAvailDriverMemory
817  */
818 DWORD
819 WINAPI
821 {
822  return NtGdiDdGetAvailDriverMemory(GetDdHandle( pDdGetAvailDriverMemory->lpDD->hDD), (PDD_GETAVAILDRIVERMEMORYDATA) pDdGetAvailDriverMemory);
823 }
824 
825 /*
826  * @implemented
827  *
828  * DdAlphaBlt
829  */
830 DWORD
831 WINAPI
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  */
849 DWORD
850 WINAPI
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  */
864 DWORD
865 WINAPI
867 {
868  return NtGdiDdColorControl( (HANDLE) pDdColorControl->lpDDSurface->hDDSurface, (PDD_COLORCONTROLDATA) &pDdColorControl);
869 }
870 
871 /*
872  * @implemented
873  *
874  * DdSetExclusiveMode
875  */
876 DWORD
877 WINAPI
879 {
880  return NtGdiDdSetExclusiveMode( GetDdHandle(pDdSetExclusiveMode->lpDD->hDD), (PDD_SETEXCLUSIVEMODEDATA) &pDdSetExclusiveMode);
881 }
882 
883 /*
884  * @implemented
885  *
886  * DdFlipToGDISurface
887  */
888 DWORD
889 WINAPI
891 {
892  return NtGdiDdFlipToGDISurface( GetDdHandle(pDdFlipToGDISurface->lpDD->hDD), (PDD_FLIPTOGDISURFACEDATA) &pDdFlipToGDISurface);
893 }
894 
895 /* TODO */
896 DWORD
897 WINAPI
899 {
900  DDHAL_GETDRIVERINFODATA pDrvInfoData;
901  DWORD retValue = DDHAL_DRIVER_NOTHANDLED;
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  {
920  DDHAL_DDVIDEOPORTCALLBACKS* pUserDvdPort = (DDHAL_DDVIDEOPORTCALLBACKS *)pData->lpvData;
921 
922  /* Clear internal out buffer and set it up*/
924  pDvdPort.dwSize = DDVIDEOPORTCALLBACKSSIZE;
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*/
1018  RtlZeroMemory(&pColorControl, DDCOLORCONTROLCALLBACKSSIZE);
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  */
1232 BOOL
1233 WINAPI
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  */
1254 DWORD
1255 WINAPI
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  */
1276 DWORD
1277 WINAPI
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  */
1345 DWORD
1346 WINAPI
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  */
1364 DWORD
1365 WINAPI
1367 {
1368 
1369  /* Call win32k */
1370  return NtGdiDdLockD3D((HANDLE)Lock->lpDDSurface->hDDSurface, (PDD_LOCKDATA)Lock);
1371 }
1372 
1373 /*
1374  * @implemented
1375  *
1376  * DdUnlockD3D
1377  */
1378 DWORD
1379 WINAPI
1381 {
1382  /* Call win32k */
1383  return NtGdiDdUnlock((HANDLE)Unlock->lpDDSurface->hDDSurface,
1385 }
1386 
1387 
1388 /* PRIVATE FUNCTIONS *********************************************************/
1389 
1390 BOOL
1391 WINAPI
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  */
1453 BOOL
1454 WINAPI
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  */
1506 BOOL
1507 WINAPI
1518  LPVIDMEM pvmList)
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 */
1564  RtlZeroMemory(pHalInfo, sizeof(DDHALINFO));
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 */
1589  pHalInfo->vmiData.dwFlags = HalInfo.vmiData.dwFlags;
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  */
1626  pHalInfo->GetDriverInfo = (LPDDHAL_GETDRIVERINFO) DdGetDriverInfo;
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 */
1664  if (pDDSurfaceCallbacks)
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 */
1688  pDDSurfaceCallbacks->Lock = DdLock;
1689  pDDSurfaceCallbacks->Unlock = DdUnlock;
1690  pDDSurfaceCallbacks->SetColorKey = DdSetColorKey;
1691  pDDSurfaceCallbacks->DestroySurface = DdDestroySurface;
1692 
1693  /* Write the optional ones */
1694  if (Flags & DDHAL_SURFCB32_FLIP)
1695  {
1696  pDDSurfaceCallbacks->Flip = DdFlip;
1697  }
1698  if (Flags & DDHAL_SURFCB32_BLT)
1699  {
1700  pDDSurfaceCallbacks->Blt = DdBlt;
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  */
1727  if (pDDPaletteCallbacks)
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 */
1775  if (pD3dBufferCallbacks)
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 
1815 cleanup:
1816  if (VidMemList)
1817  {
1818  HeapFree(GetProcessHeap(), 0, VidMemList);
1819  }
1820 
1821  return retVal;
1822 }
1823 
1824 /*
1825  * @implemented
1826  *
1827  * GDIEntry 3
1828  */
1829 BOOL
1830 WINAPI
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  */
1871 BOOL
1872 WINAPI
1874  BOOL bPrimarySurface)
1875 {
1876  return bDDCreateSurface(pSurfaceLocal, TRUE);
1877 }
1878 
1879 
1880 /*
1881  * @implemented
1882  *
1883  * GDIEntry 5
1884  */
1885 BOOL
1886 WINAPI
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  */
1907 BOOL
1908 WINAPI
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  */
1921 HDC
1922 WINAPI
1924  LPPALETTEENTRY pColorTable)
1925 {
1926  /* Call win32k directly */
1927  return NtGdiDdGetDC(pColorTable, (HANDLE) pSurfaceLocal->hDDSurface);
1928 }
1929 
1930 /*
1931  * @implemented
1932  *
1933  * GDIEntry 8
1934  */
1935 BOOL
1936 WINAPI
1938 {
1939  /* Call win32k directly */
1940  return NtGdiDdReleaseDC((HANDLE) pSurfaceLocal->hDDSurface);
1941 }
1942 
1943 /*
1944  * @unimplemented
1945  * GDIEntry 9
1946  */
1947 HBITMAP
1948 WINAPI
1951  UINT iUsage,
1952  VOID **ppvBits,
1953  HANDLE hSectionApp,
1954  DWORD dwOffset)
1955 {
1957  return 0;
1958 }
1959 
1960 /*
1961  * @implemented
1962  *
1963  * GDIEntry 10
1964  */
1965 BOOL
1966 WINAPI
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  */
1981 BOOL
1982 WINAPI
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  */
2014 VOID
2015 WINAPI
2017  LPDDRAWI_DDRAWSURFACE_LCL pSurfaceAttached)
2018 {
2019  /* Call win32k */
2020  NtGdiDdUnattachSurface((HANDLE)pSurface->hDDSurface,
2021  (HANDLE)pSurfaceAttached->hDDSurface);
2022 }
2023 
2024 /*
2025  * @implemented
2026  *
2027  * GDIEntry 13
2028  */
2029 ULONG
2030 WINAPI
2032 {
2034 }
2035 
2036 /*
2037  * @implemented
2038  *
2039  * GDIEntry 14
2040  */
2041 HANDLE
2042 WINAPI
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  */
2070 BOOL
2071 WINAPI
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 
2085 
#define DDVIDEOPORTCALLBACKSSIZE
Definition: ddrawi.h:633
LPDDHALVPORTCB_GETVPORTCONNECT GetVideoPortConnectInfo
Definition: ddrawi.h:516
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiDdGetDxHandle(_In_opt_ HANDLE hDirectDraw, _In_opt_ HANDLE hSurface, _In_ BOOL bRelease)
__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)
LPDDHALVPORTCB_COLORCONTROL ColorControl
Definition: ddrawi.h:522
DWORD dwSize
Definition: ddrawi.h:607
DWORD WINAPI DdAlphaBlt(LPDDHAL_BLTDATA pDdAlphaBlt)
Definition: gdientry.c:832
LPDDRAWI_DDRAWSURFACE_LCL lpDDSZLcl
Definition: d3dhal.h:245
DWORD(PASCAL * LPDDHALVPORTCB_COLORCONTROL)(LPDDHAL_VPORTCOLORDATA)
Definition: ddrawi.h:502
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:1709
#define DDHAL_MISCCB32_GETAVAILDRIVERMEMORY
Definition: ddrawi.h:688
DWORD(PASCAL * LPDDHALVPORTCB_GETLINE)(LPDDHAL_GETVPORTLINEDATA)
Definition: ddrawi.h:495
__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)
LPDDSURFACEDESC lpDDSurfaceDesc
Definition: ddrawi.h:776
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
LPDDRAWI_DDRAWSURFACE_LCL lpSurfTargLeft
Definition: ddrawi.h:824
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:811
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortBandwidth(_In_ HANDLE hVideoPort, _Inout_ PDD_GETVPORTBANDWIDTHDATA puGetVPortBandwidthData)
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiDvpCreateVideoPort(_In_ HANDLE hDirectDraw, _Inout_ PDD_CREATEVPORTDATA puCreateVPortData)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdReenableDirectDrawObject(_In_ HANDLE hDirectDrawLocal, _Inout_ BOOL *pubNewMode)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdResetVisrgn(_In_ HANDLE hSurface, _In_ HWND hwnd)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetScanLine(_In_ HANDLE hDirectDraw, _Inout_ PDD_GETSCANLINEDATA puGetScanLineData)
DWORD(PASCAL * LPDDHALEXEBUFCB_DESTROYEXEBUF)(LPDDHAL_DESTROYSURFACEDATA)
Definition: ddrawi.h:424
struct _DDHAL_DDPALETTECALLBACKS DDHAL_DDPALETTECALLBACKS
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdDestroySurface(_In_ HANDLE hSurface, _In_ BOOL bRealDestroy)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdUpdateOverlay(_In_ HANDLE hSurfaceDestination, _In_ HANDLE hSurfaceSource, _Inout_ PDD_UPDATEOVERLAYDATA puUpdateOverlayData)
DWORD dwSurfaceHandle
Definition: ddrawint.h:166
LPDDRAWI_DDRAWSURFACE_LCL lpSurfTarg
Definition: ddrawi.h:1012
DWORD WINAPI DvpGetVideoPortBandwidth(LPDDHAL_GETVPORTBANDWIDTHDATA pDvdPortBandWidth)
Definition: gdientry.c:624
#define DWORD_PTR
Definition: treelist.c:76
DDSCAPSEX ddsCapsEx
Definition: ddrawint.h:165
DWORD WINAPI DvpGetVideoPortField(LPDDHAL_FLIPVPORTDATA pDvdGetVideoPortField)
Definition: gdientry.c:760
__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)
LPDDRAWI_DDRAWSURFACE_MORE lpSurfMore
Definition: ddrawi.h:1467
LPDDRAWI_DIRECTDRAW_LCL lpDD
Definition: ddrawi.h:962
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetDriverInfo(_In_ HANDLE hDirectDraw, _Inout_ PDD_GETDRIVERINFODATA puGetDriverInfoData)
BOOL WINAPI bDDCreateSurface(LPDDRAWI_DDRAWSURFACE_LCL pSurface, BOOL bComplete)
Definition: gdientry.c:1392
DWORD WINAPI DvpWaitForVideoPortSync(LPDDHAL_WAITFORVPORTSYNCDATA pDvdWaitForVideoPortSync)
Definition: gdientry.c:684
struct _DDHALINFO DDHALINFO
struct _DD_SURFACE_LOCAL DD_SURFACE_LOCAL
DWORD(PASCAL * LPDDHALVPORTCB_FLIP)(LPDDHAL_FLIPVPORTDATA)
Definition: ddrawi.h:490
DWORD(PASCAL * LPDDHALVPORTCB_DESTROYVPORT)(LPDDHAL_DESTROYVPORTDATA)
Definition: ddrawi.h:497
LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface
Definition: ddrawi.h:849
DWORD(WINAPI * PDD_SETEXCLUSIVEMODE)(PDD_SETEXCLUSIVEMODEDATA)
Definition: ddrawint.h:597
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdLock(_In_ HANDLE hSurface, _Inout_ PDD_LOCKDATA puLockData, _In_ HDC hdcClip)
LPDDHALINFO LPDDHAL_DDCALLBACKS pDDCallbacks
Definition: main.h:38
_In_ HBITMAP _In_ UINT _In_ UINT _Inout_ LPBITMAPINFO pbmi
Definition: ntgdi.h:2780
DWORD dwFlags
Definition: ddrawint.h:1128
#define DDRAWISURF_INVALID
Definition: ddrawi.h:1530
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpFlipVideoPort(_In_ HANDLE hVideoPort, _In_ HANDLE hDDSurfaceCurrent, _In_ HANDLE hDDSurfaceTarget, _Inout_ PDD_FLIPVPORTDATA puFlipVPortData)
DDNTCORECAPS ddCaps
Definition: ddrawint.h:1126
VIDMEMINFO vmiData
Definition: ddrawi.h:611
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdCanCreateD3DBuffer(_In_ HANDLE hDirectDraw, _Inout_ PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
DWORD dwDisplayHeight
Definition: ddrawint.h:114
DWORD dwCaps
Definition: ddraw.h:727
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
DDSCAPS ddsCaps
Definition: ddrawint.h:174
LPDDRAWI_DIRECTDRAW_LCL lpDDLcl
Definition: ddrawi.h:1065
LPDDRAWI_DIRECTDRAW_LCL lpDDLcl
Definition: d3dhal.h:237
DWORD dwCaps3
Definition: ddraw.h:1060
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetBltStatus(_In_ HANDLE hSurface, _Inout_ PDD_GETBLTSTATUSDATA puGetBltStatusData)
DWORD dwDisplayWidth
Definition: ddrawint.h:113
DWORD(PASCAL * LPDDHALEXEBUFCB_UNLOCKEXEBUF)(LPDDHAL_UNLOCKDATA)
Definition: ddrawi.h:426
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS LPD3DHAL_CALLBACKS LPD3DHAL_GLOBALDRIVERDATA pD3dDriverData
Definition: main.h:38
DWORD(PASCAL * LPDDHALVPORTCB_GETSIGNALSTATUS)(LPDDHAL_GETVPORTSIGNALDATA)
Definition: ddrawi.h:501
DDOVERLAYFX overlayFX
Definition: ddrawi.h:1875
VOID WINAPI DdUnattachSurface(LPDDRAWI_DDRAWSURFACE_LCL pSurface, LPDDRAWI_DDRAWSURFACE_LCL pSurfaceAttached)
Definition: gdientry.c:2016
#define DDRAWISURF_HASPIXELFORMAT
Definition: ddrawi.h:1515
static HDC
Definition: imagelist.c:92
LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface
Definition: ddrawi.h:1860
__kernel_entry W32KAPI DWORD APIENTRY NtGdiD3dContextDestroyAll(_Out_ LPD3DNTHAL_CONTEXTDESTROYALLDATA pdcdad)
HWND hWnd
Definition: settings.c:17
DWORD WINAPI DvpFlipVideoPort(LPDDHAL_FLIPVPORTDATA pDvdPortFlip)
Definition: gdientry.c:609
DWORD(PASCAL * LPDDHAL_GETDRIVERINFO)(LPDDHAL_GETDRIVERINFODATA)
Definition: ddrawi.h:593
BOOL WINAPI DvpCreateVideoPort(LPDDHAL_CREATEVPORTDATA pDvdCreatePort)
Definition: gdientry.c:581
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortLine(_In_ HANDLE hVideoPort, _Inout_ PDD_GETVPORTLINEDATA puGetVPortLineData)
#define DDHAL_SURFCB32_UPDATEOVERLAY
Definition: ddrawi.h:684
DWORD(PASCAL * LPDDHALVPORTCB_CANCREATEVIDEOPORT)(LPDDHAL_CANCREATEVPORTDATA)
Definition: ddrawi.h:488
BOOL WINAPI DdReleaseDC(LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal)
Definition: gdientry.c:1937
DWORD dwAlphaAlign
Definition: ddrawint.h:121
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:1001
GLuint buffer
Definition: glext.h:5915
DWORD WINAPI DdCanCreateD3DBuffer(LPDDHAL_CANCREATESURFACEDATA CanCreateD3DBuffer)
Definition: gdientry.c:1256
BOOL WINAPI DdSetGammaRamp(LPDDRAWI_DIRECTDRAW_LCL pDDraw, HDC hdc, LPVOID lpGammaRamp)
Definition: gdientry.c:2072
__kernel_entry W32KAPI HDC APIENTRY NtGdiDdGetDC(_In_ HANDLE hSurface, _In_ PALETTEENTRY *puColorTable)
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1346
PDD_FREEDRIVERMEMORY FreeDriverMemory
Definition: ddrawint.h:611
LPDDHALVPORTCB_GETSIGNALSTATUS GetVideoSignalStatus
Definition: ddrawi.h:521
#define DDRAWISURF_FRONTBUFFER
Definition: ddrawi.h:1528
#define DDERR_OUTOFMEMORY
Definition: ddraw.h:111
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdAddAttachedSurface(_In_ HANDLE hSurface, _In_ HANDLE hSurfaceAttached, _Inout_ PDD_ADDATTACHEDSURFACEDATA puAddAttachedSurfaceData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdCanCreateSurface(_In_ HANDLE hDirectDraw, _Inout_ PDD_CANCREATESURFACEDATA puCanCreateSurfaceData)
BOOL WINAPI DdAttachSurface(LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom, LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo)
Definition: gdientry.c:1983
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:1765
struct _DDHAL_DDCALLBACKS DDHAL_DDCALLBACKS
#define GetDdHandle(Handle)
Definition: gdientry.c:22
#define DDHAL_CB32_CANCREATESURFACE
Definition: ddrawi.h:658
DWORD(PASCAL * LPD3DHAL_CONTEXTCREATECB)(LPD3DHAL_CONTEXTCREATEDATA)
Definition: d3dhal.h:135
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdDeleteSurfaceObject(_In_ HANDLE hSurface)
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS pDDPaletteCallbacks
Definition: main.h:38
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:970
DWORD(PASCAL * LPDDHALVPORTCB_UPDATE)(LPDDHAL_UPDATEVPORTDATA)
Definition: ddrawi.h:499
#define DDHAL_VPORT32_FLIP
Definition: ddrawi.h:703
#define DDHAL_SURFCB32_FLIP
Definition: ddrawi.h:675
HANDLE WINAPI DdGetDxHandle(LPDDRAWI_DIRECTDRAW_LCL pDDraw, LPDDRAWI_DDRAWSURFACE_LCL pSurface, BOOL bRelease)
Definition: gdientry.c:2043
DWORD WINAPI DdDestroyD3DBuffer(LPDDHAL_DESTROYSURFACEDATA pDestroySurface)
Definition: gdientry.c:1347
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:900
struct _DDPIXELFORMAT DDPIXELFORMAT
LPDDHAL_DDPALETTECALLBACKS lpDDPaletteCallbacks
Definition: ddrawi.h:610
DWORD(PASCAL * LPDDHALVPORTCB_WAITFORSYNC)(LPDDHAL_WAITFORVPORTSYNCDATA)
Definition: ddrawi.h:500
LPDDHAL_GETAVAILDRIVERMEMORY GetAvailDriverMemory
Definition: ddrawi.h:449
DWORD(PASCAL * LPDDHALVPORTCB_GETVPORTCONNECT)(LPDDHAL_GETVPORTCONNECTDATA)
Definition: ddrawi.h:496
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define DDHAL_VPORT32_DESTROY
Definition: ddrawi.h:710
#define DDRAWISURF_DCIBUSY
Definition: ddrawi.h:1531
_In_ DWORD _In_ DWORD dwOffset
Definition: ntgdi.h:2032
HANDLE ghDirectDraw
Definition: gdientry.c:19
uint32_t ULONG_PTR
Definition: typedefs.h:63
DWORD dwTextureAlign
Definition: ddrawint.h:119
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdBlt(_In_ HANDLE hSurfaceDest, _In_ HANDLE hSurfaceSrc, _Inout_ PDD_BLTDATA puBltData)
BOOL WINAPI DdCreateSurfaceObject(LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal, BOOL bPrimarySurface)
Definition: gdientry.c:1873
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdColorControl(_In_ HANDLE hSurface, _Inout_ PDD_COLORCONTROLDATA puColorControlData)
DWORD WINAPI DvpGetVideoPortInputFormats(LPDDHAL_GETVPORTINPUTFORMATDATA pDvdGetVideoPortInputFormat)
Definition: gdientry.c:772
#define DDHAL_SURFCB32_SETCOLORKEY
Definition: ddrawi.h:680
BOOL WINAPI DdDeleteDirectDrawObject(LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal)
Definition: gdientry.c:1831
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:919
PDD_SURFACE_LOCAL * lplpSList
Definition: ddrawint.h:427
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define DDHAL_DRIVER_HANDLED
Definition: ddrawi.h:321
LPDDHALVPORTCB_GETFIELD GetVideoPortField
Definition: ddrawi.h:514
#define DD_OK
Definition: ddraw.h:186
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortFlipStatus(_In_ HANDLE hDirectDraw, _Inout_ PDD_GETVPORTFLIPSTATUSDATA puGetVPortFlipStatusData)
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
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdFlipToGDISurface(_In_ HANDLE hDirectDraw, _Inout_ PDD_FLIPTOGDISURFACEDATA puFlipToGDISurfaceData)
#define DDHAL_SURFCB32_GETFLIPSTATUS
Definition: ddrawi.h:683
LPDDHALVPORTCB_CANCREATEVIDEOPORT CanCreateVideoPort
Definition: ddrawi.h:507
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdAlphaBlt(_In_ HANDLE hSurfaceDest, _In_opt_ HANDLE hSurfaceSrc, _Inout_ PDD_BLTDATA puBltData)
#define DDMISCELLANEOUS2CALLBACKSSIZE
Definition: ddrawi.h:631
#define DDHAL_VPORT32_WAITFORSYNC
Definition: ddrawi.h:713
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortField(_In_ HANDLE hVideoPort, _Inout_ PDD_GETVPORTFIELDDATA puGetVPortFieldData)
DWORD WINAPI DdLock(LPDDHAL_LOCKDATA Lock)
Definition: gdientry.c:133
#define DDHAL_SURFCB32_DESTROYSURFACE
Definition: ddrawi.h:674
struct _DD_SURFACE_LOCAL * PDD_SURFACE_LOCAL
LPDDHALVPORTCB_GETOUTPUTFORMATS GetVideoPortOutputFormats
Definition: ddrawi.h:512
unsigned int BOOL
Definition: ntddk_ex.h:94
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1746
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:993
#define DDHAL_SURFCB32_BLT
Definition: ddrawi.h:679
struct _DD_SURFACE_GLOBAL DD_SURFACE_GLOBAL
struct _DD_SURFACE_GLOBAL * PDD_SURFACE_GLOBAL
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdDeleteDirectDrawObject(_In_ HANDLE hDirectDrawLocal)
DWORD(PASCAL * LPDDHAL_CREATESURFACEEX)(LPDDHAL_CREATESURFACEEXDATA)
Definition: ddrawi.h:459
#define DDHAL_VPORT32_CREATEVIDEOPORT
Definition: ddrawi.h:702
DWORD dwCaps4
Definition: ddraw.h:1063
DWORD dwFlags
Definition: ddrawi.h:820
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdAttachSurface(_In_ HANDLE hSurfaceFrom, _In_ HANDLE hSurfaceTo)
DWORD WINAPI DdLockD3D(LPDDHAL_LOCKDATA Lock)
Definition: gdientry.c:1366
DWORD dwZBufferAlign
Definition: ddrawint.h:120
__kernel_entry W32KAPI NTSTATUS APIENTRY NtGdiDdUnattachSurface(_In_ HANDLE hSurface, _In_ HANDLE hSurfaceAttached)
DWORD WINAPI DvpGetVideoPortFlipStatus(LPDDHAL_GETVPORTFLIPSTATUSDATA pDvdPortVideoPortFlipStatus)
Definition: gdientry.c:660
#define DDHAL_SURFCB32_LOCK
Definition: ddrawi.h:677
DWORD WINAPI DvpColorControl(LPDDHAL_VPORTCOLORDATA pDvdPortColorControl)
Definition: gdientry.c:636
_Out_ DD_HALINFO _Out_ DWORD _Out_ VIDEOMEMORY * pvmList
Definition: winddi.h:4226
smooth NULL
Definition: ftsmooth.c:416
DWORD WINAPI DdSetExclusiveMode(LPDDHAL_SETEXCLUSIVEMODEDATA pDdSetExclusiveMode)
Definition: gdientry.c:878
PDD_FLIPTOGDISURFACE FlipToGDISurface
Definition: ddrawint.h:613
LPDDRAWI_DDRAWSURFACE_INT * lplpDDVBISurface
Definition: ddrawi.h:972
LPDDRAWI_DDRAWSURFACE_LCL lpSurfTarg
Definition: ddrawi.h:819
LPDDRAWI_DDRAWSURFACE_LCL lpSurfCurr
Definition: ddrawi.h:818
DWORD WINAPI DdCreateSurface(LPDDHAL_CREATESURFACEDATA pCreateSurface)
Definition: gdientry.c:281
DWORD(PASCAL * LPDDHALVPORTCB_GETFIELD)(LPDDHAL_GETVPORTFIELDDATA)
Definition: ddrawi.h:494
BOOL WINAPI DdReenableDirectDrawObject(LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal, BOOL *pbNewMode)
Definition: gdientry.c:1967
LPDDRAWI_DDRAWSURFACE_LCL lpSurfCurrLeft
Definition: ddrawi.h:823
struct _VIDEOMEMORY VIDEOMEMORY
DWORD WINAPI DdSetColorKey(LPDDHAL_SETCOLORKEYDATA pSetColorKey)
Definition: gdientry.c:552
LPDDHAL_DDSURFACECALLBACKS lpDDSurfaceCallbacks
Definition: ddrawi.h:609
LPDDRAWI_DDRAWSURFACE_LCL lpDDSLcl
Definition: ddrawi.h:1066
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdSetColorKey(_In_ HANDLE hSurface, _Inout_ PDD_SETCOLORKEYDATA puSetColorKeyData)
void * PVOID
Definition: retypes.h:9
ULONG_PTR lpD3DHALCallbacks
Definition: ddrawi.h:624
DWORD(PASCAL * LPDDHALVPORTCB_GETOUTPUTFORMATS)(LPDDHAL_GETVPORTOUTPUTFORMATDATA)
Definition: ddrawi.h:493
LPDDHALVPORTCB_GETBANDWIDTH GetVideoPortBandwidth
Definition: ddrawi.h:510
LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface
Definition: ddrawi.h:1870
DWORD dwActualSize
Definition: main.c:57
#define DDERR_GENERIC
Definition: ddraw.h:72
#define DDFLIP_STEREO
Definition: ddraw.h:587
DWORD(PASCAL * LPDDHALEXEBUFCB_LOCKEXEBUF)(LPDDHAL_LOCKDATA)
Definition: ddrawi.h:425
DWORD WINAPI DdSetOverlayPosition(LPDDHAL_SETOVERLAYPOSITIONDATA SetOverlayPosition)
Definition: gdientry.c:229
#define DDHAL_CB32_GETSCANLINE
Definition: ddrawi.h:660
__kernel_entry W32KAPI BOOL APIENTRY NtGdiD3dContextCreate(_In_ HANDLE hDirectDrawLocal, _In_ HANDLE hSurfColor, _In_ HANDLE hSurfZ, _Inout_ D3DNTHAL_CONTEXTCREATEI *pdcci)
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:1010
#define DDRAWISURF_DRIVERMANAGED
Definition: ddrawi.h:1534
DWORD(PASCAL * LPDDHALEXEBUFCB_CANCREATEEXEBUF)(LPDDHAL_CANCREATESURFACEDATA)
Definition: ddrawi.h:422
ULONG_PTR lpD3DGlobalDriverData
Definition: ddrawi.h:623
LPDDHALVPORTCB_GETINPUTFORMATS GetVideoPortInputFormats
Definition: ddrawi.h:511
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpUpdateVideoPort(_In_ HANDLE hVideoPort, _In_ HANDLE *phSurfaceVideo, _In_ HANDLE *phSurfaceVbi, _Inout_ PDD_UPDATEVPORTDATA puUpdateVPortData)
LPDDRAWI_DDRAWSURFACE_LCL lpSurfAttached
Definition: ddrawi.h:1690
struct _DDRAWI_DDRAWSURFACE_LCL FAR * LPDDRAWI_DDRAWSURFACE_LCL
Definition: d3dhal.h:45
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiDdCreateDirectDrawObject(_In_ HDC hdc)
DWORD WINAPI DvpGetVideoPortConnectInfo(LPDDHAL_GETVPORTCONNECTDATA pDvdGetVideoPortInfo)
Definition: gdientry.c:808
DWORD WINAPI DdCreateSurfaceEx(LPDDHAL_CREATESURFACEEXDATA pDdCreateSurfaceEx)
Definition: gdientry.c:851
DWORD WINAPI DdFlipToGDISurface(LPDDHAL_FLIPTOGDISURFACEDATA pDdFlipToGDISurface)
Definition: gdientry.c:890
DWORD(WINAPI * PDD_FLIPTOGDISURFACE)(PDD_FLIPTOGDISURFACEDATA)
Definition: ddrawint.h:606
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdSetOverlayPosition(_In_ HANDLE hSurfaceSource, _In_ HANDLE hSurfaceDestination, _Inout_ PDD_SETOVERLAYPOSITIONDATA puSetOverlayPositionData)
LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface
Definition: ddrawi.h:1861
_In_ DD_SURFACE_LOCAL * pSurface
Definition: winddi.h:3481
VIDEOMEMORYINFO vmiData
Definition: ddrawint.h:1125
LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface
Definition: ddrawi.h:1872
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortConnectInfo(_In_ HANDLE hDirectDraw, _Inout_ PDD_GETVPORTCONNECTDATA puGetVPortConnectData)
BOOL WINAPI DdQueryDirectDrawObject(LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal, LPDDHALINFO pHalInfo, LPDDHAL_DDCALLBACKS pDDCallbacks, LPDDHAL_DDSURFACECALLBACKS pDDSurfaceCallbacks, LPDDHAL_DDPALETTECALLBACKS pDDPaletteCallbacks, LPD3DHAL_CALLBACKS pD3dCallbacks, LPD3DHAL_GLOBALDRIVERDATA pD3dDriverData, LPDDHAL_DDEXEBUFCALLBACKS pD3dBufferCallbacks, LPDDSURFACEDESC pD3dTextureFormats, LPDWORD pdwFourCC, LPVIDMEM pvmList)
Definition: gdientry.c:1508
LPDDRAWI_DDRAWSURFACE_LCL * lplpSList
Definition: ddrawi.h:777
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:801
DWORD dwCaps2
Definition: ddraw.h:1059
LPDDRAWI_DIRECTDRAW_LCL lpDD
Definition: ddrawi.h:898
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:948
DWORD(PASCAL * LPDDHAL_GETAVAILDRIVERMEMORY)(LPDDHAL_GETAVAILDRIVERMEMORYDATA)
Definition: ddrawi.h:442
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdSetExclusiveMode(_In_ HANDLE hDirectDraw, _Inout_ PDD_SETEXCLUSIVEMODEDATA puSetExclusiveModeData)
LPDDHALVPORTCB_CREATEVIDEOPORT CreateVideoPort
Definition: ddrawi.h:508
LPDDHALVPORTCB_GETLINE GetVideoPortLine
Definition: ddrawi.h:515
LPDDRAWI_DIRECTDRAW_LCL lpDD
Definition: ddrawi.h:891
DWORD(PASCAL * LPDDHALEXEBUFCB_CREATEEXEBUF)(LPDDHAL_CREATESURFACEDATA)
Definition: ddrawi.h:423
DWORD WINAPI DdGetBltStatus(LPDDHAL_GETBLTSTATUSDATA GetBltStatus)
Definition: gdientry.c:163
#define WINAPI
Definition: msvc.h:8
PGDI_SHARED_HANDLE_TABLE GdiSharedHandleTable
Definition: misc.c:34
#define DDOVER_KEYDEST
Definition: ddraw.h:604
#define DDRAWISURF_DCILOCK
Definition: ddrawi.h:1535
DWORD(PASCAL * LPDDHALVPORTCB_GETFLIPSTATUS)(LPDDHAL_GETVPORTFLIPSTATUSDATA)
Definition: ddrawi.h:498
#define DDRAWISURF_INMASTERSPRITELIST
Definition: ddrawi.h:1526
PVOID HANDLE
Definition: typedefs.h:71
unsigned long DWORD
Definition: ntddk_ex.h:95
#define DDHALINFO_GETDRIVERINFOSET
Definition: ddrawi.h:667
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpColorControl(_In_ HANDLE hVideoPort, _Inout_ PDD_VPORTCOLORDATA puVPortColorData)
#define SetLastError(x)
Definition: compat.h:409
LPDDHALVPORTCB_UPDATE UpdateVideoPort
Definition: ddrawi.h:519
struct _DDRAWI_DIRECTDRAW_LCL FAR * LPDDRAWI_DIRECTDRAW_LCL
Definition: d3dhal.h:40
DWORD dwFlags
Definition: ddrawi.h:619
#define LPVOID
Definition: nt_native.h:45
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1754
BOOL WINAPI DdDeleteSurfaceObject(LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal)
Definition: gdientry.c:1887
DWORD WINAPI DdGetFlipStatus(LPDDHAL_GETFLIPSTATUSDATA GetFlipStatus)
Definition: gdientry.c:177
_Out_ DD_HALINFO * pHalInfo
Definition: winddi.h:4226
#define DDOVER_KEYDESTOVERRIDE
Definition: ddraw.h:605
DWORD(PASCAL * LPD3DHAL_CONTEXTDESTROYCB)(LPD3DHAL_CONTEXTDESTROYDATA)
Definition: d3dhal.h:136
BOOL WINAPI D3dContextCreate(LPD3DHAL_CONTEXTCREATEDATA pdcci)
Definition: gdientry.c:1234
ULONG WINAPI DdQueryDisplaySettingsUniqueness(VOID)
Definition: gdientry.c:2031
DWORD WINAPI DvpGetVideoPortLine(LPDDHAL_GETVPORTLINEDATA pDvdGetVideoPortLine)
Definition: gdientry.c:784
DWORD WINAPI DdGetScanLine(LPDDHAL_GETSCANLINEDATA pGetScanLine)
Definition: gdientry.c:566
HBITMAP WINAPI DdCreateDIBSection(HDC hdc, CONST BITMAPINFO *pbmi, UINT iUsage, VOID **ppvBits, HANDLE hSectionApp, DWORD dwOffset)
Definition: gdientry.c:1949
#define DDMISCELLANEOUSCALLBACKSSIZE
Definition: ddrawi.h:630
DWORD WINAPI DdDestroySurface(LPDDHAL_DESTROYSURFACEDATA pDestroySurface)
Definition: gdientry.c:71
LPDDHAL_CREATESURFACEEX CreateSurfaceEx
Definition: ddrawi.h:467
LONG lDisplayPitch
Definition: ddrawint.h:115
static const WCHAR L[]
Definition: oid.c:1250
DWORD WINAPI DdWaitForVerticalBlank(LPDDHAL_WAITFORVERTICALBLANKDATA WaitForVerticalBlank)
Definition: gdientry.c:244
HDC hdc
Definition: main.c:9
DWORD dwRops[DD_ROP_SPACE]
Definition: ddrawint.h:1087
ULONG gcDirectDraw
Definition: gdientry.c:20
DDCOLORKEY dckDestColorkey
Definition: ddraw.h:1388
DWORD WINAPI DdColorControl(LPDDHAL_COLORCONTROLDATA pDdColorControl)
Definition: gdientry.c:866
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:414
LPDDHALCOLORCB_COLORCONTROL ColorControl
Definition: ddrawi.h:532
DWORD WINAPI DvpGetVideoSignalStatus(LPDDHAL_GETVPORTSIGNALDATA pDvdPortVideoSignalStatus)
Definition: gdientry.c:648
DWORD WINAPI DdUnlockD3D(LPDDHAL_UNLOCKDATA Unlock)
Definition: gdientry.c:1380
DWORD WINAPI DdFlip(LPDDHAL_FLIPDATA Flip)
Definition: gdientry.c:96
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdLockD3D(_In_ HANDLE hSurface, _Inout_ PDD_LOCKDATA puLockData)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface
Definition: ddrawi.h:847
LPDDRAWI_DDRAWSURFACE_LCL lpSurfCurr
Definition: ddrawi.h:1011
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpWaitForVideoPortSync(_In_ HANDLE hVideoPort, _Inout_ PDD_WAITFORVPORTSYNCDATA puWaitForVPortSyncData)
DWORD(PASCAL * LPDDHALVPORTCB_GETINPUTFORMATS)(LPDDHAL_GETVPORTINPUTFORMATDATA)
Definition: ddrawi.h:492
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75
#define DDHAL_SURFCB32_SETOVERLAYPOSITION
Definition: ddrawi.h:685
DWORD WINAPI DdCanCreateSurface(LPDDHAL_CANCREATESURFACEDATA CanCreateSurface)
Definition: gdientry.c:260
#define DDHAL_SURFCB32_GETBLTSTATUS
Definition: ddrawi.h:682
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:775
DWORD WINAPI DvpUpdateVideoPort(LPDDHAL_UPDATEVPORTDATA pDvdUpdateVideoPort)
Definition: gdientry.c:696
DDCOLORKEY dckSrcColorkey
Definition: ddraw.h:1389
__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)
struct _VIDEOMEMORY * PVIDEOMEMORY
DWORD(PASCAL * LPD3DHAL_CONTEXTDESTROYALLCB)(LPD3DHAL_CONTEXTDESTROYALLDATA)
Definition: d3dhal.h:137
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoPortInputFormats(_In_ HANDLE hVideoPort, _Inout_ PDD_GETVPORTINPUTFORMATDATA puGetVPortInputFormatData)
#define DDSD_PIXELFORMAT
Definition: ddraw.h:216
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:1773
struct _DD_SURFACE_MORE * PDD_SURFACE_MORE
DWORD dwOffscreenAlign
Definition: ddrawint.h:117
LPDDHAL_GETDRIVERSTATE GetDriverState
Definition: ddrawi.h:468
DDPIXELFORMAT ddpfSurface
Definition: ddrawint.h:156
LPDDHAL_DDEXEBUFCALLBACKS lpDDExeBufCallbacks
Definition: ddrawi.h:625
#define DDHAL_VPORT32_UPDATE
Definition: ddrawi.h:712
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS LPD3DHAL_CALLBACKS LPD3DHAL_GLOBALDRIVERDATA LPDDHAL_DDEXEBUFCALLBACKS LPDDSURFACEDESC pD3dTextureFormats
Definition: main.h:38
_Out_ DD_HALINFO _Out_ DWORD _Out_ VIDEOMEMORY _Out_ DWORD _Out_ DWORD * pdwFourCC
Definition: winddi.h:4226
struct _DDRAWI_DIRECTDRAW_GBL FAR * LPDDRAWI_DIRECTDRAW_GBL
Definition: d3dhal.h:39
BOOL WINAPI DeleteDC(_In_ HDC)
LPDDHALVPORTCB_GETFLIPSTATUS GetVideoPortFlipStatus
Definition: ddrawi.h:518
DWORD(PASCAL * LPDDHALVPORTCB_CREATEVIDEOPORT)(LPDDHAL_CREATEVPORTDATA)
Definition: ddrawi.h:489
DWORD WINAPI DdGetDriverInfo(LPDDHAL_GETDRIVERINFODATA pData)
Definition: gdientry.c:898
DWORD WINAPI DdUnlock(LPDDHAL_UNLOCKDATA Unlock)
Definition: gdientry.c:149
DWORD WINAPI DdGetAvailDriverMemory(LPDDHAL_GETAVAILDRIVERMEMORYDATA pDdGetAvailDriverMemory)
Definition: gdientry.c:820
#define DDRAWISURF_HELCB
Definition: ddrawi.h:1527
#define DDCOLORCONTROLCALLBACKSSIZE
Definition: ddrawi.h:634
struct _DD_SURFACE_MORE DD_SURFACE_MORE
PDD_SETEXCLUSIVEMODE SetExclusiveMode
Definition: ddrawint.h:612
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:1689
PDD_SURFACE_GLOBAL lpGbl
Definition: ddrawint.h:172
#define DDHAL_CB32_WAITFORVERTICALBLANK
Definition: ddrawi.h:657
LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo
Definition: main.h:121
DWORD WINAPI DdAddAttachedSurface(LPDDHAL_ADDATTACHEDSURFACEDATA Attach)
Definition: gdientry.c:35
DWORD WINAPI DvpCanCreateVideoPort(LPDDHAL_CANCREATEVPORTDATA pDvdCanCreateVideoPort)
Definition: gdientry.c:673
_In_ HBITMAP _In_ UINT _In_ UINT _Inout_ LPBITMAPINFO _In_ UINT iUsage
Definition: ntgdi.h:2780
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpDestroyVideoPort(_In_ HANDLE hVideoPort, _Inout_ PDD_DESTROYVPORTDATA puDestroyVPortData)
DWORD WINAPI DdBlt(LPDDHAL_BLTDATA Blt)
Definition: gdientry.c:50
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
BOOL WINAPI DdCreateDirectDrawObject(LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal, HDC hdc)
Definition: gdientry.c:1455
#define DDOVER_KEYSRC
Definition: ddraw.h:606
struct _DDHAL_DDSURFACECALLBACKS DDHAL_DDSURFACECALLBACKS
DDPIXELFORMAT ddpfSurface
Definition: ddrawi.h:1358
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:956
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)
struct _DD_NTCALLBACKS * PDD_NTCALLBACKS
#define DDRAWI_VPORTSTOP
Definition: ddrawi.h:670
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS LPD3DHAL_CALLBACKS LPD3DHAL_GLOBALDRIVERDATA LPDDHAL_DDEXEBUFCALLBACKS pD3dBufferCallbacks
Definition: main.h:38
DWORD WINAPI DvpGetVideoPortOutputFormats(LPDDHAL_GETVPORTLINEDATA pDvdGetVideoPortOutputFormat)
Definition: gdientry.c:796
DWORD(PASCAL * LPDDHAL_GETDRIVERSTATE)(LPDDHAL_GETDRIVERSTATEDATA)
Definition: ddrawi.h:460
DWORD WINAPI DdUpdateOverlay(LPDDHAL_UPDATEOVERLAYDATA UpdateOverlay)
Definition: gdientry.c:191
DWORD(PASCAL * LPDDHALCOLORCB_COLORCONTROL)(LPDDHAL_COLORCONTROLDATA)
Definition: ddrawi.h:527
LPDDRAWI_DDRAWSURFACE_INT * lplpDDSurface
Definition: ddrawi.h:971
uint32_t * LPDWORD
Definition: typedefs.h:57
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpCanCreateVideoPort(_In_ HANDLE hDirectDraw, _Inout_ PDD_CANCREATEVPORTDATA puCanCreateVPortData)
#define DDHAL_SURFCB32_ADDATTACHEDSURFACE
Definition: ddrawi.h:681
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdDestroyD3DBuffer(_In_ HANDLE hSurface)
#define DDHAL_CB32_CREATESURFACE
Definition: ddrawi.h:654
unsigned int ULONG
Definition: retypes.h:1
DDPIXELFORMAT ddpfDisplay
Definition: ddrawint.h:116
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
LPDDHALVPORTCB_WAITFORSYNC WaitForVideoPortSync
Definition: ddrawi.h:520
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
FLATPTR fpVidMem
Definition: ddrawint.h:146
#define ULONG_PTR
Definition: config.h:101
DWORD(PASCAL * LPDDHALVPORTCB_GETBANDWIDTH)(LPDDHAL_GETVPORTBANDWIDTHDATA)
Definition: ddrawi.h:491
char * cleanup(char *str)
Definition: wpickclick.c:99
struct _DD_NTCALLBACKS DD_NTCALLBACKS
#define DDOVER_KEYSRCOVERRIDE
Definition: ddraw.h:607
static HBITMAP
Definition: button.c:44
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1881
DWORD dwFlags
Definition: ddrawi.h:217
#define DDRAWISURF_BACKBUFFER
Definition: ddrawi.h:1529
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS LPDDHAL_DDPALETTECALLBACKS LPD3DHAL_CALLBACKS pD3dCallbacks
Definition: main.h:38
LPDDRAWI_DIRECTDRAW_LCL lpDD
Definition: ddrawi.h:1018
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdFlip(_In_ HANDLE hSurfaceCurrent, _In_ HANDLE hSurfaceTarget, _In_ HANDLE hSurfaceCurrentLeft, _In_ HANDLE hSurfaceTargetLeft, _Inout_ PDD_FLIPDATA puFlipData)
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
DWORD WINAPI DvpDestroyVideoPort(LPDDHAL_DESTROYVPORTDATA pDvdDestoryPort)
Definition: gdientry.c:597
DWORD WINAPI DdCreateD3DBuffer(LPDDHAL_CREATESURFACEDATA pCreateSurface)
Definition: gdientry.c:1278
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdWaitForVerticalBlank(_In_ HANDLE hDirectDraw, _Inout_ PDD_WAITFORVERTICALBLANKDATA puWaitForVerticalBlankData)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdCreateSurfaceEx(_In_ HANDLE hDirectDraw, _In_ HANDLE hSurface, _In_ DWORD dwSurfaceHandle)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdReleaseDC(_In_ HANDLE hSurface)
#define __FUNCTION__
Definition: types.h:112
LPDDHALINFO LPDDHAL_DDCALLBACKS LPDDHAL_DDSURFACECALLBACKS pDDSurfaceCallbacks
Definition: main.h:38
#define DDHAL_SURFCB32_UNLOCK
Definition: ddrawi.h:678
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:784
LPDDRAWI_DDRAWSURFACE_GBL lpGbl
Definition: ddrawi.h:1468
HDC WINAPI DdGetDC(LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal, LPPALETTEENTRY pColorTable)
Definition: gdientry.c:1923
BYTE * PBYTE
Definition: pedump.c:66
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:1851
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:983
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDdSetGammaRamp(_In_ HANDLE hDirectDraw, _In_ HDC hdc, _In_reads_bytes_(sizeof(GAMMARAMP)) LPVOID lpGammaRamp)
void WINAPI SHIM_OBJ_NAME() OutputDebugStringA(LPCSTR lpOutputString)
Definition: ignoredbgout.c:18
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdUnlock(_In_ HANDLE hSurface, _Inout_ PDD_UNLOCKDATA puUnlockData)
struct _DDHAL_DDEXEBUFCALLBACKS DDHAL_DDEXEBUFCALLBACKS
DWORD dwSize
Definition: ddraw.h:1070
#define HeapFree(x, y, z)
Definition: compat.h:394
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetAvailDriverMemory(_In_ HANDLE hDirectDraw, _Inout_ PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData)
#define CONST
Definition: pedump.c:81
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetFlipStatus(_In_ HANDLE hSurface, _Inout_ PDD_GETFLIPSTATUSDATA puGetFlipStatusData)
LPDDHALVPORTCB_FLIP FlipVideoPort
Definition: ddrawi.h:509
DWORD dwOverlayAlign
Definition: ddrawint.h:118
__kernel_entry W32KAPI DWORD APIENTRY NtGdiD3dContextDestroy(_In_ LPD3DNTHAL_CONTEXTDESTROYDATA pdcdd)
LPDDHALVPORTCB_DESTROYVPORT DestroyVideoPort
Definition: ddrawi.h:517
struct _DDHAL_GETDRIVERINFODATA DDHAL_GETDRIVERINFODATA
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDdGetDriverState(_Inout_ PDD_GETDRIVERSTATEDATA pdata)
__kernel_entry W32KAPI DWORD APIENTRY NtGdiDvpGetVideoSignalStatus(_In_ HANDLE hVideoPort, _Inout_ PDD_GETVPORTSIGNALDATA puGetVPortSignalData)
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1820
LPDDRAWI_DDRAWSURFACE_LCL lpDDSLcl
Definition: d3dhal.h:241
BOOL WINAPI DdResetVisrgn(LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal, HWND hWnd)
Definition: gdientry.c:1909
LPDDRAWI_DDVIDEOPORT_LCL lpVideoPort
Definition: ddrawi.h:907