ReactOS  0.4.13-dev-249-gcba1a2f
main.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include "main.h"
3 
4 
5 // TODO:
6 //
7 // - free memory
8 // - Check if we ran out of memory (HeapAlloc == NULL)
13 
18 
21 
24 
27 
30 
31  /* Surface */
38  //DDRAWI_DDRAWCLIPPER_INT mPrimaryClipperInterface;
41 
46 
48 
49 
50 typedef struct _DD_GETDRIVERINFODATA {
61 
62 
68 
69 
71  LPSTR lpCmdLine, int nCmdShow)
72 {
73  /* HAL Startup process */
75  HBITMAP hbmp;
76  const UINT bmiSize = sizeof(BITMAPINFOHEADER) + 0x10;
77  UCHAR *pbmiData;
79 
80  DWORD *pMasks;
81  //BOOL newmode = FALSE;
82  //DWORD Status; /* for create surface */
83  UINT i;
84  UINT j;
85  UINT cSurfaces;
86 
87  DDHAL_CANCREATESURFACEDATA mDdCanCreateSurface;
88  DDHAL_UPDATEOVERLAYDATA mDdUpdateOverlay;
89  DDRAWI_DDRAWSURFACE_LCL *pDDSurface;
90  DDHAL_CREATESURFACEDATA mDdCreateSurface;
91 
92 
93  /* get the functions we need */
94 // DD_GETDRIVERINFODATA drv;
95  HMODULE lib = LoadLibrary("gdi32.dll");
100 
101  printf("This apps showing how to start up directx draw/d3d interface and some other as well\n");
102  printf("This code have been releae to some close applactons with my premtions, if any company\n");
103  printf("want use part or whole code, you need contact the orginal author to ask for premtions\n");
104  printf("This code are release under alot of diffent licen\n");
105  printf("All GPL and LGPL project have right use and studing this code.\n");
106  printf("This code maybe need more comment to known how stuff working and maybe looking bit mesy\n");
107  printf("Bestreagds Magnus Olsen magnus@greatlord.com or greatlord@reactos.org\n");
108  printf("Copyright 2006 by Magnus Olsen\n\n");
109  printf("This demo showing how to start dx draw hal and create a primary surface,\n");
110  printf("and a overlay sufrace and blt to the primary surface\n");
111 
112 
113  /*
114  Get and Create mode info
115  */
116  mcModeInfos = 1;
119  mcModeInfos * sizeof(DDHALMODEINFO));
120 
121  if (mpModeInfos == NULL)
122  {
123  printf("Fail to alloc mpModeInfos\n");
124  return DD_FALSE;
125  }
126 
127 
128  EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devmode);
129 
135 
136  /*
137  Setup HDC and mDDrawGlobal right
138  */
139  hdc = CreateDCW(L"DISPLAY",L"DISPLAY",NULL,NULL);
140 
141  if (hdc == NULL)
142  {
143  printf("Fail to create HDC\n");
144  return DD_FALSE;
145  }
146 
147  /*
148  Dectect RGB bit mask
149  */
151  if (hbmp==NULL)
152  {
154  DeleteDC(hdc);
155  printf("Fail to Create Compatible Bitmap\n");
156  return DD_FALSE;
157  }
158 
159  pbmiData = (UCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, bmiSize);
160  pbmi = (BITMAPINFO*)pbmiData;
161 
162  if (pbmiData==NULL)
163  {
165  free(mpModeInfos);
166  DeleteDC(hdc);
168  printf("Fail to Alloc pbmiData\n");
169  return DDERR_UNSUPPORTED;
170  }
171 
175  pbmi->bmiHeader.biWidth = 1;
176  pbmi->bmiHeader.biHeight = 1;
177 
178  GetDIBits(hdc, hbmp, 0, 0, NULL, pbmi, 0);
180 
181  pMasks = (DWORD*)(pbmiData + sizeof(BITMAPINFOHEADER));
182  mpModeInfos[0].dwRBitMask = pMasks[0];
183  mpModeInfos[0].dwGBitMask = pMasks[1];
184  mpModeInfos[0].dwBBitMask = pMasks[2];
185  mpModeInfos[0].dwAlphaBitMask = pMasks[3];
186 
187  HeapFree(GetProcessHeap(), 0, pbmiData);
188 
189  /*
190  prepare start up the DX Draw HAL interface now
191  */
192 
194  memset(&mHALInfo, 0, sizeof(DDHALINFO));
195  memset(&mCallbacks, 0, sizeof(DDHAL_CALLBACKS));
196 
197  /*
198  Startup DX HAL step one of three
199  */
201  {
203  DeleteDC(hdc);
205  printf("Fail to Create Direct DrawObject\n");
206  return DD_FALSE;
207  }
208 
209  mDDrawGlobal.dwRefCnt = 1; //addref / remove ref
210 
211  // Do not relase HDC it have been map in kernel mode
212  // DeleteDC(hdc);
213 
214  /* we need reanable it if screen res have changes, and some bad drv need be reanble very few
215  to contiune */
216  /*
217  if (!DdReenableDirectDrawObject(&mDDrawGlobal, &newmode))
218  {
219  HeapFree(GetProcessHeap(), 0, mpModeInfos);
220  DeleteDC(hdc);
221  DeleteObject(hbmp);
222  return DD_FALSE;
223  }*/
224 
225  /*
226  Setup the DirectDraw Local
227  */
228 
232 
235  //mDDrawLocal.dwLocalFlags = DDRAWILCL_DIRECTDRAW7;
236 
237 
238  /*
239  Startup DX HAL step two of three
240  */
241 
243  &mHALInfo,
244  &mCallbacks.HALDD,
247  &mD3dCallbacks,
250  NULL,
251  NULL,
252  NULL))
253  {
255  DeleteDC(hdc);
257  // FIXME Close DX fristcall and second call
258  return DD_FALSE;
259  }
260 
263  if (mpvmList == NULL)
264  {
266  DeleteDC(hdc);
268  // FIXME Close DX fristcall and second call
269  printf("Fail to QueryDirect Draw Object frist pass\n");
270  return DD_FALSE;
271  }
272 
275  if (mpFourCC == NULL)
276  {
279  DeleteDC(hdc);
281  // FIXME Close DX fristcall and second call
282  return DD_FALSE;
283  }
284 
287  if (mpTextures == NULL)
288  {
292  DeleteDC(hdc);
294  // FIXME Close DX fristcall and second call
295  printf("Fail QueryDirect Draw Object to Alloc mpTextures \n");
296  return DD_FALSE;
297  }
298 
302 
304  &mDDrawGlobal,
305  &mHALInfo,
306  &mCallbacks.HALDD,
309  &mD3dCallbacks,
312  mpTextures,
313  mpFourCC,
314  mpvmList))
315 
316  {
321  DeleteDC(hdc);
323  printf("Fail to QueryDirect Draw Object second pass\n");
324  return DD_FALSE;
325  }
326 
327  /*
328  Copy over from HalInfo to DirectDrawGlobal
329  */
330 
331  // this is wrong, cDriverName need be in ASC code not UNICODE
332  //memcpy(mDDrawGlobal.cDriverName, mDisplayAdapter, sizeof(wchar)*MAX_DRIVER_NAME);
333 
336 
340 
346 
348 
349 
350 
351  /* Hal insate is down now */
352 
353  /* cleare surface code now*/
354 
355  // memset(&mGlobal, 0, sizeof(DDRAWI_DDRAWSURFACE_GBL));
356  // memset(&mMore, 0, sizeof(DDRAWI_DDRAWSURFACE_MORE));
357 
358  /* mLocal.lpSurfMore = &mMore;
359  memset(mMore, 0, sizeof(DDRAWI_DDRAWSURFACE_MORE));
360  mMore.dwSize = sizeof(DDRAWI_DDRAWSURFACE_MORE);*/
361 
363 
364  /* cleare surface ends now */
365 
366  /* create primare surface now */
367 
368  memset(&mddsdPrimary, 0, sizeof(DDSURFACEDESC));
369  mddsdPrimary.dwSize = sizeof(DDSURFACEDESC);
370  mddsdPrimary.dwFlags = DDSD_CAPS;
372 
373  mDdCanCreateSurface.lpDD = &mDDrawGlobal;
374  mDdCanCreateSurface.CanCreateSurface = mCallbacks.HALDD.CanCreateSurface;
375  mDdCanCreateSurface.bIsDifferentPixelFormat = FALSE; //isDifferentPixelFormat;
376  mDdCanCreateSurface.lpDDSurfaceDesc = &mddsdPrimary; // pDDSD;
377 
378  if (mHALInfo.lpDDCallbacks->CanCreateSurface(&mDdCanCreateSurface)== DDHAL_DRIVER_NOTHANDLED)
379  {
380  printf("Fail to mDdCanCreateSurface DDHAL_DRIVER_NOTHANDLED\n");
381  return DDERR_NOTINITIALIZED;
382  }
383 
384  if (mDdCanCreateSurface.ddRVal != DD_OK)
385  {
386  printf("Fail to mDdCanCreateSurface mDdCanCreateSurface.ddRVal = %d:%s\n",(int)mDdCanCreateSurface.ddRVal,DDErrorString(mDdCanCreateSurface.ddRVal));
387  return DDERR_NOTINITIALIZED;
388  }
389 
397 
400 
401 
402  //mPrimaryMore. = mpr
403 
409  mPrimaryLocal.ddsCaps.dwCaps = mddsdPrimary.ddsCaps.dwCaps;
410 
412 
413  mDdCreateSurface.lpDD = &mDDrawGlobal;
414  mDdCreateSurface.CreateSurface = mCallbacks.HALDD.CreateSurface;
415  mDdCreateSurface.lpDDSurfaceDesc = &mddsdPrimary;//pDDSD;
416  mDdCreateSurface.lplpSList = mpPrimaryLocals; //cSurfaces;
417  mDdCreateSurface.dwSCnt = 1 ; //ppSurfaces;
418 
419  if (mHALInfo.lpDDCallbacks->CreateSurface(&mDdCreateSurface) == DDHAL_DRIVER_NOTHANDLED)
420  {
421  printf("Fail to mDdCreateSurface DDHAL_DRIVER_NOTHANDLED \n");
422  return DDERR_NOTINITIALIZED;
423  }
424 
425 
426  if (mDdCreateSurface.ddRVal != DD_OK)
427  {
428  printf("Fail to mDdCanCreateSurface mDdCreateSurface.ddRVal = %d:%s\n",(int)mDdCreateSurface.ddRVal,DDErrorString(mDdCreateSurface.ddRVal));
429  return mDdCreateSurface.ddRVal;
430  }
431 
432  // -- Setup Clipper ---------------------------------------------------------
436  //mPrimaryClipperGlobal.hWnd = (ULONG_PTR)hwnd;
440 
443 
444  //memset(&mPrimaryClipperInterface, 0, sizeof(DDRAWI_DDRAWCLIPPER_INT));
445  //mPrimaryClipperInterface.lpLcl = &mPrimaryClipperLocal;
446  //mPrimaryClipperInterface.dwIntRefCnt = 1;
447  //mPrimaryClipperInterface.lpLink = null;
448  //mPrimaryClipperInterface.lpVtbl = null;
449 
451  //mPrimaryMore.lpDDIClipper = &mPrimaryClipperInterface;
452 
454 
455 
456  /* create primare surface is down now */
457 
458  /* create overlay surface now */
459 
460  memset(&mddsdOverlay, 0, sizeof(DDSURFACEDESC));
461  mddsdOverlay.dwSize = sizeof(DDSURFACEDESC);
463 
465 
466  mddsdOverlay.dwWidth = 100; //pels;
467  mddsdOverlay.dwHeight = 100; // lines;
468  mddsdOverlay.dwBackBufferCount = 1; //cBuffers;
469 
470  mddsdOverlay.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);
471  mddsdOverlay.ddpfPixelFormat.dwFlags = DDPF_RGB;
472  mddsdOverlay.ddpfPixelFormat.dwRGBBitCount = 32;
473 
474 
475  //DDHAL_CANCREATESURFACEDATA mDdCanCreateSurface;
476  mDdCanCreateSurface.lpDD = &mDDrawGlobal;
477  mDdCanCreateSurface.CanCreateSurface = mCallbacks.HALDD.CanCreateSurface;
478  mDdCanCreateSurface.bIsDifferentPixelFormat = TRUE; //isDifferentPixelFormat;
479  mDdCanCreateSurface.lpDDSurfaceDesc = &mddsdOverlay; // pDDSD;
480 
481 
482  if (mHALInfo.lpDDCallbacks->CanCreateSurface(&mDdCanCreateSurface)== DDHAL_DRIVER_NOTHANDLED)
483  {
484  // derr(L"DirectDrawImpl[%08x]::__createPrimary Cannot create primary [%08x]", this, rv);
485 
486  printf("Fail to mDdCanCreateSurface DDHAL_DRIVER_NOTHANDLED \n");
487  return DDERR_NOTINITIALIZED;
488  }
489 
490  if (mDdCanCreateSurface.ddRVal != DD_OK)
491  {
492  printf("Fail to mDdCanCreateSurface mDdCanCreateSurface.ddRVal = %d:%s\n",(int)mDdCanCreateSurface.ddRVal,DDErrorString(mDdCanCreateSurface.ddRVal));
493  return DDERR_NOTINITIALIZED;
494  }
495 
496 
503  mOverlayGlobal.lPitch = -1;
504  mOverlayGlobal.ddpfSurface = mddsdOverlay.ddpfPixelFormat;
505 
506  // setup front- and backbuffer surfaces
507  cSurfaces = mddsdOverlay.dwBackBufferCount + 1;
508  for ( i = 0; i < cSurfaces; i++)
509  {
512 
517  mOverlayLocal[i].dwFlags = (i == 0) ?
520 
525 
526  mOverlayLocal[i].ddsCaps.dwCaps = mddsdOverlay.ddsCaps.dwCaps;
528  }
529 
530  for ( i = 0; i < cSurfaces; i++)
531  {
532  j = (i + 1) % cSurfaces;
533 
534 
535  /*if (!mHALInfo.lpDDSurfaceCallbacks->AddAttachedSurface(mpOverlayLocals[i], mpOverlayLocals[j]))
536  {
537  // derr(L"DirectDrawImpl[%08x]::__setupDevice DdAttachSurface(%d, %d) failed", this, i, j);
538  return DD_FALSE;
539  }*/
540 
542  {
543  // derr(L"DirectDrawImpl[%08x]::__setupDevice DdAttachSurface(%d, %d) failed", this, i, j);
544  printf("Fail to DdAttachSurface (%d:%d)\n", i, j);
545  return DD_FALSE;
546  }
547 
548  }
549 
550 
551  // DDHAL_CREATESURFACEDATA mDdCreateSurface;
552  mDdCreateSurface.lpDD = &mDDrawGlobal;
553  mDdCreateSurface.CreateSurface = mCallbacks.HALDD.CreateSurface;
554  mDdCreateSurface.lpDDSurfaceDesc = &mddsdOverlay;//pDDSD;
555  mDdCreateSurface.lplpSList = mpOverlayLocals; //cSurfaces;
556  mDdCreateSurface.dwSCnt = 1 ; //ppSurfaces;
557 
558  if (mHALInfo.lpDDCallbacks->CreateSurface(&mDdCreateSurface) == DDHAL_DRIVER_NOTHANDLED)
559  {
560  printf("Fail to mDdCreateSurface = DDHAL_DRIVER_HANDLED\n");
561  return DDERR_NOTINITIALIZED;
562  }
563 
564 
565  if (mDdCreateSurface.ddRVal != DD_OK)
566  {
567  printf("Fail to mDdCreateSurface mDdCreateSurface.ddRVal = %d:%s\n",(int)mDdCreateSurface.ddRVal,DDErrorString(mDdCreateSurface.ddRVal));
568  return mDdCreateSurface.ddRVal;
569  }
570 
571 
572  mDdUpdateOverlay.lpDD = &mDDrawGlobal;
574  mDdUpdateOverlay.lpDDDestSurface = mpPrimaryLocals[0];
575  mDdUpdateOverlay.lpDDSrcSurface = mpOverlayLocals[0];//pDDSurface;
576  mDdUpdateOverlay.dwFlags = DDOVER_SHOW;
577 
578  /* if (flags & DDOVER_DDFX)
579  mDdUpdateOverlay.overlayFX = *pFx;
580  copyRect(&mDdUpdateOverlay.rDest, pdst);
581  copyRect(&mDdUpdateOverlay.rSrc, psrc);
582 */
583 
584  mDdUpdateOverlay.rDest.top = 0;
585  mDdUpdateOverlay.rDest.left = 0;
586  mDdUpdateOverlay.rDest.right = 50;
587  mDdUpdateOverlay.rDest.bottom = 50;
588 
589  mDdUpdateOverlay.rSrc.top = 0;
590  mDdUpdateOverlay.rSrc.left = 0;
591  mDdUpdateOverlay.rSrc.right = 50;
592  mDdUpdateOverlay.rSrc.bottom = 50;
593 
594 
595 
596 
597  if ( mDdUpdateOverlay.UpdateOverlay(&mDdUpdateOverlay) == DDHAL_DRIVER_NOTHANDLED)
598  {
599  printf("Fail to mDdBlt = DDHAL_DRIVER_HANDLED\n");
600  return DDERR_NOTINITIALIZED;
601  }
602 
603 
604  if (mDdUpdateOverlay.ddRVal != DD_OK)
605  {
606  printf("Fail to mDdUpdateOverlay mDdUpdateOverlay.ddRVal = %d:%s\n",(int)mDdUpdateOverlay.ddRVal,DDErrorString(mDdUpdateOverlay.ddRVal));
607  return mDdUpdateOverlay.ddRVal;
608  }
609 
610  /* blt */
611 
612 
613  pDDSurface = mpPrimaryLocals[0];
614 
615  if (!DdResetVisrgn(pDDSurface, NULL))
616  {
617  // derr(L"DirectDrawImpl[%08x]::_clear DdResetVisrgn failed", this);
618  }
619 
620 
621  memset(&mDdBlt, 0, sizeof(DDHAL_BLTDATA));
622  memset(&mDdBlt.bltFX, 0, sizeof(DDBLTFX));
623  mDdBlt.bltFX.dwSize = sizeof(DDBLTFX);
624 
628 
630  mDdBlt.rDest.top = 50;
631  mDdBlt.rDest.bottom = 100;
632  mDdBlt.rDest.left = 0;
633  mDdBlt.rDest.right = 100;
636  mDdBlt.bltFX.dwFillColor = 0xFFFF00;
638  // mDdBlt.IsClipped = TRUE;
639 
641  {
642  printf("Fail to mDdBlt = DDHAL_DRIVER_HANDLED\n");
643  return DDHAL_DRIVER_HANDLED;
644  }
645 
646 
647 
648  if (mDdBlt.ddRVal!=DD_OK)
649  {
650  printf("Fail to mDdBlt mDdBlt.ddRVal = %d:%s\n",(int)mDdBlt.ddRVal,DDErrorString(mDdBlt.ddRVal));
651  return mDdBlt.ddRVal;
652  }
653 
654  mDdUpdateOverlay.rDest.right = 100;
655  if ( mDdUpdateOverlay.UpdateOverlay(&mDdUpdateOverlay) == DDHAL_DRIVER_NOTHANDLED)
656  {
657  printf("Fail to mDdUpdateOverlay = DDERR_NOTINITIALIZED\n");
658  return DDERR_NOTINITIALIZED;
659  }
660 
661  while(TRUE);
662 
663  return DD_OK;
664 
665 
666 }
667 
668 
DWORD dwHeight
Definition: ddrawi.h:172
DWORD dwNumFourCCCodes
Definition: ddrawi.h:270
DWORD dwFillColor
Definition: ddraw.h:1310
DDHALMODEINFO * mpModeInfos
Definition: main.c:20
LPDDSURFACEDESC lpDDSurfaceDesc
Definition: ddrawi.h:776
#define TRUE
Definition: types.h:120
DDSURFACEDESC * mpTextures
Definition: main.c:29
DWORD dwExpectedSize
Definition: main.c:55
D3DHAL_GLOBALDRIVERDATA mD3dDriverData
Definition: main.c:17
BITMAPINFOHEADER bmiHeader
Definition: wingdi.h:1454
RECTL rDest
Definition: ddrawi.h:848
#define LoadLibrary
Definition: winbase.h:3676
#define DDERR_UNSUPPORTED
Definition: ddraw.h:127
LPDDRAWI_DDRAWSURFACE_MORE lpSurfMore
Definition: ddrawi.h:1467
UINT mcFourCC
Definition: main.c:25
HDC WINAPI GetDC(_In_opt_ HWND)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface
Definition: ddrawi.h:849
LPDDRAWI_DIRECTDRAW_GBL lp16DD
Definition: ddrawi.h:1228
DDRAWI_DDRAWSURFACE_GBL mPrimaryGlobal
Definition: main.c:32
D3DHAL_GLOBALDRIVERDATA * LPD3DHAL_GLOBALDRIVERDATA
Definition: d3dhal.h:83
_In_ HBITMAP _In_ UINT _In_ UINT _Inout_ LPBITMAPINFO pbmi
Definition: ntgdi.h:2780
WORD wRefreshRate
Definition: ddrawi.h:176
struct tagBITMAPINFOHEADER BITMAPINFOHEADER
VIDMEMINFO vmiData
Definition: ddrawi.h:611
DWORD dwCaps
Definition: ddraw.h:727
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
#define free
Definition: debug_ros.c:5
#define DdResetVisrgn
Definition: ddrawgdi.h:29
#define DDRAWISURF_HASPIXELFORMAT
Definition: ddrawi.h:1515
static HDC
Definition: imagelist.c:92
DWORD dwSize
Definition: ddraw.h:1272
DDRAWI_DDRAWSURFACE_MORE mPrimaryMore
Definition: main.c:33
DDRAWI_DDRAWSURFACE_LCL mOverlayLocal[6]
Definition: main.c:43
long bottom
Definition: polytest.cpp:53
HANDLE HWND
Definition: compat.h:13
DDRAWI_DDRAWSURFACE_GBL mOverlayGlobal
Definition: main.c:42
LPDWORD lpdwFourCC
Definition: ddrawi.h:616
#define DDERR_NOTINITIALIZED
Definition: ddraw.h:185
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
LPDDRAWI_DDRAWCLIPPER_LCL lpDDClipper
Definition: ddrawi.h:1481
struct _DDHALMODEINFO DDHALMODEINFO
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1346
struct _VIDMEM * LPVIDMEM
Definition: dmemmgr.h:33
#define DDRAWISURF_FRONTBUFFER
Definition: ddrawi.h:1528
struct _DD_MISCELLANEOUSCALLBACKS DD_MISCELLANEOUSCALLBACKS
DWORD dmBitsPerPel
Definition: wingdi.h:1625
DWORD dwNumHeaps
Definition: ddrawi.h:227
char * LPSTR
Definition: xmlstorage.h:182
DWORD dwAlphaBitMask
Definition: ddrawi.h:180
LPDDHAL_CALLBACKS lpDDCB
Definition: ddrawi.h:1179
DWORD dwBBitMask
Definition: ddrawi.h:179
DDRAWI_DDRAWSURFACE_LCL * mpOverlayLocals[6]
Definition: main.c:44
#define DWORD
Definition: nt_native.h:44
#define BI_BITFIELDS
Definition: mmreg.h:507
struct _DDPIXELFORMAT DDPIXELFORMAT
#define ENUM_CURRENT_SETTINGS
Definition: winuser.h:179
#define DDRAWICLIP_ISINITIALIZED
Definition: ddrawi.h:1606
DDRAWI_DDRAWSURFACE_LCL mPrimaryLocal
Definition: main.c:34
uint32_t ULONG_PTR
Definition: typedefs.h:63
void DDSURFACEDESC
Definition: amvideo.idl:24
#define DDSCAPS_FLIP
Definition: ddraw.h:253
LPDDHALSURFCB_UPDATEOVERLAY UpdateOverlay
Definition: ddrawi.h:1877
#define DDSCAPS_VISIBLE
Definition: ddraw.h:265
UINT mcTextures
Definition: main.c:28
HINSTANCE hInst
Definition: main.c:29
struct _DD_GETDRIVERINFODATA DD_GETDRIVERINFODATA
long right
Definition: polytest.cpp:53
#define DDHAL_DRIVER_HANDLED
Definition: ddrawi.h:321
#define DD_OK
Definition: ddraw.h:186
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
DDHAL_DDPALETTECALLBACKS HALDDPalette
Definition: ddrawi.h:737
#define DDSD_BACKBUFFERCOUNT
Definition: ddraw.h:212
DWORD dwMonitorFrequency
Definition: ddrawi.h:613
#define DDSD_CAPS
Definition: ddraw.h:208
DWORD dwNumModes
Definition: ddrawi.h:617
LPDDHAL_CANCREATESURFACE CanCreateSurface
Definition: ddrawi.h:788
DDCORECAPS ddCaps
Definition: ddrawi.h:1221
LPDDRAWI_DIRECTDRAW_GBL lpGbl
Definition: ddrawi.h:1155
struct _DDRAWI_DDRAWSURFACE_MORE DDRAWI_DDRAWSURFACE_MORE
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:2016
long top
Definition: polytest.cpp:53
#define DDRAWISURFGBL_ISGDISURFACE
Definition: ddrawi.h:1363
DWORD biCompression
Definition: amvideo.idl:35
DDHAL_DDEXEBUFCALLBACKS mD3dBufferCallbacks
Definition: main.c:15
struct _DDHAL_DDPALETTECALLBACKS * LPDDHAL_DDPALETTECALLBACKS
DDHAL_CALLBACKS mCallbacks
Definition: main.c:14
smooth NULL
Definition: ftsmooth.c:416
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:622
LPDDRAWI_DDRAWCLIPPER_GBL lpGbl
Definition: ddrawi.h:1996
DDRAWI_DDRAWCLIPPER_GBL mPrimaryClipperGlobal
Definition: main.c:37
DDRAWI_DIRECTDRAW_LCL mDDrawLocal
Definition: main.c:11
UINT mcModeInfos
Definition: main.c:19
#define DDSCAPS_VIDEOMEMORY
Definition: ddraw.h:264
long left
Definition: polytest.cpp:53
static const WCHAR dwHeight[]
Definition: provider.c:60
DDHALINFO mHALInfo
Definition: main.c:12
PVOID GetAvailDriverMemory
Definition: main.c:66
LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface
Definition: ddrawi.h:1870
DDRAWI_DDRAWCLIPPER_LCL mPrimaryClipperLocal
Definition: main.c:36
DWORD dwActualSize
Definition: main.c:57
#define DDSCAPS_COMPLEX
Definition: ddraw.h:252
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 GLint GLint j
Definition: glfuncs.h:250
DWORD dwFlags
Definition: ddrawi.h:851
HBITMAP hbmp
#define DDBLT_COLORFILL
Definition: ddraw.h:555
#define DDSD_HEIGHT
Definition: ddraw.h:209
#define DDBLT_WAIT
Definition: ddraw.h:569
LPDDHALMODEINFO lpModeInfo
Definition: ddrawi.h:618
DWORD dwWidth
Definition: ddrawi.h:171
struct _DDRAWI_DDRAWSURFACE_LCL FAR * LPDDRAWI_DDRAWSURFACE_LCL
Definition: d3dhal.h:45
LPDDHAL_DDCALLBACKS lpDDCallbacks
Definition: ddrawi.h:608
struct _DD_GETDRIVERINFODATA * PDD_GETDRIVERINFODATA
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define DdQueryDirectDrawObject
Definition: ddrawgdi.h:25
LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface
Definition: ddrawi.h:1872
#define DDPF_RGB
Definition: ddraw.h:507
LPDDRAWI_DDRAWSURFACE_LCL * lplpSList
Definition: ddrawi.h:777
LONG HRESULT
Definition: typedefs.h:77
DEVMODEW devmode
HRESULT ddRVal
Definition: ddrawi.h:854
HRESULT ddRVal
Definition: main.c:58
struct _DDBLTFX DDBLTFX
#define DDRAWISURF_ATTACHED_FROM
Definition: ddrawi.h:1505
DWORD dwBPP
Definition: ddrawi.h:174
#define WINAPI
Definition: msvc.h:8
unsigned short WORD
Definition: ntddk_ex.h:93
static BOOL(WINAPI *pSnmpExtensionInit)(DWORD
unsigned long DWORD
Definition: ntddk_ex.h:95
LPDDHAL_CREATESURFACE CreateSurface
Definition: ddrawi.h:350
#define DDRAWISURF_IMPLICITCREATE
Definition: ddrawi.h:1503
DWORD dmPelsWidth
Definition: wingdi.h:1626
struct _DDHAL_DDSURFACECALLBACKS * LPDDHAL_DDSURFACECALLBACKS
struct _DDHAL_DDCALLBACKS * LPDDHAL_DDCALLBACKS
unsigned char UCHAR
Definition: xmlstorage.h:181
D3DHAL_CALLBACKS * LPD3DHAL_CALLBACKS
Definition: d3dhal.h:188
#define LPDWORD
Definition: nt_native.h:46
#define DDSCAPS_LOCALVIDMEM
Definition: ddraw.h:276
static const WCHAR L[]
Definition: oid.c:1250
#define DDOVER_SHOW
Definition: ddraw.h:608
HDC hdc
Definition: main.c:9
#define DDRAWISURF_HASOVERLAYDATA
Definition: ddrawi.h:1516
VIDMEM * mpvmList
Definition: main.c:23
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
VIDMEMINFO vmiData
Definition: ddrawi.h:1236
LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface
Definition: ddrawi.h:847
#define DDSCAPS_OVERLAY
Definition: ddraw.h:256
LPVIDMEM pvmList
Definition: ddrawi.h:228
DWORD hInstance
Definition: ddrawi.h:621
DDSURFACEDESC mddsdPrimary
Definition: main.c:39
LPDDHAL_CANCREATESURFACE CanCreateSurface
Definition: ddrawi.h:354
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:775
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:846
DDRAWI_DDRAWSURFACE_LCL * mpPrimaryLocals[1]
Definition: main.c:35
LPDDSURFACEDESC lpDDSurfaceDesc
Definition: ddrawi.h:785
#define DDSD_WIDTH
Definition: ddraw.h:210
#define DDSD_PIXELFORMAT
Definition: ddraw.h:216
#define DdAttachSurface
Definition: ddrawgdi.h:34
#define DdCreateDirectDrawObject
Definition: ddrawgdi.h:24
DWORD dmDisplayFrequency
Definition: wingdi.h:1632
#define DD_FALSE
Definition: ddraw.h:187
LPDDHALMODEINFO lpModeInfo
Definition: ddrawi.h:1244
DDHAL_DDSURFACECALLBACKS HALDDSurface
Definition: ddrawi.h:736
DDHAL_DDCALLBACKS HALDD
Definition: ddrawi.h:735
struct _DDRAWI_DIRECTDRAW_GBL FAR * LPDDRAWI_DIRECTDRAW_GBL
Definition: d3dhal.h:39
BOOL WINAPI DeleteDC(_In_ HDC)
DWORD dwRBitMask
Definition: ddrawi.h:177
DWORD dwGBitMask
Definition: ddrawi.h:178
DDRAWI_DDRAWSURFACE_MORE mOverlayMore[6]
Definition: main.c:45
#define DDSCAPS_PRIMARYSURFACE
Definition: ddraw.h:258
unsigned int UINT
Definition: ndis.h:50
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
DDBLTFX bltFX
Definition: ddrawi.h:853
DWORD * mpFourCC
Definition: main.c:26
DDHAL_BLTDATA mDdBlt
Definition: main.c:47
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1869
DDPIXELFORMAT ddpfSurface
Definition: ddrawi.h:1358
LPRGNDATA lpStaticClipList
Definition: ddrawi.h:2020
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)
DWORD dmPelsHeight
Definition: wingdi.h:1627
UINT mcvmList
Definition: main.c:22
LPDDSURFACEDESC lpTextureFormats
Definition: d3dhal.h:79
int WINAPI GetDIBits(_In_ HDC hdc, _In_ HBITMAP hbm, _In_ UINT start, _In_ UINT cLines, _Out_opt_ LPVOID lpvBits, _At_((LPBITMAPINFOHEADER) lpbmi, _Inout_) LPBITMAPINFO lpbmi, _In_ UINT usage)
DWORD dwModeIndex
Definition: ddrawi.h:615
LPDDRAWI_DIRECTDRAW_LCL lpExclusiveOwner
Definition: ddrawi.h:1238
DDHAL_DDEXEBUFCALLBACKS HALDDExeBuf
Definition: ddrawi.h:742
LONG lPitch
Definition: ddrawi.h:173
LPDDHALSURFCB_BLT Blt
Definition: ddrawi.h:855
D3DHAL_CALLBACKS mD3dCallbacks
Definition: main.c:16
#define ULONG_PTR
Definition: config.h:101
#define GetProcAddress(x, y)
Definition: compat.h:410
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmdshow)
Definition: main.c:8
DDSURFACEDESC mddsdOverlay
Definition: main.c:40
LPDDHALSURFCB_BLT Blt
Definition: ddrawi.h:398
LPDDHAL_CALLBACKS lpDDCBtmp
Definition: ddrawi.h:1224
static HBITMAP
Definition: button.c:44
#define DDRAWISURF_BACKBUFFER
Definition: ddrawi.h:1529
DDRAWI_DIRECTDRAW_GBL mDDrawGlobal
Definition: main.c:10
ULONG_PTR dwContext
Definition: main.c:59
const CHAR * DDErrorString(HRESULT hResult)
Definition: debug.cpp:4
#define memset(x, y, z)
Definition: compat.h:39
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:784
LPDDRAWI_DDRAWSURFACE_GBL lpGbl
Definition: ddrawi.h:1468
void * LPDDSURFACEDESC
Definition: ddstream.idl:19
#define DDRAWISURF_ATTACHED
Definition: ddrawi.h:1502
#define HeapFree(x, y, z)
Definition: compat.h:394
struct _DDHALINFO * LPDDHALINFO
Definition: ddrawi.h:123
static const WCHAR dwWidth[]
Definition: provider.c:59
#define DDRAWISURF_PARTOFPRIMARYCHAIN
Definition: ddrawi.h:1507
#define APIENTRY
Definition: api.h:79
struct _DDHAL_DDEXEBUFCALLBACKS * LPDDHAL_DDEXEBUFCALLBACKS
DWORD WINAPI GetCurrentProcessId(VOID)
Definition: proc.c:1188
#define DDRAWISURF_IMPLICITROOT
Definition: ddrawi.h:1506
DDCORECAPS ddCaps
Definition: ddrawi.h:612
#define printf
Definition: config.h:203
LPDDHALSURFCB_UPDATEOVERLAY UpdateOverlay
Definition: ddrawi.h:403
LPDDHAL_CREATESURFACE CreateSurface
Definition: ddrawi.h:780
struct _VIDMEM VIDMEM
BOOL IsClipped
Definition: ddrawi.h:856