Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
3cc9e40c
Commit
3cc9e40c
authored
Dec 21, 2005
by
Ivan Leo Puoti
Committed by
Alexandre Julliard
Dec 21, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Fix DirectDrawSurface::QueryInterface crash.
parent
8827bcfd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
surface_main.c
dlls/ddraw/surface_main.c
+3
-0
dsurface.c
dlls/ddraw/tests/dsurface.c
+28
-0
No files found.
dlls/ddraw/surface_main.c
View file @
3cc9e40c
...
...
@@ -160,6 +160,9 @@ Main_DirectDrawSurface_QueryInterface(LPDIRECTDRAWSURFACE7 iface, REFIID riid,
*
ppObj
=
NULL
;
if
(
!
riid
)
return
DDERR_INVALIDPARAMS
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
)
||
IsEqualGUID
(
&
IID_IDirectDrawSurface7
,
riid
)
||
IsEqualGUID
(
&
IID_IDirectDrawSurface4
,
riid
))
...
...
dlls/ddraw/tests/dsurface.c
View file @
3cc9e40c
...
...
@@ -3,6 +3,7 @@
*
* Copyright (C) 2005 Antoine Chavasse (a.chavasse@gmail.com)
* Copyright (C) 2005 Christian Costa
* Copyright 2005 Ivan Leo Puoti
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -220,11 +221,38 @@ static void SrcColorKey32BlitTest(void)
IDirectDrawSurface_Release
(
lpDst
);
}
static
void
QueryInterface
(
void
)
{
LPDIRECTDRAWSURFACE
dsurface
;
DDSURFACEDESC
surface
;
LPVOID
object
;
HRESULT
ret
;
/* Create a surface */
ZeroMemory
(
&
surface
,
sizeof
(
surface
));
surface
.
dwSize
=
sizeof
(
surface
);
surface
.
dwFlags
=
DDSD_WIDTH
|
DDSD_HEIGHT
;
surface
.
dwHeight
=
10
;
surface
.
dwWidth
=
10
;
ret
=
IDirectDraw_CreateSurface
(
lpDD
,
&
surface
,
&
dsurface
,
NULL
);
if
(
ret
!=
DD_OK
)
{
ok
(
FALSE
,
"IDirectDraw::CreateSurface failed with error %lx
\n
"
,
ret
);
return
;
}
/* Call IUnkown::QueryInterface */
ret
=
IDirectDrawSurface_QueryInterface
(
dsurface
,
0
,
&
object
);
ok
(
ret
==
DDERR_INVALIDPARAMS
,
"IDirectDrawSurface::QueryInterface returned %lx
\n
"
,
ret
);
IDirectDrawSurface_Release
(
dsurface
);
}
START_TEST
(
dsurface
)
{
CreateDirectDraw
();
MipMapCreationTest
();
SrcColorKey32BlitTest
();
QueryInterface
();
ReleaseDirectDraw
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment