ReactOS 0.4.16-dev-109-gf4cb10f
startup.c File Reference
#include "rosdraw.h"
Include dependency graph for startup.c:

Go to the source code of this file.

Functions

HRESULT WINAPI Create_DirectDraw (LPGUID pGUID, LPDIRECTDRAW *pIface, REFIID id, BOOL reenable)
 
HRESULT WINAPI StartDirectDraw (LPDIRECTDRAW iface, LPGUID lpGuid, BOOL reenable)
 
HRESULT WINAPI StartDirectDrawHel (LPDIRECTDRAW iface, BOOL reenable)
 
HRESULT WINAPI StartDirectDrawHal (LPDIRECTDRAW iface, BOOL reenable)
 

Variables

DDRAWI_DIRECTDRAW_GBL ddgbl
 
DDRAWI_DDRAWSURFACE_GBL ddSurfGbl
 
WCHAR classname [128]
 
WNDCLASSW wnd_class
 

Function Documentation

◆ Create_DirectDraw()

HRESULT WINAPI Create_DirectDraw ( LPGUID  pGUID,
LPDIRECTDRAW pIface,
REFIID  id,
BOOL  reenable 
)

Definition at line 20 of file startup.c.

22{
24
26 BOOL linking = FALSE;
27
28 if (pIface == NULL)
29 {
31 }
32
34
35 DX_STUB_str("Linking?\n")
36
38 {
39 linking = This->lpLcl ? TRUE:FALSE;
40 }
42 {
43 linking = FALSE;
44 }
46
47 /* fixme linking too second link when we shall not doing it */
48 if (!linking)
49 {
50 /* We do not have a DirectDraw interface, we need alloc it*/
52
53 DX_STUB_str("1. no linking\n");
54
55 DxHeapMemAlloc(memThis, sizeof(DDRAWI_DIRECTDRAW_INT));
56 if (memThis == NULL)
57 {
58 return DDERR_OUTOFMEMORY;
59 }
60
61 This = memThis;
62
63 /* Fixme release memory alloc if we fail */
64
66 if (This->lpLcl == NULL)
67 {
68 return DDERR_OUTOFMEMORY;
69 }
70 }
71 else
72 {
73 /* We got the DirectDraw interface alloc and we need create the link */
75
76 DX_STUB_str("2.linking\n");
77
78 /* step 1.Alloc the new DDRAWI_DIRECTDRAW_INT for the link */
79 DxHeapMemAlloc(newThis, sizeof(DDRAWI_DIRECTDRAW_INT));
80 if (newThis == NULL)
81 {
82 return DDERR_OUTOFMEMORY;
83 }
84
85 /* step 2 check if it not DDCREATE_HARDWAREONLY we got if so we fail */
86 if ((pGUID) && (pGUID != (LPGUID)DDCREATE_HARDWAREONLY))
87 {
88 if (pGUID !=NULL)
89 {
90 This = newThis;
92 }
93 }
94
95 /* step 3 do the link the old interface are store in the new one */
96 newThis->lpLink = This;
97
98 /* step 4 we need create new local directdraw struct for the new linked interface */
100 if (newThis->lpLcl == NULL)
101 {
102 This = newThis;
103 return DDERR_OUTOFMEMORY;
104 }
105
106 This = newThis;
107 }
108
109 This->lpLcl->lpGbl = &ddgbl;
110
111 *pIface = (LPDIRECTDRAW)This;
112
113 /* Get right interface we whant */
114
115 This->lpVtbl = 0;
116 if (IsEqualGUID(&IID_IDirectDraw7, id))
117 {
118 /* DirectDraw7 Vtable */
119 This->lpVtbl = &DirectDraw7_Vtable;
120 This->lpLcl->dwLocalFlags = This->lpLcl->dwLocalFlags + DDRAWILCL_DIRECTDRAW7;
121 *pIface = (LPDIRECTDRAW)&This->lpVtbl;
123 }
124 else if (IsEqualGUID(&IID_IDirectDraw4, id))
125 {
126 /* DirectDraw4 Vtable */
127 This->lpVtbl = &DirectDraw4_Vtable;
128 *pIface = (LPDIRECTDRAW)&This->lpVtbl;
130 }
131 else if (IsEqualGUID(&IID_IDirectDraw2, id))
132 {
133 /* DirectDraw2 Vtable */
134 This->lpVtbl = &DirectDraw2_Vtable;
135 *pIface = (LPDIRECTDRAW)&This->lpVtbl;
137 }
138 else if (IsEqualGUID(&IID_IDirectDraw, id))
139 {
140 /* DirectDraw Vtable */
141 This->lpVtbl = &DirectDraw_Vtable;
142 *pIface = (LPDIRECTDRAW)&This->lpVtbl;
144 }
145
146 if ( This->lpVtbl != 0)
147 {
148 DX_STUB_str("Got iface\n");
149
151 {
152 /*
153 RtlZeroMemory(&wnd_class, sizeof(wnd_class));
154 wnd_class.style = CS_HREDRAW | CS_VREDRAW;
155 wnd_class.lpfnWndProc = DefWindowProcW;
156 wnd_class.cbClsExtra = 0;
157 wnd_class.cbWndExtra = 0;
158 wnd_class.hInstance = GetModuleHandleW(0);
159 wnd_class.hIcon = 0;
160 wnd_class.hCursor = 0;
161 wnd_class.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH);
162 wnd_class.lpszMenuName = NULL;
163 wnd_class.lpszClassName = classname;
164 if(!RegisterClassW(&wnd_class))
165 {
166 DX_STUB_str("DDERR_GENERIC");
167 return DDERR_GENERIC;
168 }
169 */
170 This->lpLcl->hDD = ddgbl.hDD;
171 return DD_OK;
172 }
173 }
174
175 return DDERR_INVALIDPARAMS;
176}
struct _DDRAWI_DIRECTDRAW_INT * LPDDRAWI_DIRECTDRAW_INT
Definition: ddrawi.h:124
#define DDRAWILCL_DIRECTDRAW7
Definition: ddrawi.h:1211
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
ULONG WINAPI Main_DirectDraw_AddRef(LPDDRAWI_DIRECTDRAW_INT This)
Definition: ddraw_main.c:145
DDRAWI_DIRECTDRAW_GBL ddgbl
Definition: startup.c:12
HRESULT WINAPI StartDirectDraw(LPDIRECTDRAW iface, LPGUID lpGuid, BOOL reenable)
Definition: startup.c:180
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
unsigned int BOOL
Definition: ntddk_ex.h:94
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:66
IDirectDraw7Vtbl DirectDraw7_Vtable
#define DX_STUB_str(x)
Definition: rosdraw.h:254
IDirectDraw2Vtbl DirectDraw2_Vtable
Definition: ddraw_thunk.c:862
#define DxHeapMemAlloc(p, m)
Definition: rosdraw.h:113
IDirectDrawVtbl DirectDraw_Vtable
Definition: ddraw_thunk.c:835
IDirectDraw4Vtbl DirectDraw4_Vtable
Definition: ddraw_thunk.c:890
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DDERR_OUTOFMEMORY
Definition: ddraw.h:111
struct IDirectDraw * LPDIRECTDRAW
Definition: ddraw.h:710
#define DD_OK
Definition: ddraw.h:186
#define DDERR_INVALIDDIRECTDRAWGUID
Definition: ddraw.h:135
#define DDCREATE_HARDWAREONLY
Definition: ddraw.h:198
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
LPDDRAWI_DIRECTDRAW_LCL lpLcl
Definition: ddrawi.h:1148
LPDDRAWI_DIRECTDRAW_INT lpLink
Definition: ddrawi.h:1149

Referenced by DirectDrawCreate(), and DirectDrawCreateEx().

◆ StartDirectDraw()

HRESULT WINAPI StartDirectDraw ( LPDIRECTDRAW  iface,
LPGUID  lpGuid,
BOOL  reenable 
)

Definition at line 180 of file startup.c.

181{
183 DWORD hal_ret = DD_FALSE;
184 DWORD hel_ret = DD_FALSE;
185 DWORD devicetypes = 0;
186 DWORD dwFlags = 0;
187
188
190
191
192 /*
193 * ddgbl.dwPDevice is not longer in use in windows 2000 and higher
194 * I am using it for device type
195 * devicetypes = 1 : both hal and hel are enable
196 * devicetypes = 2 : both hal are enable
197 * devicetypes = 3 : both hel are enable
198 * devicetypes = 4 :loading a guid drv from the register
199 */
200
202 ddgbl.hDDVxd = -1;
203
204 if (reenable == FALSE)
205 {
206 if ((!IsBadReadPtr(This->lpLink,sizeof(LPDIRECTDRAW))) && (This->lpLink == NULL))
207 {
209 This->lpLcl->lpGbl->dwRefCnt++;
210 if (ddgbl.lpDDCBtmp == NULL)
211 {
212 // LPDDHAL_CALLBACKS
214 if (ddgbl.lpDDCBtmp == NULL)
215 {
216 DX_STUB_str("Out of memory\n");
217 return DD_FALSE;
218 }
219 }
220 }
221
223 if (!ddgbl.lpModeInfo)
224 {
225 return DDERR_OUTOFMEMORY;
226 }
227
228 }
229 /* Windows handler are by set of SetCooperLevel
230 * so do not set it
231 */
232
233 if (reenable == FALSE)
234 {
235 if (lpGuid == NULL)
236 {
237 devicetypes= 1;
238
239 /* Create HDC for default, hal and hel driver */
240 // This->lpLcl->hWnd = (ULONG_PTR) GetActiveWindow();
241 This->lpLcl->hDC = (ULONG_PTR)CreateDCA("DISPLAY",NULL,NULL,NULL);
242
243 /* cObsolete is undoc in msdn it being use in CreateDCA */
244 RtlCopyMemory(&ddgbl.cObsolete,&"DISPLAY",7);
245 RtlCopyMemory(&ddgbl.cDriverName,&"DISPLAY",7);
247 }
248 else if (lpGuid == (LPGUID) DDCREATE_HARDWAREONLY)
249 {
250 devicetypes = 2;
251 /* Create HDC for default, hal driver */
252 // This->lpLcl->hWnd =(ULONG_PTR) GetActiveWindow();
253 This->lpLcl->hDC = (ULONG_PTR)CreateDCA("DISPLAY",NULL,NULL,NULL);
254
255 /* cObsolete is undoc in msdn it being use in CreateDCA */
256 RtlCopyMemory(&ddgbl.cObsolete,&"DISPLAY",7);
257 RtlCopyMemory(&ddgbl.cDriverName,&"DISPLAY",7);
259 }
260 else if (lpGuid == (LPGUID) DDCREATE_EMULATIONONLY)
261 {
262 devicetypes = 3;
263
264 /* Create HDC for default, hal and hel driver */
265 //This->lpLcl->hWnd = (ULONG_PTR) GetActiveWindow();
266 This->lpLcl->hDC = (ULONG_PTR)CreateDCA("DISPLAY",NULL,NULL,NULL);
267
268 /* cObsolete is undoc in msdn it being use in CreateDCA */
269 RtlCopyMemory(&ddgbl.cObsolete,&"DISPLAY",7);
270 RtlCopyMemory(&ddgbl.cDriverName,&"DISPLAY",7);
271
273 }
274 else
275 {
276 /* FIXME : need getting driver from the GUID that have been pass in from
277 * the register. we do not support that yet
278 */
279 devicetypes = 4;
280 //This->lpLcl->hDC = (ULONG_PTR) NULL ;
281 //This->lpLcl->hDC = (ULONG_PTR)CreateDCA("DISPLAY",NULL,NULL,NULL);
282 }
283
284 /*
285 if ( (HDC)This->lpLcl->hDC == NULL)
286 {
287 DX_STUB_str("DDERR_OUTOFMEMORY\n");
288 return DDERR_OUTOFMEMORY ;
289 }
290 */
291 }
292
293 This->lpLcl->lpDDCB = ddgbl.lpDDCBtmp;
294
295 /* Startup HEL and HAL */
296 This->lpLcl->lpDDCB = This->lpLcl->lpGbl->lpDDCBtmp;
297 This->lpLcl->dwProcessId = GetCurrentProcessId();
298 switch (devicetypes)
299 {
300 case 2:
301 hal_ret = StartDirectDrawHal(iface, reenable);
302 This->lpLcl->lpDDCB->HELDD.dwFlags = 0;
303 break;
304
305 case 3:
306 hel_ret = StartDirectDrawHel(iface, reenable);
307 This->lpLcl->lpDDCB->HALDD.dwFlags = 0;
308 break;
309
310 default:
311 hal_ret = StartDirectDrawHal(iface, reenable);
312 hel_ret = StartDirectDrawHel(iface, reenable);
313 break;
314 }
315
316 if (hal_ret!=DD_OK)
317 {
318 if (hel_ret!=DD_OK)
319 {
320 DX_STUB_str("DDERR_NODIRECTDRAWSUPPORT\n");
322 }
324 DX_STUB_str("No hardware support\n");
325 }
326
327 if (hel_ret!=DD_OK)
328 {
330
331 }
332 else
333 {
335 }
336
337 /* Fill some basic info for Surface */
338 This->lpLcl->lpGbl->dwFlags = This->lpLcl->lpGbl->dwFlags | dwFlags | DDRAWI_ATTACHEDTODESKTOP;
339 This->lpLcl->lpDDCB = This->lpLcl->lpGbl->lpDDCBtmp;
340 This->lpLcl->hDD = ddgbl.hDD;
341
342 ddgbl.rectDevice.top = 0;
346
351
362
363 return DD_OK;
364}
#define DDRAWI_NOHARDWARE
Definition: ddrawi.h:1301
#define DDRAWI_ATTACHEDTODESKTOP
Definition: ddrawi.h:1317
#define DDRAWI_GDIDRV
Definition: ddrawi.h:1316
#define DDRAWI_DISPLAYDRV
Definition: ddrawi.h:1298
#define DDRAWI_EMULATIONINITIALIZED
Definition: ddrawi.h:1307
#define DDRAWI_NOEMULATION
Definition: ddrawi.h:1303
HRESULT WINAPI StartDirectDrawHel(LPDIRECTDRAW iface, BOOL reenable)
Definition: startup.c:368
HRESULT WINAPI StartDirectDrawHal(LPDIRECTDRAW iface, BOOL reenable)
Definition: startup.c:458
BOOL WINAPI IsBadReadPtr(IN LPCVOID lp, IN UINT_PTR ucb)
Definition: except.c:805
#define ULONG_PTR
Definition: config.h:101
unsigned long DWORD
Definition: ntddk_ex.h:95
#define DDERR_NODIRECTDRAWSUPPORT
Definition: ddraw.h:92
#define DD_FALSE
Definition: ddraw.h:187
#define DDCREATE_EMULATIONONLY
Definition: ddraw.h:199
LONG lPitch
Definition: ddrawi.h:173
DWORD dwBBitMask
Definition: ddrawi.h:179
DWORD dwWidth
Definition: ddrawi.h:171
DWORD dwHeight
Definition: ddrawi.h:172
DWORD dwGBitMask
Definition: ddrawi.h:178
DWORD dwBPP
Definition: ddrawi.h:174
DWORD dwAlphaBitMask
Definition: ddrawi.h:180
WORD wRefreshRate
Definition: ddrawi.h:176
DWORD dwRBitMask
Definition: ddrawi.h:177
DWORD dwBBitMask
Definition: ddraw.h:1106
DWORD dwRGBBitCount
Definition: ddraw.h:1075
DWORD dwRBitMask
Definition: ddraw.h:1085
DWORD dwGBitMask
Definition: ddraw.h:1094
DWORD dwRGBAlphaBitMask
Definition: ddraw.h:1113
LPDDHALMODEINFO lpModeInfo
Definition: ddrawi.h:1244
char cDriverName[MAX_DRIVER_NAME]
Definition: ddrawi.h:1284
VIDMEMINFO vmiData
Definition: ddrawi.h:1236
LPDDHAL_CALLBACKS lpDDCBtmp
Definition: ddrawi.h:1224
LONG lDisplayPitch
Definition: ddrawi.h:220
DWORD dwDisplayWidth
Definition: ddrawi.h:218
DDPIXELFORMAT ddpfDisplay
Definition: ddrawi.h:221
DWORD dwDisplayHeight
Definition: ddrawi.h:219
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
DWORD WINAPI GetCurrentProcessId(void)
Definition: proc.c:1158
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
HDC WINAPI CreateDCA(_In_opt_ LPCSTR pszDriver, _In_opt_ LPCSTR pszDevice, _In_opt_ LPCSTR pszOutput, _In_opt_ const DEVMODEA *pdmInit)
#define VREFRESH
Definition: wingdi.h:741
HDC WINAPI GetWindowDC(_In_opt_ HWND)

Referenced by Create_DirectDraw(), Main_DirectDraw_RestoreDisplayMode(), and Main_DirectDraw_SetDisplayMode2().

◆ StartDirectDrawHal()

HRESULT WINAPI StartDirectDrawHal ( LPDIRECTDRAW  iface,
BOOL  reenable 
)

Definition at line 458 of file startup.c.

459{
462 BOOL newmode = FALSE;
469
471
476
477 if (reenable == FALSE)
478 {
479 if (ddgbl.lpDDCBtmp == NULL)
480 {
482 if ( ddgbl.lpDDCBtmp == NULL)
483 {
484 return DD_FALSE;
485 }
486 }
487 }
488 else
489 {
491 }
492
493 /*
494 * Startup DX HAL step one of three
495 */
496 if (!DdCreateDirectDrawObject(This->lpLcl->lpGbl, (HDC)This->lpLcl->hDC))
497 {
499 return DD_FALSE;
500 }
501
502 /* Some card disable the dx after it have been created so
503 * we are force reenabling it
504 */
505 if (!DdReenableDirectDrawObject(This->lpLcl->lpGbl, &newmode))
506 {
508 return DD_FALSE;
509 }
510
511 if (!DdQueryDirectDrawObject(This->lpLcl->lpGbl,
512 &mHALInfo,
519 NULL,
520 mpFourCC,
521 NULL))
522 {
523 DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo);
525 // FIXME Close DX first and second call
526 return DD_FALSE;
527 }
528
529 /* Alloc mpFourCC */
530 if (This->lpLcl->lpGbl->lpdwFourCC != NULL)
531 {
532 DxHeapMemFree(This->lpLcl->lpGbl->lpdwFourCC);
533 }
534
536 {
537
539
540 if (mpFourCC == NULL)
541 {
543 // FIXME Close DX first and second call
544 return DD_FALSE;
545 }
546 }
547
548 /* Alloc mpTextures */
549#if 0
550 DX_STUB_str("1 Here\n");
551
552 if (This->lpLcl->lpGbl->texture != NULL)
553 {
554 DxHeapMemFree(This->lpLcl->lpGbl->texture;
555 }
556
559 {
560 mpTextures = (DDSURFACEDESC*) DxHeapMemAlloc(sizeof(DDSURFACEDESC) * mD3dDriverData.dwNumTextureFormats);
561 if (mpTextures == NULL)
562 {
563 DxHeapMemFree(mpFourCC);
564 DxHeapMemFree(ddgbl.lpDDCBtmp);
565 // FIXME Close DX first and second call
566 }
567 }
568
569 DX_STUB_str("2 Here\n");
570
571#else
573#endif
574
575
576 /* Get all basic data from the driver */
578 This->lpLcl->lpGbl,
579 &mHALInfo,
587 mpFourCC,
588 NULL))
589 {
593 // FIXME Close DX first and second call
594 return DD_FALSE;
595 }
596
598
599
601
602 This->lpLcl->lpGbl->dwNumFourCC = mHALInfo.ddCaps.dwNumFourCCCodes;
603 This->lpLcl->lpGbl->lpdwFourCC = mpFourCC;
604 // This->lpLcl->lpGbl->dwMonitorFrequency = mHALInfo.dwMonitorFrequency; // 0
605 This->lpLcl->lpGbl->dwModeIndex = mHALInfo.dwModeIndex;
606 // This->lpLcl->lpGbl->dwNumModes = mHALInfo.dwNumModes;
607 // This->lpLcl->lpGbl->lpModeInfo = mHALInfo.lpModeInfo;
608
609 /* FIXME convert mpTextures to DDHALMODEINFO */
610 // DxHeapMemFree( mpTextures);
611
612 /* FIXME D3D setup mD3dCallbacks and mD3dDriverData */
613
614
615
616
618 {
620 DdGetDriverInfo.guidInfo = GUID_MiscellaneousCallbacks;
623
625 {
629 // FIXME Close DX fristcall and second call
630 return DD_FALSE;
631 }
632
635 DdGetDriverInfo.guidInfo = GUID_Miscellaneous2Callbacks;
636
637 /* FIXME
638 DdGetDriverInfo.lpvData = (PVOID)&ddgbl.lpDDCBtmp->HALDDMiscellaneous;
639 DdGetDriverInfo.dwExpectedSize = sizeof (DDHAL_DDMISCELLANEOUS2CALLBACKS);
640
641 if(mHALInfo.GetDriverInfo (&DdGetDriverInfo) == DDHAL_DRIVER_NOTHANDLED || DdGetDriverInfo.ddRVal != DD_OK)
642 {
643 DxHeapMemFree(mpFourCC);
644 DxHeapMemFree(mpTextures);
645 DxHeapMemFree(ddgbl.lpDDCBtmp);
646 // FIXME Close DX fristcall and second call
647 return DD_FALSE;
648 }
649 DD_MISCELLANEOUS2CALLBACKS
650 {
651 DWORD dwSize;
652 DWORD dwFlags;
653 PDD_ALPHABLT AlphaBlt; // unsuse according to msdn and always set to NULL
654 PDD_CREATESURFACEEX CreateSurfaceEx;
655 PDD_GETDRIVERSTATE GetDriverState;
656 PDD_DESTROYDDLOCAL DestroyDDLocal;
657 }
658 DDHAL_MISC2CB32_CREATESURFACEEX
659 DDHAL_MISC2CB32_GETDRIVERSTATE
660 DDHAL_MISC2CB32_DESTROYDDLOCAL
661 */
662 }
663
665 {
666 This->lpLcl->lpGbl->dwFlags = This->lpLcl->lpGbl->dwFlags | DDRAWI_DRIVERINFO2;
667 }
668
669
670 return DD_OK;
671}
#define DdCreateDirectDrawObject
Definition: ddrawgdi.h:24
#define DdQueryDirectDrawObject
Definition: ddrawgdi.h:25
#define DdReenableDirectDrawObject
Definition: ddrawgdi.h:33
struct _DDHAL_GETDRIVERINFODATA DDHAL_GETDRIVERINFODATA
#define DDHALINFO_GETDRIVERINFOSET
Definition: ddrawi.h:667
#define DDHALINFO_GETDRIVERINFO2
Definition: ddrawi.h:668
#define DDRAWI_DRIVERINFO2
Definition: ddrawi.h:1322
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
DWORD WINAPI DdGetDriverInfo(LPDDHAL_GETDRIVERINFODATA pData)
Definition: gdientry.c:898
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
DWORD * mpFourCC
Definition: main.c:26
DDSURFACEDESC * mpTextures
Definition: main.c:29
DDHALINFO mHALInfo
Definition: main.c:12
DDHAL_DDEXEBUFCALLBACKS mD3dBufferCallbacks
Definition: main.c:15
D3DHAL_CALLBACKS mD3dCallbacks
Definition: main.c:16
D3DHAL_GLOBALDRIVERDATA mD3dDriverData
Definition: main.c:17
static HDC
Definition: imagelist.c:88
#define DxHeapMemFree(p)
Definition: rosdraw.h:120
DWORD dwNumFourCCCodes
Definition: ddrawi.h:270
DWORD dwFlags
Definition: ddrawi.h:619
DWORD dwModeIndex
Definition: ddrawi.h:615
LPDDHAL_GETDRIVERINFO GetDriverInfo
Definition: ddrawi.h:614
VIDMEMINFO vmiData
Definition: ddrawi.h:611
DDCORECAPS ddCaps
Definition: ddrawi.h:612
DDHAL_DDEXEBUFCALLBACKS HALDDExeBuf
Definition: ddrawi.h:742
DDHAL_DDSURFACECALLBACKS HALDDSurface
Definition: ddrawi.h:736
DDHAL_DDCALLBACKS HALDD
Definition: ddrawi.h:735
DDHAL_DDPALETTECALLBACKS HALDDPalette
Definition: ddrawi.h:737
DDHAL_DDMISCELLANEOUSCALLBACKS HALDDMiscellaneous
Definition: ddrawi.h:749
DDCORECAPS ddCaps
Definition: ddrawi.h:1221
void * PVOID
Definition: typedefs.h:50
uint32_t * LPDWORD
Definition: typedefs.h:59
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList

Referenced by StartDirectDraw().

◆ StartDirectDrawHel()

HRESULT WINAPI StartDirectDrawHel ( LPDIRECTDRAW  iface,
BOOL  reenable 
)

Definition at line 368 of file startup.c.

369{
371
372 if (reenable == FALSE)
373 {
374 if (ddgbl.lpDDCBtmp == NULL)
375 {
377 if ( ddgbl.lpDDCBtmp == NULL)
378 {
379 return DD_FALSE;
380 }
381 }
382 }
383
394
405
406 ddgbl.lpDDCBtmp->HELDD.dwSize = sizeof(This->lpLcl->lpDDCB->HELDD);
407
436
437 ddgbl.lpDDCBtmp->HELDDSurface.dwSize = sizeof(This->lpLcl->lpDDCB->HELDDSurface);
438
439 /*
440 This->lpLcl->lpDDCB->HELDDPalette.DestroyPalette = HelDdPalDestroyPalette;
441 This->lpLcl->lpDDCB->HELDDPalette.SetEntries = HelDdPalSetEntries;
442 This->lpLcl->lpDDCB->HELDDPalette.dwSize = sizeof(This->lpLcl->lpDDCB->HELDDPalette);
443 */
444
445 /*
446 This->lpLcl->lpDDCB->HELDDExeBuf.CanCreateExecuteBuffer = HelDdExeCanCreateExecuteBuffer;
447 This->lpLcl->lpDDCB->HELDDExeBuf.CreateExecuteBuffer = HelDdExeCreateExecuteBuffer;
448 This->lpLcl->lpDDCB->HELDDExeBuf.DestroyExecuteBuffer = HelDdExeDestroyExecuteBuffer;
449 This->lpLcl->lpDDCB->HELDDExeBuf.LockExecuteBuffer = HelDdExeLockExecuteBuffer;
450 This->lpLcl->lpDDCB->HELDDExeBuf.UnlockExecuteBuffer = HelDdExeUnlockExecuteBuffer;
451 */
452
453 return DD_OK;
454}
DWORD CALLBACK HelDdSetExclusiveMode(LPDDHAL_SETEXCLUSIVEMODEDATA lpSetExclusiveMode)
DWORD CALLBACK HelDdFlipToGDISurface(LPDDHAL_FLIPTOGDISURFACEDATA lpFlipToGDISurface)
DWORD CALLBACK HelDdCanCreateSurface(LPDDHAL_CANCREATESURFACEDATA lpCanCreateSurface)
DWORD CALLBACK HelDdSetMode(LPDDHAL_SETMODEDATA SetMode)
DWORD CALLBACK HelDdGetScanLine(LPDDHAL_GETSCANLINEDATA lpGetScanLine)
DWORD CALLBACK HelDdCreateSurface(LPDDHAL_CREATESURFACEDATA lpCreateSurface)
DWORD CALLBACK HelDdDestroyDriver(LPDDHAL_DESTROYDRIVERDATA lpDestroyDriver)
DWORD CALLBACK HelDdCreatePalette(LPDDHAL_CREATEPALETTEDATA lpCreatePalette)
DWORD CALLBACK HelDdWaitForVerticalBlank(LPDDHAL_WAITFORVERTICALBLANKDATA lpWaitForVerticalBlank)
DWORD CALLBACK HelDdSetColorKey(LPDDHAL_DRVSETCOLORKEYDATA lpDrvSetColorKey)
#define DDHAL_SURFCB32_DESTROYSURFACE
Definition: ddrawi.h:674
#define DDHAL_CB32_CREATEPALETTE
Definition: ddrawi.h:659
#define DDHAL_CB32_SETEXCLUSIVEMODE
Definition: ddrawi.h:661
#define DDHAL_SURFCB32_BLT
Definition: ddrawi.h:679
#define DDHAL_SURFCB32_GETFLIPSTATUS
Definition: ddrawi.h:683
#define DDHAL_SURFCB32_LOCK
Definition: ddrawi.h:677
#define DDHAL_CB32_DESTROYDRIVER
Definition: ddrawi.h:653
#define DDHAL_SURFCB32_SETPALETTE
Definition: ddrawi.h:687
#define DDHAL_CB32_GETSCANLINE
Definition: ddrawi.h:660
#define DDHAL_SURFCB32_GETBLTSTATUS
Definition: ddrawi.h:682
#define DDHAL_SURFCB32_SETCLIPLIST
Definition: ddrawi.h:676
#define DDHAL_SURFCB32_UNLOCK
Definition: ddrawi.h:678
#define DDHAL_SURFCB32_SETOVERLAYPOSITION
Definition: ddrawi.h:685
#define DDHAL_CB32_CANCREATESURFACE
Definition: ddrawi.h:658
#define DDHAL_SURFCB32_ADDATTACHEDSURFACE
Definition: ddrawi.h:681
#define DDHAL_SURFCB32_SETCOLORKEY
Definition: ddrawi.h:680
#define DDHAL_SURFCB32_UPDATEOVERLAY
Definition: ddrawi.h:684
#define DDHAL_CB32_SETCOLORKEY
Definition: ddrawi.h:655
#define DDHAL_CB32_WAITFORVERTICALBLANK
Definition: ddrawi.h:657
#define DDHAL_SURFCB32_FLIP
Definition: ddrawi.h:675
#define DDHAL_CB32_SETMODE
Definition: ddrawi.h:656
#define DDHAL_CB32_FLIPTOGDISURFACE
Definition: ddrawi.h:662
#define DDHAL_CB32_CREATESURFACE
Definition: ddrawi.h:654
#define DDHAL_SURFCB32_RESERVED4
Definition: ddrawi.h:686
DWORD CALLBACK HelDdSurfSetClipList(LPDDHAL_SETCLIPLISTDATA lpSetClipListData)
DWORD CALLBACK HelDdSurfGetFlipStatus(LPDDHAL_GETFLIPSTATUSDATA lpGetFlipStatusData)
DWORD CALLBACK HelDdSurfDestroySurface(LPDDHAL_DESTROYSURFACEDATA lpDestroySurfaceData)
DWORD CALLBACK HelDdSurfUpdateOverlay(LPDDHAL_UPDATEOVERLAYDATA lpUpDateOverLayData)
DWORD CALLBACK HelDdSurfreserved4(DWORD *lpPtr)
DWORD CALLBACK HelDdSurfSetColorKey(LPDDHAL_SETCOLORKEYDATA lpSetColorKeyData)
DWORD CALLBACK HelDdSurfFlip(LPDDHAL_FLIPDATA lpFlipData)
DWORD CALLBACK HelDdSurfUnlock(LPDDHAL_UNLOCKDATA lpUnLockData)
DWORD CALLBACK HelDdSurfSetOverlayPosition(LPDDHAL_SETOVERLAYPOSITIONDATA lpSetOverlayPositionData)
DWORD CALLBACK HelDdSurfGetBltStatus(LPDDHAL_GETBLTSTATUSDATA lpGetBltStatusData)
DWORD CALLBACK HelDdSurfLock(LPDDHAL_LOCKDATA lpLockData)
DWORD CALLBACK HelDdSurfBlt(LPDDHAL_BLTDATA lpBltData)
DWORD CALLBACK HelDdSurfSetPalette(LPDDHAL_SETPALETTEDATA lpSetPaletteData)
DWORD CALLBACK HelDdSurfAddAttachedSurface(LPDDHAL_ADDATTACHEDSURFACEDATA lpDestroySurface)
DDHAL_DDSURFACECALLBACKS HELDDSurface
Definition: ddrawi.h:739
DDHAL_DDCALLBACKS HELDD
Definition: ddrawi.h:738
LPDDHAL_DESTROYDRIVER DestroyDriver
Definition: ddrawi.h:349
LPDDHAL_FLIPTOGDISURFACE FlipToGDISurface
Definition: ddrawi.h:359
LPDDHAL_WAITFORVERTICALBLANK WaitForVerticalBlank
Definition: ddrawi.h:353
LPDDHAL_SETCOLORKEY SetColorKey
Definition: ddrawi.h:351
LPDDHAL_SETMODE SetMode
Definition: ddrawi.h:352
LPDDHAL_GETSCANLINE GetScanLine
Definition: ddrawi.h:356
LPDDHAL_CREATEPALETTE CreatePalette
Definition: ddrawi.h:355
LPDDHAL_CREATESURFACE CreateSurface
Definition: ddrawi.h:350
LPDDHAL_SETEXCLUSIVEMODE SetExclusiveMode
Definition: ddrawi.h:358
LPDDHAL_CANCREATESURFACE CanCreateSurface
Definition: ddrawi.h:354
LPDDHALSURFCB_GETFLIPSTATUS GetFlipStatus
Definition: ddrawi.h:402
LPDDHALSURFCB_LOCK Lock
Definition: ddrawi.h:396
LPDDHALSURFCB_SETCLIPLIST SetClipList
Definition: ddrawi.h:395
LPDDHALSURFCB_UNLOCK Unlock
Definition: ddrawi.h:397
LPDDHALSURFCB_SETOVERLAYPOSITION SetOverlayPosition
Definition: ddrawi.h:404
LPDDHALSURFCB_BLT Blt
Definition: ddrawi.h:398
LPDDHALSURFCB_FLIP Flip
Definition: ddrawi.h:394
LPDDHALSURFCB_UPDATEOVERLAY UpdateOverlay
Definition: ddrawi.h:403
LPDDHALSURFCB_SETPALETTE SetPalette
Definition: ddrawi.h:406
LPDDHALSURFCB_ADDATTACHEDSURFACE AddAttachedSurface
Definition: ddrawi.h:400
LPDDHALSURFCB_GETBLTSTATUS GetBltStatus
Definition: ddrawi.h:401
LPDDHALSURFCB_DESTROYSURFACE DestroySurface
Definition: ddrawi.h:393
LPDDHALSURFCB_SETCOLORKEY SetColorKey
Definition: ddrawi.h:399

Referenced by StartDirectDraw().

Variable Documentation

◆ classname

◆ ddgbl

◆ ddSurfGbl

Definition at line 13 of file startup.c.

◆ wnd_class

WNDCLASSW wnd_class

Definition at line 16 of file startup.c.

Referenced by test_IME().