Also check for empty GUID in DirectDrawCreate.

This commit is contained in:
Marcus Meissner 2000-04-23 19:53:46 +00:00 committed by Alexandre Julliard
parent 84eb8334da
commit dfee49e3ed
1 changed files with 3 additions and 0 deletions

View File

@ -254,6 +254,7 @@ HRESULT WINAPI DirectDrawCreate(
WNDCLASSA wc; WNDCLASSA wc;
HRESULT ret = 0; HRESULT ret = 0;
int i,drvindex=0; int i,drvindex=0;
GUID zeroGUID;
struct ddraw_driver *ddd = NULL; struct ddraw_driver *ddd = NULL;
@ -261,9 +262,11 @@ HRESULT WINAPI DirectDrawCreate(
TRACE("(%s,%p,%p)\n",debugstr_guid(lpGUID),ilplpDD,pUnkOuter); TRACE("(%s,%p,%p)\n",debugstr_guid(lpGUID),ilplpDD,pUnkOuter);
memset(&zeroGUID,0,sizeof(zeroGUID));
while (1) { while (1) {
ddd = NULL; ddd = NULL;
if ( ( !lpGUID ) || if ( ( !lpGUID ) ||
( IsEqualGUID( &zeroGUID, lpGUID ) ) ||
( IsEqualGUID( &IID_IDirectDraw, lpGUID ) ) || ( IsEqualGUID( &IID_IDirectDraw, lpGUID ) ) ||
( IsEqualGUID( &IID_IDirectDraw2, lpGUID ) ) || ( IsEqualGUID( &IID_IDirectDraw2, lpGUID ) ) ||
( IsEqualGUID( &IID_IDirectDraw4, lpGUID ) ) ( IsEqualGUID( &IID_IDirectDraw4, lpGUID ) )