ReactOS 0.4.16-dev-306-g647d351
rosdraw.h File Reference
#include <windows.h>
#include <stdio.h>
#include <ddraw.h>
#include <ddrawi.h>
#include <d3dhal.h>
#include <ddrawgdi.h>
#include <pseh/pseh.h>
#include <pseh/pseh2.h>
#include "Ddraw/ddraw.h"
#include "Surface/surface.h"
#include "Clipper/clipper.h"
#include "resource.h"
Include dependency graph for rosdraw.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DDRAWI_DDCOLORCONTROL_INT
 
struct  _DDRAWI_DDGAMMACONTROL_INT
 
struct  _DDRAWI_DDKERNEL_INT
 
struct  _DDRAWI_DDKERNELSURFACE_INT
 

Macros

#define DxHeapMemAlloc(p, m)
 
#define DxHeapMemFree(p)
 
#define HEL_GRAPHIC_MEMORY_MAX   67108864
 
#define DX_STUB
 
#define DX_STUB_DD_OK
 
#define DX_STUB_str(x)
 
#define DX_WINDBG_trace()
 
#define DX_WINDBG_trace_res(width, height, bpp, freq)
 

Typedefs

typedef struct DDRAWI_DDCOLORCONTROL_INT DDRAWI_DDCOLORCONTROL_INT
 
typedef struct DDRAWI_DDCOLORCONTROL_INTLPDDRAWI_DDCOLORCONTROL_INT
 
typedef struct _DDRAWI_DDGAMMACONTROL_INT DDRAWI_DDGAMMACONTROL_INT
 
typedef struct _DDRAWI_DDGAMMACONTROL_INTLPDDRAWI_DDGAMMACONTROL_INT
 
typedef struct _DDRAWI_DDKERNEL_INT DDRAWI_KERNEL_INT
 
typedef struct _DDRAWI_DDKERNEL_INTLPDDRAWI_KERNEL_INT
 
typedef struct _DDRAWI_DDKERNELSURFACE_INT _DDRAWI_DDKERNELSURFACE_INT
 
typedef struct _DDRAWI_DDKERNELSURFACE_INTLPDDRAWI_DDKERNELSURFACE_INT
 

Functions

HRESULT WINAPI StartDirectDraw (LPDIRECTDRAW iface, LPGUID pGUID, BOOL reenable)
 
HRESULT WINAPI StartDirectDrawHal (LPDIRECTDRAW iface, BOOL reenable)
 
HRESULT WINAPI StartDirectDrawHel (LPDIRECTDRAW iface, BOOL reenable)
 
HRESULT WINAPI Create_DirectDraw (LPGUID pGUID, LPDIRECTDRAW *pIface, REFIID id, BOOL ex)
 
HRESULT WINAPI ReCreateDirectDraw (LPDIRECTDRAW iface)
 
HRESULT Internal_CreateSurface (LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD, LPDDRAWI_DDRAWSURFACE_INT *ppSurf, IUnknown *pUnkOuter)
 
HRESULT Internal_CreatePalette (LPDDRAWI_DIRECTDRAW_INT pDDraw, DWORD dwFlags, LPPALETTEENTRY palent, LPDIRECTDRAWPALETTE *ppPalette, LPUNKNOWN pUnkOuter)
 
void CopyDDSurfDescToDDSurfDesc2 (LPDDSURFACEDESC2 dst_pDesc, LPDDSURFACEDESC src_pDesc)
 
VOID Cleanup (LPDDRAWI_DIRECTDRAW_INT iface)
 
VOID WINAPI AcquireDDThreadLock (VOID)
 
VOID WINAPI ReleaseDDThreadLock (VOID)
 
ULONG WINAPI DirectDrawClipper_AddRef (LPDIRECTDRAWCLIPPER iface)
 
HRESULT WINAPI DirectDrawClipper_Initialize (LPDIRECTDRAWCLIPPER iface, LPDIRECTDRAW lpDD, DWORD dwFlags)
 
VOID Hal_DirectDraw_Release (LPDIRECTDRAW7)
 

Variables

DDRAWI_DIRECTDRAW_GBL ddgbl
 
DDRAWI_DDRAWSURFACE_GBL ddSurfGbl
 
WCHAR classname [128]
 
WNDCLASSW wnd_class
 
CRITICAL_SECTION ddcs
 
IDirectDraw7Vtbl DirectDraw7_Vtable
 
IDirectDraw4Vtbl DirectDraw4_Vtable
 
IDirectDraw2Vtbl DirectDraw2_Vtable
 
IDirectDrawVtbl DirectDraw_Vtable
 
IDirectDrawSurface7Vtbl DirectDrawSurface7_Vtable
 
IDirectDrawSurface4Vtbl DirectDrawSurface4_Vtable
 
IDirectDrawSurface3Vtbl DirectDrawSurface3_Vtable
 
IDirectDrawSurface2Vtbl DirectDrawSurface2_Vtable
 
IDirectDrawSurfaceVtbl DirectDrawSurface_Vtable
 
const IDirectDrawPaletteVtbl DirectDrawPalette_Vtable
 
IDirectDrawClipperVtbl DirectDrawClipper_Vtable
 
IDirectDrawColorControlVtbl DirectDrawColorControl_Vtable
 
IDirectDrawGammaControlVtbl DirectDrawGammaControl_Vtable
 
IDirectDrawKernelVtbl DirectDrawKernel_Vtable
 
IDirectDrawSurfaceKernelVtbl DirectDrawSurfaceKernel_Vtable
 
IDirect3DVtbl IDirect3D_Vtbl
 
IDirect3D2Vtbl IDirect3D2_Vtbl
 
IDirect3D3Vtbl IDirect3D3_Vtbl
 
IDirect3D7Vtbl IDirect3D7_Vtbl
 

Macro Definition Documentation

◆ DX_STUB

#define DX_STUB
Value:
{ \
static BOOL firstcall = TRUE; \
if (firstcall) \
{ \
char buffer[1024]; \
sprintf ( buffer, "Function %s is not implemented yet (%s:%d)\n", __FUNCTION__,__FILE__,__LINE__ ); \
OutputDebugStringA(buffer); \
firstcall = FALSE; \
} \
} \
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define __FUNCTION__
Definition: types.h:116
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint buffer
Definition: glext.h:5915
#define DDERR_UNSUPPORTED
Definition: ddraw.h:127

Definition at line 224 of file rosdraw.h.

◆ DX_STUB_DD_OK

#define DX_STUB_DD_OK
Value:
{ \
static BOOL firstcall = TRUE; \
if (firstcall) \
{ \
char buffer[1024]; \
sprintf ( buffer, "Function %s is not implemented yet (%s:%d)\n", __FUNCTION__,__FILE__,__LINE__ ); \
OutputDebugStringA(buffer); \
firstcall = FALSE; \
} \
} \
return DD_OK;
#define DD_OK
Definition: ddraw.h:186

Definition at line 239 of file rosdraw.h.

◆ DX_STUB_str

#define DX_STUB_str (   x)
Value:
{ \
char buffer[1024]; \
sprintf ( buffer, "Function %s %s (%s:%d)\n", __FUNCTION__,x,__FILE__,__LINE__ ); \
OutputDebugStringA(buffer); \
}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548

Definition at line 254 of file rosdraw.h.

◆ DX_WINDBG_trace

#define DX_WINDBG_trace ( )
Value:
static BOOL firstcallx = TRUE; \
if (firstcallx) \
{ \
char buffer[1024]; \
sprintf ( buffer, "Enter Function %s (%s:%d)\n", __FUNCTION__,__FILE__,__LINE__ ); \
OutputDebugStringA(buffer); \
firstcallx = TRUE; \
}

Definition at line 262 of file rosdraw.h.

◆ DX_WINDBG_trace_res

#define DX_WINDBG_trace_res (   width,
  height,
  bpp,
  freq 
)
Value:
static BOOL firstcallxx = TRUE; \
if (firstcallxx) \
{ \
char buffer[1024]; \
sprintf ( buffer, "Setmode have been req width=%ld, height=%ld bpp=%ld freq = %ld\n",width,height,bpp, freq); \
OutputDebugStringA(buffer); \
firstcallxx = TRUE; \
}
DWORD bpp
Definition: surface.c:185
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546

Definition at line 273 of file rosdraw.h.

◆ DxHeapMemAlloc

#define DxHeapMemAlloc (   p,
  m 
)
Value:
{ \
p = malloc(m); \
if (p != NULL) \
{ \
ZeroMemory(p,m); \
} \
}
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
GLfloat GLfloat p
Definition: glext.h:8902
const GLfloat * m
Definition: glext.h:10848

Definition at line 113 of file rosdraw.h.

◆ DxHeapMemFree

#define DxHeapMemFree (   p)
Value:
{ \
free(p); \
p = NULL; \
}

Definition at line 120 of file rosdraw.h.

◆ HEL_GRAPHIC_MEMORY_MAX

#define HEL_GRAPHIC_MEMORY_MAX   67108864

Definition at line 181 of file rosdraw.h.

Typedef Documentation

◆ _DDRAWI_DDKERNELSURFACE_INT

◆ DDRAWI_DDCOLORCONTROL_INT

◆ DDRAWI_DDGAMMACONTROL_INT

◆ DDRAWI_KERNEL_INT

◆ LPDDRAWI_DDCOLORCONTROL_INT

◆ LPDDRAWI_DDGAMMACONTROL_INT

◆ LPDDRAWI_DDKERNELSURFACE_INT

◆ LPDDRAWI_KERNEL_INT

Function Documentation

◆ AcquireDDThreadLock()

VOID WINAPI AcquireDDThreadLock ( VOID  )

◆ Cleanup()

VOID Cleanup ( LPDDRAWI_DIRECTDRAW_INT  iface)

Definition at line 15 of file cleanup.c.

16{
18
19 if (ddgbl.lpDDCBtmp != NULL)
20 {
22 }
23
24 if (ddgbl.lpdwFourCC != NULL)
25 {
27 }
28
29 if (ddgbl.lpModeInfo != NULL)
30 {
32 }
33
35
36 /*
37 anything else to release?
38 */
39
40 /* release the linked interface */
41 //while (IsBadWritePtr( This->lpVtbl, sizeof( LPDDRAWI_DIRECTDRAW_INT )) )
42 //{
43 // LPDDRAWI_DIRECTDRAW_INT newThis = This->lpVtbl;
44 // if (This->lpLcl != NULL)
45 // {
46 // DeleteDC(This->lpLcl->hDC);
47 // DxHeapMemFree(This->lpLcl);
48 // }
49
50 // DxHeapMemFree(This);
51 // This = newThis;
52 //}
53
54 /* release unlinked interface */
55 if (This->lpLcl != NULL)
56 {
57 DxHeapMemFree(This->lpLcl);
58 }
59 //if (This != NULL)
60 //{
61 // DxHeapMemFree(This);
62 //}
63
64}
#define DdDeleteDirectDrawObject
Definition: ddrawgdi.h:26
DDRAWI_DIRECTDRAW_GBL ddgbl
Definition: startup.c:12
#define DxHeapMemFree(p)
Definition: rosdraw.h:120
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
LPDDHALMODEINFO lpModeInfo
Definition: ddrawi.h:1244
LPDDHAL_CALLBACKS lpDDCBtmp
Definition: ddrawi.h:1224

◆ CopyDDSurfDescToDDSurfDesc2()

void CopyDDSurfDescToDDSurfDesc2 ( LPDDSURFACEDESC2  dst_pDesc,
LPDDSURFACEDESC  src_pDesc 
)

Definition at line 311 of file createsurface.c.

312{
313 RtlZeroMemory(dst_pDesc,sizeof(DDSURFACEDESC2));
314 RtlCopyMemory(dst_pDesc,src_pDesc,sizeof(DDSURFACEDESC));
315 dst_pDesc->dwSize = sizeof(DDSURFACEDESC2);
316}
struct _DDSURFACEDESC2 DDSURFACEDESC2
DWORD dwSize
Definition: ddraw.h:1152
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262

Referenced by Main_DirectDraw_CreateSurface().

◆ Create_DirectDraw()

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

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
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 EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:66
#define _SEH2_END
Definition: pseh2_64.h:155
#define _SEH2_TRY
Definition: pseh2_64.h:55
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 DDERR_OUTOFMEMORY
Definition: ddraw.h:111
struct IDirectDraw * LPDIRECTDRAW
Definition: ddraw.h:710
#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().

◆ DirectDrawClipper_AddRef()

ULONG WINAPI DirectDrawClipper_AddRef ( LPDIRECTDRAWCLIPPER  iface)

Definition at line 75 of file clipper_main.c.

76{
78 if(!This)
80
82
83 if (iface!=NULL)
84 {
85 This->dwIntRefCnt++;
86 This->lpLcl->dwLocalRefCnt++;
87 if (This->lpLcl->lpGbl)
88 This->lpLcl->lpGbl->dwRefCnt++;
89 }
90 return This->dwIntRefCnt;
91}
struct _DDRAWI_DDRAWCLIPPER_INT * LPDDRAWI_DDRAWCLIPPER_INT
Definition: ddrawi.h:145
#define DDERR_INVALIDOBJECT
Definition: ddraw.h:78

◆ DirectDrawClipper_Initialize()

HRESULT WINAPI DirectDrawClipper_Initialize ( LPDIRECTDRAWCLIPPER  iface,
LPDIRECTDRAW  lpDD,
DWORD  dwFlags 
)

Definition at line 23 of file clipper_main.c.

25{
28
30
31 if(!This)
33
34 if(This->dwIntRefCnt)
36
38 This->dwIntRefCnt = 1;
39
41 //This->lpLcl->lpClipMore
42 This->lpLcl->lpDD_int = DDraw;
43 This->lpLcl->lpGbl->dwRefCnt = 1;
44 This->lpLcl->pAddrefedThisOwner = (IUnknown*)DDraw;
45
46 // FIXME: Implement Linking and share global object
47 DxHeapMemAlloc(This->lpLcl->lpGbl, sizeof(DDRAWI_DDRAWCLIPPER_GBL));
48 This->lpLcl->lpGbl->dwProcessId = GetCurrentProcessId();
49
50 return DD_OK;
51}
IDirectDrawClipperVtbl DirectDrawClipper_Vtable
Definition: clipper_main.c:131
#define LPVOID
Definition: nt_native.h:45
#define DDERR_ALREADYINITIALIZED
Definition: ddraw.h:67
DWORD WINAPI GetCurrentProcessId(void)
Definition: proc.c:1158

◆ Hal_DirectDraw_Release()

VOID Hal_DirectDraw_Release ( LPDIRECTDRAW7  )

◆ Internal_CreatePalette()

HRESULT Internal_CreatePalette ( LPDDRAWI_DIRECTDRAW_INT  pDDraw,
DWORD  dwFlags,
LPPALETTEENTRY  palent,
LPDIRECTDRAWPALETTE ppPalette,
LPUNKNOWN  pUnkOuter 
)

Definition at line 33 of file createpalette.c.

35{
36 DDHAL_CREATEPALETTEDATA mDdCreatePalette = { 0 };
37
41
43
44 if(pUnkOuter)
45 {
47 }
48
50 {
52 }
53
54
55 if (pDDraw->lpLcl->dwProcessId != GetCurrentProcessId() )
56 {
58 }
59
60 /* Allocate the palette interface and needed members */
61 DxHeapMemAlloc(ThisPalInt, sizeof( DDRAWI_DDRAWPALETTE_INT ) );
62 if( ThisPalInt == NULL )
63 {
65 goto cleanup;
66 }
67
68 DxHeapMemAlloc(ThisPalLcl, sizeof( DDRAWI_DDRAWPALETTE_LCL ) );
69 if( ThisPalLcl == NULL )
70 {
72 goto cleanup;
73 }
74
75 DxHeapMemAlloc(ThisPalGbl, sizeof( DDRAWI_DDRAWPALETTE_GBL ) );
76 if( ThisPalGbl == NULL )
77 {
79 goto cleanup;
80 }
81
82 /*Some initial setup*/
83
84 ThisPalInt->lpLcl = ThisPalLcl;
85 ThisPalLcl->lpGbl = ThisPalGbl;
86
87 ThisPalLcl->lpDD_lcl = ThisPalGbl->lpDD_lcl = pDDraw->lpLcl;
88 ThisPalGbl->dwFlags = ConvertPCapsFlags(dwFlags);
89
91 ThisPalGbl->dwProcessId = GetCurrentProcessId();
92
93 mDdCreatePalette.lpDD = pDDraw->lpLcl->lpGbl;
94 mDdCreatePalette.lpDDPalette = ThisPalGbl;
96 mDdCreatePalette.CreatePalette = pDDraw->lpLcl->lpGbl->lpDDCBtmp->HALDD.CreatePalette;
97 DX_STUB_str("Using HAL CreatePalette\n");
98 }
99 else {
100 mDdCreatePalette.CreatePalette = pDDraw->lpLcl->lpGbl->lpDDCBtmp->HELDD.CreatePalette;
101 DX_STUB_str("Using HEL CreatePalette\n");
102 }
103 mDdCreatePalette.ddRVal = DDERR_GENERIC;
104 mDdCreatePalette.lpColorTable = palent;
105
106 if (mDdCreatePalette.CreatePalette(&mDdCreatePalette) == DDHAL_DRIVER_NOTHANDLED)
107 {
108 DX_STUB_str("mDdCreateSurface failed with DDHAL_DRIVER_NOTHANDLED.");
110 goto cleanup;
111 }
112
113 if (mDdCreatePalette.ddRVal != DD_OK)
114 {
115 DX_STUB_str("mDdCreateSurface failed.");
116 ret = mDdCreatePalette.ddRVal;
117 goto cleanup;
118 }
119
120 *ppPalette = (LPDIRECTDRAWPALETTE)ThisPalInt;
121 ThisPalInt->lpLink = pDDraw->lpLcl->lpGbl->palList;
122 pDDraw->lpLcl->lpGbl->palList = ThisPalInt;
123 ThisPalInt->lpLcl->dwReserved1 = (ULONG_PTR)pDDraw;
124 IDirectDrawPalette_AddRef(*ppPalette);
125
126 return DD_OK;
127
128cleanup:
129 if(ThisPalInt) DxHeapMemFree(ThisPalInt);
130 if(ThisPalLcl) DxHeapMemFree(ThisPalLcl);
131 if(ThisPalGbl) DxHeapMemFree(ThisPalGbl);
132
133 return ret;
134}
DWORD ConvertPCapsFlags(DWORD dwFlags)
Definition: createpalette.c:11
#define DDHAL_CB32_CREATEPALETTE
Definition: ddrawi.h:659
#define DDRAWILCL_SETCOOPCALLED
Definition: ddrawi.h:1196
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
const IDirectDrawPaletteVtbl DirectDrawPalette_Vtable
Definition: palette.c:147
static void cleanup(void)
Definition: main.c:1335
#define ULONG_PTR
Definition: config.h:101
#define DDERR_NOTINITIALIZED
Definition: ddraw.h:185
#define DDERR_NOCOOPERATIVELEVELSET
Definition: ddraw.h:89
struct IDirectDrawPalette * LPDIRECTDRAWPALETTE
Definition: ddraw.h:720
#define DDERR_GENERIC
Definition: ddraw.h:72
DDHAL_DDCALLBACKS HALDD
Definition: ddrawi.h:735
DDHAL_DDCALLBACKS HELDD
Definition: ddrawi.h:738
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:792
LPPALETTEENTRY lpColorTable
Definition: ddrawi.h:794
LPDDHAL_CREATEPALETTE CreatePalette
Definition: ddrawi.h:796
LPDDRAWI_DDRAWPALETTE_GBL lpDDPalette
Definition: ddrawi.h:793
LPDDHAL_CREATEPALETTE CreatePalette
Definition: ddrawi.h:355
LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl
Definition: ddrawi.h:1548
LPDDRAWI_DDRAWPALETTE_LCL lpLcl
Definition: ddrawi.h:1540
LPDDRAWI_DDRAWPALETTE_INT lpLink
Definition: ddrawi.h:1541
LPDDRAWI_DDRAWPALETTE_GBL lpGbl
Definition: ddrawi.h:1643
LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl
Definition: ddrawi.h:1651
LPDDRAWI_DDRAWPALETTE_INT palList
Definition: ddrawi.h:1226
LPDDRAWI_DIRECTDRAW_GBL lpGbl
Definition: ddrawi.h:1155
void * PVOID
Definition: typedefs.h:50
int ret
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662

Referenced by Main_DirectDraw_CreatePalette().

◆ Internal_CreateSurface()

