3 HWND
CreateBasicWindow (VOID
);
5 BOOL
Test_CreateDDraw (INT
* passed
, INT
* failed
)
7 LPDIRECTDRAW7 DirectDraw
;
8 IDirectDraw
* DirectDraw2
;
10 /*** FIXME: Test first parameter using EnumDisplayDrivers ***/
11 DirectDrawCreateEx(NULL
, (VOID
**)&DirectDraw
, IID_IDirectDraw7
, NULL
);
13 TEST (DirectDrawCreateEx(NULL
, (VOID
**)&DirectDraw
, IID_IDirectDraw7
, (IUnknown
*)0xdeadbeef) == CLASS_E_NOAGGREGATION
);
14 TEST (DirectDrawCreateEx(NULL
, (VOID
**)&DirectDraw
, IID_IDirectDraw4
, NULL
) == DDERR_INVALIDPARAMS
);
15 TEST (DirectDrawCreateEx(NULL
, NULL
, IID_IDirectDraw7
, NULL
) == DDERR_INVALIDPARAMS
);
18 TEST (DirectDrawCreateEx(NULL
, (VOID
**)&DirectDraw
, IID_IDirectDraw7
, NULL
) == DD_OK
);
21 TEST (DirectDraw
->Initialize(NULL
) == DDERR_ALREADYINITIALIZED
);
22 TEST (DirectDraw
->Release() == 0);
26 TEST (DirectDrawCreate(NULL
,&DirectDraw2
, NULL
) == DD_OK
);
29 TEST (DirectDraw2
->QueryInterface(IID_IDirectDraw7
, (PVOID
*)&DirectDraw
) == 0);
30 TEST (DirectDraw2
->AddRef() == 2);
31 TEST (DirectDraw
->AddRef() == 2);
32 TEST (DirectDraw
->Release() == 1);
33 TEST (DirectDraw
->Release() == 0);
34 TEST (DirectDraw2
->Release() == 1);
35 TEST (DirectDraw2
->Release() == 0);
41 BOOL
Test_SetCooperativeLevel (INT
* passed
, INT
* failed
)
44 LPDIRECTDRAW7 DirectDraw
;
47 if (DirectDrawCreateEx(NULL
, (VOID
**)&DirectDraw
, IID_IDirectDraw7
, NULL
) != DD_OK
)
49 printf("ERROR: Failed to set up ddraw\n");
53 if(!( hwnd
= CreateBasicWindow() ))
55 printf("ERROR: Failed to create window\n");
56 DirectDraw
->Release();
61 TEST ( DirectDraw
->SetCooperativeLevel (NULL
, DDSCL_FULLSCREEN
) == DDERR_INVALIDPARAMS
);
62 TEST ( DirectDraw
->SetCooperativeLevel (hwnd
, DDSCL_FULLSCREEN
) == DDERR_INVALIDPARAMS
);
63 TEST ( DirectDraw
->SetCooperativeLevel (NULL
, DDSCL_FULLSCREEN
| DDSCL_EXCLUSIVE
) == DDERR_INVALIDPARAMS
);
64 TEST ( DirectDraw
->SetCooperativeLevel (hwnd
, DDSCL_FULLSCREEN
) == DDERR_INVALIDPARAMS
);
65 TEST ( DirectDraw
->SetCooperativeLevel (hwnd
, DDSCL_NORMAL
| DDSCL_ALLOWMODEX
) == DDERR_INVALIDPARAMS
);
66 TEST ( DirectDraw
->SetCooperativeLevel ((HWND
)0xdeadbeef, DDSCL_NORMAL
) == DDERR_INVALIDPARAMS
);
68 TEST ( DirectDraw
->SetCooperativeLevel (hwnd
, DDSCL_FULLSCREEN
| DDSCL_EXCLUSIVE
) == DD_OK
);
69 TEST ( DirectDraw
->Compact() == DD_OK
);
70 TEST ( DirectDraw
->SetCooperativeLevel (hwnd
, DDSCL_FULLSCREEN
| DDSCL_EXCLUSIVE
| DDSCL_ALLOWMODEX
) == DD_OK
);
71 TEST ( DirectDraw
->SetCooperativeLevel (NULL
, DDSCL_NORMAL
) == DD_OK
);
72 TEST ( DirectDraw
->SetCooperativeLevel (hwnd
, DDSCL_NORMAL
) == DD_OK
);
73 TEST ( DirectDraw
->Compact() == DDERR_NOEXCLUSIVEMODE
);
75 TEST ( DirectDraw
->TestCooperativeLevel() == DD_OK
); // I do not get what this API does it always seems to return DD_OK
77 DirectDraw
->Release();
82 BOOL
Test_GetAvailableVidMem (INT
* passed
, INT
* failed
)
84 LPDIRECTDRAW7 DirectDraw
;
87 if (DirectDrawCreateEx(NULL
, (VOID
**)&DirectDraw
, IID_IDirectDraw7
, NULL
) != DD_OK
)
89 printf("ERROR: Failed to set up ddraw\n");
95 DDSCAPS2 Caps
= { 0 };
97 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, NULL
, NULL
) == DDERR_INVALIDPARAMS
);
98 TEST (DirectDraw
->GetAvailableVidMem(NULL
, &Total
, &Free
) == DDERR_INVALIDPARAMS
);
99 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
103 memset(&Caps
,0,sizeof(DDSCAPS2
));
104 Caps
.dwCaps
= DDSCAPS_RESERVED1
;
105 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
107 memset(&Caps
,0,sizeof(DDSCAPS2
));
108 Caps
.dwCaps
= DDSCAPS_ALPHA
;
109 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
111 memset(&Caps
,0,sizeof(DDSCAPS2
));
112 Caps
.dwCaps
= DDSCAPS_BACKBUFFER
;
113 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DDERR_INVALIDPARAMS
);
115 memset(&Caps
,0,sizeof(DDSCAPS2
));
116 Caps
.dwCaps
= DDSCAPS_COMPLEX
;
117 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DDERR_INVALIDPARAMS
);
119 memset(&Caps
,0,sizeof(DDSCAPS2
));
120 Caps
.dwCaps
= DDSCAPS_FLIP
;
121 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DDERR_INVALIDPARAMS
);
123 memset(&Caps
,0,sizeof(DDSCAPS2
));
124 Caps
.dwCaps
= DDSCAPS_FRONTBUFFER
;
125 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DDERR_INVALIDPARAMS
);
127 memset(&Caps
,0,sizeof(DDSCAPS2
));
128 Caps
.dwCaps
= DDSCAPS_OFFSCREENPLAIN
;
129 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
131 memset(&Caps
,0,sizeof(DDSCAPS2
));
132 Caps
.dwCaps
= DDSCAPS_OVERLAY
;
133 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
135 memset(&Caps
,0,sizeof(DDSCAPS2
));
136 Caps
.dwCaps
= DDSCAPS_PALETTE
;
137 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DDERR_INVALIDPARAMS
);
139 memset(&Caps
,0,sizeof(DDSCAPS2
));
140 Caps
.dwCaps
= DDSCAPS_PRIMARYSURFACE
;
141 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
143 memset(&Caps
,0,sizeof(DDSCAPS2
));
144 Caps
.dwCaps
= DDSCAPS_RESERVED3
;
145 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
147 memset(&Caps
,0,sizeof(DDSCAPS2
));
148 Caps
.dwCaps
= DDSCAPS_SYSTEMMEMORY
;
149 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DDERR_INVALIDPARAMS
);
151 memset(&Caps
,0,sizeof(DDSCAPS2
));
152 Caps
.dwCaps
= DDSCAPS_TEXTURE
;
153 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
155 memset(&Caps
,0,sizeof(DDSCAPS2
));
156 Caps
.dwCaps
= DDSCAPS_3DDEVICE
;
157 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
159 memset(&Caps
,0,sizeof(DDSCAPS2
));
160 Caps
.dwCaps
= DDSCAPS_VIDEOMEMORY
;
161 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
163 memset(&Caps
,0,sizeof(DDSCAPS2
));
164 Caps
.dwCaps
= DDSCAPS_VISIBLE
;
165 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DDERR_INVALIDPARAMS
);
167 memset(&Caps
,0,sizeof(DDSCAPS2
));
168 Caps
.dwCaps
= DDSCAPS_WRITEONLY
;
169 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DDERR_INVALIDPARAMS
);
171 memset(&Caps
,0,sizeof(DDSCAPS2
));
172 Caps
.dwCaps
= DDSCAPS_ZBUFFER
;
173 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
175 memset(&Caps
,0,sizeof(DDSCAPS2
));
176 Caps
.dwCaps
= DDSCAPS_OWNDC
;
177 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DDERR_INVALIDPARAMS
);
179 memset(&Caps
,0,sizeof(DDSCAPS2
));
180 Caps
.dwCaps
= DDSCAPS_LIVEVIDEO
;
181 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
183 memset(&Caps
,0,sizeof(DDSCAPS2
));
184 Caps
.dwCaps
= DDSCAPS_HWCODEC
;
185 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
187 memset(&Caps
,0,sizeof(DDSCAPS2
));
188 Caps
.dwCaps
= DDSCAPS_MODEX
;
189 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
191 memset(&Caps
,0,sizeof(DDSCAPS2
));
192 Caps
.dwCaps
= DDSCAPS_MIPMAP
;
193 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
195 memset(&Caps
,0,sizeof(DDSCAPS2
));
196 Caps
.dwCaps
= DDSCAPS_RESERVED2
;
197 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
199 memset(&Caps
,0,sizeof(DDSCAPS2
));
200 Caps
.dwCaps
= DDSCAPS_ALLOCONLOAD
;
201 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
203 memset(&Caps
,0,sizeof(DDSCAPS2
));
204 Caps
.dwCaps
= DDSCAPS_VIDEOPORT
;
205 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
207 memset(&Caps
,0,sizeof(DDSCAPS2
));
208 Caps
.dwCaps
= DDSCAPS_LOCALVIDMEM
;
209 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
211 memset(&Caps
,0,sizeof(DDSCAPS2
));
212 Caps
.dwCaps
= DDSCAPS_NONLOCALVIDMEM
;
213 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
215 memset(&Caps
,0,sizeof(DDSCAPS2
));
217 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DDERR_INVALIDCAPS
);
219 memset(&Caps
,0,sizeof(DDSCAPS2
));
220 Caps
.dwCaps2
= DDSCAPS2_RESERVED4
;
221 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
223 memset(&Caps
,0,sizeof(DDSCAPS2
));
224 Caps
.dwCaps2
= DDSCAPS2_HINTDYNAMIC
;
225 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
227 memset(&Caps
,0,sizeof(DDSCAPS2
));
228 Caps
.dwCaps2
= DDSCAPS2_HINTSTATIC
;
229 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
231 memset(&Caps
,0,sizeof(DDSCAPS2
));
232 Caps
.dwCaps2
= DDSCAPS2_TEXTUREMANAGE
;
233 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
235 memset(&Caps
,0,sizeof(DDSCAPS2
));
236 Caps
.dwCaps2
= DDSCAPS2_RESERVED1
;
237 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
239 memset(&Caps
,0,sizeof(DDSCAPS2
));
240 Caps
.dwCaps2
= DDSCAPS2_RESERVED2
;
241 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
243 memset(&Caps
,0,sizeof(DDSCAPS2
));
244 Caps
.dwCaps2
= DDSCAPS2_OPAQUE
;
245 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
247 memset(&Caps
,0,sizeof(DDSCAPS2
));
248 Caps
.dwCaps2
= DDSCAPS2_HINTANTIALIASING
;
249 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
251 memset(&Caps
,0,sizeof(DDSCAPS2
));
252 Caps
.dwCaps2
= DDSCAPS2_CUBEMAP
;
253 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
255 memset(&Caps
,0,sizeof(DDSCAPS2
));
256 Caps
.dwCaps2
= DDSCAPS2_CUBEMAP_POSITIVEX
;
257 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
259 memset(&Caps
,0,sizeof(DDSCAPS2
));
260 Caps
.dwCaps2
= DDSCAPS2_CUBEMAP_NEGATIVEX
;
261 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
263 memset(&Caps
,0,sizeof(DDSCAPS2
));
264 Caps
.dwCaps2
= DDSCAPS2_CUBEMAP_POSITIVEY
;
265 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
267 memset(&Caps
,0,sizeof(DDSCAPS2
));
268 Caps
.dwCaps2
= DDSCAPS2_CUBEMAP_NEGATIVEY
;
269 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
271 memset(&Caps
,0,sizeof(DDSCAPS2
));
272 Caps
.dwCaps2
= DDSCAPS2_CUBEMAP_POSITIVEZ
;
273 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
275 memset(&Caps
,0,sizeof(DDSCAPS2
));
276 Caps
.dwCaps2
= DDSCAPS2_CUBEMAP_NEGATIVEZ
;
277 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
279 memset(&Caps
,0,sizeof(DDSCAPS2
));
280 Caps
.dwCaps2
= DDSCAPS2_MIPMAPSUBLEVEL
;
281 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
283 memset(&Caps
,0,sizeof(DDSCAPS2
));
284 Caps
.dwCaps2
= DDSCAPS2_D3DTEXTUREMANAGE
;
285 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
287 memset(&Caps
,0,sizeof(DDSCAPS2
));
288 Caps
.dwCaps2
= DDSCAPS2_DONOTPERSIST
;
289 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
291 memset(&Caps
,0,sizeof(DDSCAPS2
));
292 Caps
.dwCaps2
= DDSCAPS2_STEREOSURFACELEFT
;
293 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
295 memset(&Caps
,0,sizeof(DDSCAPS2
));
296 Caps
.dwCaps2
= DDSCAPS2_VOLUME
;
297 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
299 memset(&Caps
,0,sizeof(DDSCAPS2
));
300 Caps
.dwCaps2
= DDSCAPS2_NOTUSERLOCKABLE
;
301 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
303 memset(&Caps
,0,sizeof(DDSCAPS2
));
304 Caps
.dwCaps2
= DDSCAPS2_POINTS
;
305 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
307 memset(&Caps
,0,sizeof(DDSCAPS2
));
308 Caps
.dwCaps2
= DDSCAPS2_RTPATCHES
;
309 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
311 memset(&Caps
,0,sizeof(DDSCAPS2
));
312 Caps
.dwCaps2
= DDSCAPS2_NPATCHES
;
313 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
315 memset(&Caps
,0,sizeof(DDSCAPS2
));
316 Caps
.dwCaps2
= DDSCAPS2_RESERVED3
;
317 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
319 memset(&Caps
,0,sizeof(DDSCAPS2
));
320 Caps
.dwCaps2
= DDSCAPS2_DISCARDBACKBUFFER
;
321 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
323 memset(&Caps
,0,sizeof(DDSCAPS2
));
324 Caps
.dwCaps2
= DDSCAPS2_ENABLEALPHACHANNEL
;
325 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
327 memset(&Caps
,0,sizeof(DDSCAPS2
));
328 Caps
.dwCaps2
= DDSCAPS2_EXTENDEDFORMATPRIMARY
;
329 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
331 memset(&Caps
,0,sizeof(DDSCAPS2
));
332 Caps
.dwCaps2
= DDSCAPS2_ADDITIONALPRIMARY
;
333 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
335 memset(&Caps
,0,sizeof(DDSCAPS2
));
336 Caps
.dwCaps3
= ~(DDSCAPS3_MULTISAMPLE_QUALITY_MASK
| DDSCAPS3_MULTISAMPLE_MASK
| DDSCAPS3_RESERVED1
| DDSCAPS3_RESERVED2
| DDSCAPS3_LIGHTWEIGHTMIPMAP
| DDSCAPS3_AUTOGENMIPMAP
| DDSCAPS3_DMAP
);
337 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DDERR_INVALIDCAPS
);
339 memset(&Caps
,0,sizeof(DDSCAPS2
));
340 Caps
.dwCaps3
= (DDSCAPS3_MULTISAMPLE_QUALITY_MASK
| DDSCAPS3_MULTISAMPLE_MASK
| DDSCAPS3_RESERVED1
| DDSCAPS3_RESERVED2
| DDSCAPS3_LIGHTWEIGHTMIPMAP
| DDSCAPS3_AUTOGENMIPMAP
| DDSCAPS3_DMAP
);
341 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DD_OK
);
343 memset(&Caps
,0,sizeof(DDSCAPS2
));
345 TEST (DirectDraw
->GetAvailableVidMem(&Caps
, &Total
, &Free
) == DDERR_INVALIDCAPS
);
347 DirectDraw
->Release();
352 BOOL
Test_GetFourCCCodes (INT
* passed
, INT
* failed
)
354 LPDIRECTDRAW7 DirectDraw
;
357 if (DirectDrawCreateEx(NULL
, (VOID
**)&DirectDraw
, IID_IDirectDraw7
, NULL
) != DD_OK
)
359 printf("ERROR: Failed to set up ddraw\n");
364 DWORD dwNumCodes
, *lpCodes
;
365 TEST (DirectDraw
->GetFourCCCodes(NULL
, (PDWORD
)0xdeadbeef) == DDERR_INVALIDPARAMS
);
367 TEST (DirectDraw
->GetFourCCCodes(&dwNumCodes
, NULL
) == DD_OK
&& dwNumCodes
);
368 lpCodes
= (PDWORD
)HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD
)*dwNumCodes
);
370 TEST ( DirectDraw
->GetFourCCCodes(NULL
, lpCodes
) == DDERR_INVALIDPARAMS
);
371 TEST (DirectDraw
->GetFourCCCodes(&dwNumCodes
, lpCodes
) == DD_OK
&& *lpCodes
);
373 DirectDraw
->Release();
378 BOOL
Test_GetDeviceIdentifier (INT
* passed
, INT
* failed
)
380 LPDIRECTDRAW7 DirectDraw
;
381 DDDEVICEIDENTIFIER2 pDDDI
;
382 //OLECHAR GuidStr[100];
387 if (DirectDrawCreateEx(NULL
, (VOID
**)&DirectDraw
, IID_IDirectDraw7
, NULL
) != DD_OK
)
389 printf("ERROR: Failed to set up ddraw\n");
393 TEST ( DirectDraw
->GetDeviceIdentifier(NULL
, 0) == DDERR_INVALIDPARAMS
);
394 TEST ( DirectDraw
->GetDeviceIdentifier(NULL
, ~DDGDI_GETHOSTIDENTIFIER
) == DDERR_INVALIDPARAMS
);
395 TEST ( DirectDraw
->GetDeviceIdentifier(NULL
, DDGDI_GETHOSTIDENTIFIER
) == DDERR_INVALIDPARAMS
);
398 memset(&pDDDI
,0,sizeof(DDDEVICEIDENTIFIER2
));
399 TEST ( DirectDraw
->GetDeviceIdentifier(&pDDDI
, 0) == DD_OK
);
402 StringFromGUID2(pDDDI.guidDeviceIdentifier, GuidStr, 100);
404 printf("szDriver : %s\n",pDDDI.szDriver);
405 printf("szDescription : %s\n",pDDDI.szDescription);
406 printf("liDriverVersion : 0x%08x . 0x%08x\n", pDDDI.liDriverVersion.HighPart, pDDDI.liDriverVersion.LowPart);
407 printf("dwVendorId : 0x%08x\n",pDDDI.dwVendorId);
408 printf("dwDeviceId : 0x%08x\n",pDDDI.dwDeviceId);
409 printf("dwSubSysId : 0x%08x\n",pDDDI.dwSubSysId);
410 printf("dwRevision : 0x%08x\n",pDDDI.dwRevision);
411 printf("guidDeviceIdentifier : %ls\n",GuidStr);
412 printf("dwWHQLLevel : 0x%08x\n",pDDDI.dwWHQLLevel);
415 memset(&pDDDI
,0,sizeof(DDDEVICEIDENTIFIER2
));
416 TEST ( DirectDraw
->GetDeviceIdentifier(&pDDDI
, DDGDI_GETHOSTIDENTIFIER
) == DD_OK
);
417 memset(&pDDDI
,0,sizeof(DDDEVICEIDENTIFIER2
));
418 TEST ( DirectDraw
->GetDeviceIdentifier(&pDDDI
, ~DDGDI_GETHOSTIDENTIFIER
) == DDERR_INVALIDPARAMS
);
420 DirectDraw
->Release();