HRESULT Internal_CreateSurface ( LPDDRAWI_DIRECTDRAW_INT  pDDraw,
LPDDSURFACEDESC2  pDDSD,
LPDDRAWI_DDRAWSURFACE_INT ppSurf,
IUnknown pUnkOuter 
)

Definition at line 18 of file createsurface.c.

20{
21 DDHAL_CANCREATESURFACEDATA mDdCanCreateSurface = { 0 };
22 DDHAL_CREATESURFACEDATA mDdCreateSurface = { 0 };
23
24 LPDDRAWI_DDRAWSURFACE_INT ThisSurfInt;
25 LPDDRAWI_DDRAWSURFACE_LCL ThisSurfLcl;
26 LPDDRAWI_DDRAWSURFACE_GBL ThisSurfGbl;
27 LPDDRAWI_DDRAWSURFACE_MORE ThisSurfMore;
28
29 LPDDRAWI_DDRAWSURFACE_INT * slist_int = NULL;
30 LPDDRAWI_DDRAWSURFACE_LCL * slist_lcl = NULL;
31 LPDDRAWI_DDRAWSURFACE_GBL * slist_gbl = NULL;
32 LPDDRAWI_DDRAWSURFACE_MORE * slist_more = NULL;
33 DWORD num_of_surf=1;
36
38 {
40 }
41
42 if(pUnkOuter)
43 {
45 }
46
47 if(!(pDDSD->dwFlags & DDSD_CAPS))
48 {
50 }
51 if (pDDraw->lpLcl->dwProcessId != GetCurrentProcessId() )
52 {
54 }
55
58 {
59 return DDERR_INVALIDCAPS;
60 }
61
62 if((!(pDDSD->dwFlags & DDSD_HEIGHT) || !(pDDSD->dwFlags & DDSD_WIDTH))
64 {
66 }
67
68 else if(((pDDSD->dwFlags & DDSD_HEIGHT) || (pDDSD->dwFlags & DDSD_WIDTH))
70 {
72 }
73
74 /*
75 * program does not need set the DDSD_LPSURFACE,
76 * if they forget set it, the ddraw will automatic
77 * set it for system memory.
78 */
80 ((pDDSD->dwFlags & DDSD_LPSURFACE) != DDSD_LPSURFACE) )
81 {
82 pDDSD->dwFlags = pDDSD->dwFlags | DDSD_LPSURFACE;
83 }
84
85 /* FIXME count how many surfaces we need */
86
87 DxHeapMemAlloc(slist_int, num_of_surf * sizeof( LPDDRAWI_DDRAWSURFACE_INT ) );
88 if( slist_int == NULL)
89 {
91 goto cleanup;
92 }
93
94 DxHeapMemAlloc(slist_lcl, num_of_surf * sizeof( LPDDRAWI_DDRAWSURFACE_LCL ) );
95 if( slist_lcl == NULL )
96 {
98 goto cleanup;
99 }
100
101 /* keep pointers to all gbl surfs to be able to free them on error */
102 DxHeapMemAlloc(slist_gbl, num_of_surf * sizeof( LPDDRAWI_DDRAWSURFACE_GBL ) );
103 if( slist_gbl == NULL )
104 {
105 DxHeapMemFree(slist_int);
106 return DDERR_OUTOFMEMORY;
107 }
108
109 /* keep pointers to all more surfs to be able to free them on error */
110 DxHeapMemAlloc(slist_more, num_of_surf * sizeof( LPDDRAWI_DDRAWSURFACE_MORE ) );
111 if( slist_more == NULL )
112 {
113 DxHeapMemFree(slist_int);
114 return DDERR_OUTOFMEMORY;
115 }
116
117 for( count=0; count < num_of_surf; count++ )
118 {
119 /* Allocate the surface interface and needed members */
120 DxHeapMemAlloc(ThisSurfInt, sizeof( DDRAWI_DDRAWSURFACE_INT ) );
121 if( ThisSurfInt == NULL )
122 {
124 goto cleanup;
125 }
126
127 DxHeapMemAlloc(ThisSurfLcl, sizeof( DDRAWI_DDRAWSURFACE_LCL ) );
128 if( ThisSurfLcl == NULL )
129 {
131 goto cleanup;
132 }
133
134 DxHeapMemAlloc(ThisSurfGbl, sizeof( DDRAWI_DDRAWSURFACE_GBL ) );
135 if( ThisSurfGbl == NULL )
136 {
138 goto cleanup;
139 }
140
141 DxHeapMemAlloc(ThisSurfMore, sizeof( DDRAWI_DDRAWSURFACE_MORE ) );
142 if( ThisSurfMore == NULL )
143 {
145 goto cleanup;
146 }
147
148 /* setup lists, really needed are slist_lcl, slist_int
149 other slists should be released on return */
150
151 slist_int[count] = ThisSurfInt;
152 slist_lcl[count] = ThisSurfLcl;
153 slist_gbl[count] = ThisSurfGbl;
154 slist_more[count] = ThisSurfMore;
155
156 /* Start now fill in the member as they shall look like before call to createsurface */
157
158 ThisSurfInt->lpLcl = ThisSurfLcl;
159 ThisSurfLcl->lpGbl = ThisSurfGbl;
160
161 ThisSurfLcl->ddsCaps.dwCaps = pDDSD->ddsCaps.dwCaps;
162
163 ThisSurfGbl->lpDD = pDDraw->lpLcl->lpGbl;
164 ThisSurfGbl->lpDDHandle = pDDraw->lpLcl->lpGbl;
165
166 /* FIXME ? */
168
170 {
171 ThisSurfGbl->wWidth = pDDraw->lpLcl->lpGbl->vmiData.dwDisplayWidth;
172 ThisSurfGbl->wHeight = pDDraw->lpLcl->lpGbl->vmiData.dwDisplayHeight;
173 ThisSurfGbl->lPitch = pDDraw->lpLcl->lpGbl->vmiData.lDisplayPitch;
174 ThisSurfGbl->dwLinearSize = pDDraw->lpLcl->lpGbl->vmiData.lDisplayPitch;
175
176
177 ThisSurfMore->dmiDDrawReserved7.wWidth = pDDraw->lpLcl->lpGbl->vmiData.dwDisplayWidth;
179 ThisSurfMore->dmiDDrawReserved7.wBPP = pDDraw->lpLcl->lpGbl->dwMonitorFrequency;
180
181 /* FIXME ThisSurfaceMore->dmiDDrawReserved7.wMonitorsAttachedToDesktop */
183 pDDraw->lpLcl->lpPrimary = ThisSurfInt;
184 }
185 else
186 {
187 ThisSurfGbl->wWidth = (WORD)pDDSD->dwWidth;
188 ThisSurfGbl->wHeight = (WORD)pDDSD->dwHeight;
189 ThisSurfGbl->lPitch = pDDSD->lPitch;
190 ThisSurfGbl->dwLinearSize = pDDSD->lPitch;
191 }
192
193 if(pDDraw->lpVtbl == &DirectDraw7_Vtable)
194 {
195 ThisSurfInt->lpVtbl = &DirectDrawSurface7_Vtable;
196 }
197 else if(pDDraw->lpVtbl == &DirectDraw4_Vtable)
198 {
199 ThisSurfInt->lpVtbl = &DirectDrawSurface4_Vtable;
200 }
201 else if(pDDraw->lpVtbl == &DirectDraw2_Vtable)
202 {
203 ThisSurfInt->lpVtbl = &DirectDrawSurface2_Vtable;
204 }
205 else if(pDDraw->lpVtbl == &DirectDraw_Vtable)
206 {
207 ThisSurfInt->lpVtbl = &DirectDrawSurface_Vtable;
208 }
209 else
210 {
212 goto cleanup;
213 }
214
215 ThisSurfLcl->lpSurfMore = ThisSurfMore;
216 ThisSurfMore->dwSize = sizeof(DDRAWI_DDRAWSURFACE_MORE);
217 ThisSurfMore->lpDD_int = pDDraw;
218 ThisSurfMore->lpDD_lcl = pDDraw->lpLcl;
219 ThisSurfMore->slist = slist_lcl;
220
221 ThisSurfLcl->dwProcessId = GetCurrentProcessId();
222
223 /* FIXME the lpLnk */
224
225 Main_DDrawSurface_AddRef(ThisSurfInt);
226 }
227
228 pDDraw->lpLcl->lpGbl->dsList = (LPDDRAWI_DDRAWSURFACE_INT) slist_int;
229
230 /* Fixme call on DdCanCreate then on DdCreateSurface createsurface data here */
231
232 /* FIXME bIsDifferentPixelFormat being set to true or false with automatic detections */
233 mDdCanCreateSurface.bIsDifferentPixelFormat = FALSE;
234
235 mDdCanCreateSurface.lpDD = pDDraw->lpLcl->lpGbl;
236 mDdCanCreateSurface.CanCreateSurface = pDDraw->lpLcl->lpDDCB->HALDD.CanCreateSurface;
237 mDdCanCreateSurface.lpDDSurfaceDesc = (LPDDSURFACEDESC) pDDSD;
238 mDdCanCreateSurface.ddRVal = DDERR_GENERIC;
239
240 if (mDdCanCreateSurface.CanCreateSurface(&mDdCanCreateSurface) == DDHAL_DRIVER_NOTHANDLED)
241 {
242 DX_STUB_str("mDdCanCreateSurface failed with DDHAL_DRIVER_NOTHANDLED.");
244 goto cleanup;
245 }
246
247 if (mDdCanCreateSurface.ddRVal != DD_OK)
248 {
249 DX_STUB_str("mDdCanCreateSurface failed.");
250 ret = mDdCanCreateSurface.ddRVal;
251 goto cleanup;
252 }
253
254 mDdCreateSurface.lpDD = pDDraw->lpLcl->lpGbl;
255 mDdCreateSurface.CreateSurface = pDDraw->lpLcl->lpGbl->lpDDCBtmp->HALDD.CreateSurface;
256 mDdCreateSurface.ddRVal = DDERR_GENERIC;
257 mDdCreateSurface.dwSCnt = num_of_surf;
258 mDdCreateSurface.lpDDSurfaceDesc = (LPDDSURFACEDESC) pDDSD;
259 mDdCreateSurface.lplpSList = slist_lcl;
260
261 if (mDdCreateSurface.CreateSurface(&mDdCreateSurface) == DDHAL_DRIVER_NOTHANDLED)
262 {
263 DX_STUB_str("mDdCreateSurface failed with DDHAL_DRIVER_NOTHANDLED.");
265 goto cleanup;
266 }
267
268 if (mDdCreateSurface.ddRVal != DD_OK)
269 {
270 DX_STUB_str("mDdCreateSurface failed.");
271 ret = mDdCreateSurface.ddRVal;
272 goto cleanup;
273 }
274
275 /* free unneeded slists */
276 if (slist_more != NULL)
277 DxHeapMemFree(slist_more);
278 if (slist_gbl != NULL)
279 DxHeapMemFree(slist_gbl);
280
281 *ppSurf = (LPDDRAWI_DDRAWSURFACE_INT) &slist_int[0]->lpVtbl;
282
283 return DD_OK;
284
285cleanup:
286 for(count = 0; count < num_of_surf; count++)
287 {
288 if (slist_more[count] != NULL)
289 DxHeapMemFree(slist_more[count]);
290 if (slist_gbl[count] != NULL)
291 DxHeapMemFree(slist_gbl[count]);
292 if (slist_lcl[count] != NULL)
293 DxHeapMemFree(slist_lcl[count]);
294 if (slist_int[count] != NULL)
295 DxHeapMemFree(slist_int[count]);
296 }
297 if (slist_more != NULL)
298 DxHeapMemFree(slist_more);
299 if (slist_gbl != NULL)
300 DxHeapMemFree(slist_gbl);
301 if (slist_lcl != NULL)
302 DxHeapMemFree(slist_lcl);
303 if (slist_int != NULL)
304 DxHeapMemFree(slist_int);
305
306 return ret;
307}
struct _DDRAWI_DDRAWSURFACE_LCL FAR * LPDDRAWI_DDRAWSURFACE_LCL
Definition: d3dhal.h:45
#define DDSD_LPSURFACE
Definition: ddrawex.h:22
struct _DDRAWI_DDRAWSURFACE_INT * LPDDRAWI_DDRAWSURFACE_INT
Definition: ddrawi.h:132
#define DDRAWISURFGBL_ISGDISURFACE
Definition: ddrawi.h:1363
struct _DDRAWI_DDRAWSURFACE_MORE DDRAWI_DDRAWSURFACE_MORE
void * LPDDSURFACEDESC
Definition: ddstream.idl:23
ULONG WINAPI Main_DDrawSurface_AddRef(LPDDRAWI_DDRAWSURFACE_INT)
Definition: surface_main.c:40
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLuint GLuint GLsizei count
Definition: gl.h:1545
IDirectDrawSurfaceVtbl DirectDrawSurface_Vtable
IDirectDrawSurface4Vtbl DirectDrawSurface4_Vtable
IDirectDrawSurface2Vtbl DirectDrawSurface2_Vtable
IDirectDrawSurface7Vtbl DirectDrawSurface7_Vtable
#define DDSD_WIDTH
Definition: ddraw.h:210
#define DDSD_HEIGHT
Definition: ddraw.h:209
#define DDSCAPS_PRIMARYSURFACE
Definition: ddraw.h:258
#define DDERR_INVALIDCAPS
Definition: ddraw.h:75
#define DDSCAPS_VIDEOMEMORY
Definition: ddraw.h:264
#define DDSD_CAPS
Definition: ddraw.h:208
#define DDSCAPS_SYSTEMMEMORY
Definition: ddraw.h:261
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:784
LPDDSURFACEDESC lpDDSurfaceDesc
Definition: ddrawi.h:785
LPDDHAL_CANCREATESURFACE CanCreateSurface
Definition: ddrawi.h:788
LPDDSURFACEDESC lpDDSurfaceDesc
Definition: ddrawi.h:776
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:775
LPDDRAWI_DDRAWSURFACE_LCL * lplpSList
Definition: ddrawi.h:777
LPDDHAL_CREATESURFACE CreateSurface
Definition: ddrawi.h:780
LPDDHAL_CREATESURFACE CreateSurface
Definition: ddrawi.h:350
LPDDHAL_CANCREATESURFACE CanCreateSurface
Definition: ddrawi.h:354
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1346
LPDDRAWI_DDRAWSURFACE_LCL lpLcl
Definition: ddrawi.h:1328
LPDDRAWI_DDRAWSURFACE_GBL lpGbl
Definition: ddrawi.h:1468
DISPLAYMODEINFO dmiDDrawReserved7
Definition: ddrawi.h:1454
LPDDRAWI_DDRAWSURFACE_LCL * slist
Definition: ddrawi.h:1461
LPDDRAWI_DIRECTDRAW_LCL lpDD_lcl
Definition: ddrawi.h:1431
LPDDRAWI_DIRECTDRAW_INT lpDD_int
Definition: ddrawi.h:1434
VIDMEMINFO vmiData
Definition: ddrawi.h:1236
LPDDRAWI_DDRAWSURFACE_INT dsList
Definition: ddrawi.h:1225
LPDDRAWI_DDRAWSURFACE_INT lpPrimary
Definition: ddrawi.h:1169
LPDDHAL_CALLBACKS lpDDCB
Definition: ddrawi.h:1179
DWORD dwCaps
Definition: ddraw.h:732
DWORD dwWidth
Definition: ddraw.h:1155
DWORD dwHeight
Definition: ddraw.h:1154
DDSCAPS2 ddsCaps
Definition: ddraw.h:1188
DWORD dwFlags
Definition: ddraw.h:1153
BYTE wMonitorsAttachedToDesktop
Definition: ddrawi.h:1422
LONG lDisplayPitch
Definition: ddrawi.h:220
DWORD dwDisplayWidth
Definition: ddrawi.h:218
DWORD dwDisplayHeight
Definition: ddrawi.h:219

Referenced by Main_DirectDraw_CreateSurface(), and Main_DirectDraw_CreateSurface4().

◆ ReCreateDirectDraw()

HRESULT WINAPI ReCreateDirectDraw ( LPDIRECTDRAW  iface)

◆ ReleaseDDThreadLock()

VOID WINAPI ReleaseDDThreadLock ( VOID  )

◆ StartDirectDraw()

HRESULT WINAPI StartDirectDraw ( LPDIRECTDRAW  iface,
LPGUID  pGUID,
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 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
char cDriverName[MAX_DRIVER_NAME]
Definition: ddrawi.h:1284
DDPIXELFORMAT ddpfDisplay
Definition: ddrawi.h:221
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
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
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
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_DDPALETTECALLBACKS HALDDPalette
Definition: ddrawi.h:737
DDHAL_DDMISCELLANEOUSCALLBACKS HALDDMiscellaneous
Definition: ddrawi.h:749
DDCORECAPS ddCaps
Definition: ddrawi.h:1221
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_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
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_SETEXCLUSIVEMODE SetExclusiveMode
Definition: ddrawi.h:358
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

◆ ddcs

◆ ddgbl

◆ ddSurfGbl

DDRAWI_DDRAWSURFACE_GBL ddSurfGbl
extern

Definition at line 13 of file startup.c.

◆ DirectDraw2_Vtable

IDirectDraw2Vtbl DirectDraw2_Vtable
extern

◆ DirectDraw4_Vtable

IDirectDraw4Vtbl DirectDraw4_Vtable
extern

◆ DirectDraw7_Vtable

◆ DirectDraw_Vtable

IDirectDrawVtbl DirectDraw_Vtable
extern

◆ DirectDrawClipper_Vtable

IDirectDrawClipperVtbl DirectDrawClipper_Vtable
extern

Definition at line 131 of file clipper_main.c.

Referenced by DirectDrawClipper_Initialize().

◆ DirectDrawColorControl_Vtable

IDirectDrawColorControlVtbl DirectDrawColorControl_Vtable
extern

Definition at line 58 of file color_stubs.c.

Referenced by Main_DDrawSurface_QueryInterface().

◆ DirectDrawGammaControl_Vtable

IDirectDrawGammaControlVtbl DirectDrawGammaControl_Vtable
extern

Definition at line 60 of file gamma_stubs.c.

Referenced by Main_DDrawSurface_QueryInterface().

◆ DirectDrawKernel_Vtable

IDirectDrawKernelVtbl DirectDrawKernel_Vtable
extern

Definition at line 114 of file kernel_stubs.c.

◆ DirectDrawPalette_Vtable

const IDirectDrawPaletteVtbl DirectDrawPalette_Vtable
extern

Definition at line 147 of file palette.c.

Referenced by Internal_CreatePalette().

◆ DirectDrawSurface2_Vtable

IDirectDrawSurface2Vtbl DirectDrawSurface2_Vtable
extern

◆ DirectDrawSurface3_Vtable

IDirectDrawSurface3Vtbl DirectDrawSurface3_Vtable
extern

Definition at line 62 of file DirectDrawSurface3_Vtable.c.

Referenced by Main_DDrawSurface_QueryInterface().

◆ DirectDrawSurface4_Vtable

IDirectDrawSurface4Vtbl DirectDrawSurface4_Vtable
extern

◆ DirectDrawSurface7_Vtable

IDirectDrawSurface7Vtbl DirectDrawSurface7_Vtable
extern

◆ DirectDrawSurface_Vtable

IDirectDrawSurfaceVtbl DirectDrawSurface_Vtable
extern

◆ DirectDrawSurfaceKernel_Vtable

IDirectDrawSurfaceKernelVtbl DirectDrawSurfaceKernel_Vtable
extern

Definition at line 123 of file kernel_stubs.c.

Referenced by Main_DDrawSurface_QueryInterface().

◆ IDirect3D2_Vtbl

IDirect3D2Vtbl IDirect3D2_Vtbl
extern

Definition at line 28 of file DirectD3D2_Vtable.c.

Referenced by Main_DDrawSurface_QueryInterface().

◆ IDirect3D3_Vtbl

IDirect3D3Vtbl IDirect3D3_Vtbl
extern

Definition at line 31 of file DirectD3D3_Vtable.c.

Referenced by Main_DDrawSurface_QueryInterface().

◆ IDirect3D7_Vtbl

IDirect3D7Vtbl IDirect3D7_Vtbl
extern

Definition at line 27 of file DirectD3D7_Vtable.c.

Referenced by Main_DDrawSurface_QueryInterface().

◆ IDirect3D_Vtbl

IDirect3DVtbl IDirect3D_Vtbl
extern

Definition at line 28 of file DirectD3D_Vtable.c.

Referenced by Main_DDrawSurface_QueryInterface().

◆ wnd_class

WNDCLASSW wnd_class
extern

Definition at line 16 of file startup.c.

Referenced by test_IME().