Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
7211f7ce
Commit
7211f7ce
authored
Oct 08, 2009
by
Andrew Nguyen
Committed by
Alexandre Julliard
Oct 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Implement and test DirectDrawEnumerateExW.
parent
3496fe5f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
5 deletions
+59
-5
ddraw.spec
dlls/ddraw/ddraw.spec
+1
-1
main.c
dlls/ddraw/main.c
+11
-4
ddrawmodes.c
dlls/ddraw/tests/ddrawmodes.c
+47
-0
No files found.
dlls/ddraw/ddraw.spec
View file @
7211f7ce
...
...
@@ -8,7 +8,7 @@
@ stdcall DirectDrawCreateEx(ptr ptr ptr ptr)
@ stdcall DirectDrawEnumerateA(ptr ptr)
@ stdcall DirectDrawEnumerateExA(ptr ptr long)
@ st
ub DirectDrawEnumerateExW
@ st
dcall DirectDrawEnumerateExW(ptr ptr long)
@ stdcall DirectDrawEnumerateW(ptr ptr)
@ stdcall -private DllCanUnloadNow()
@ stdcall -private DllGetClassObject(ptr ptr ptr)
...
...
dlls/ddraw/main.c
View file @
7211f7ce
...
...
@@ -456,12 +456,19 @@ DirectDrawEnumerateW(LPDDENUMCALLBACKW Callback,
/***********************************************************************
* DirectDrawEnumerateExW (DDRAW.@)
*
* Enumerates DirectDraw7 drivers, unicode version. See
* the comments above DirectDrawEnumerateA for more details.
*
* The Flag member is not supported right now.
* Enumerates DirectDraw7 drivers, unicode version.
* This function is not implemented on Windows.
*
***********************************************************************/
HRESULT
WINAPI
DirectDrawEnumerateExW
(
LPDDENUMCALLBACKEXW
Callback
,
LPVOID
Context
,
DWORD
Flags
)
{
TRACE
(
"(%p, %p, 0x%x)
\n
"
,
Callback
,
Context
,
Flags
);
return
DDERR_UNSUPPORTED
;
}
/***********************************************************************
* Classfactory implementation.
...
...
dlls/ddraw/tests/ddrawmodes.c
View file @
7211f7ce
...
...
@@ -41,6 +41,7 @@ static LPDDSURFACEDESC modes;
static
HRESULT
(
WINAPI
*
pDirectDrawEnumerateA
)(
LPDDENUMCALLBACKA
,
LPVOID
);
static
HRESULT
(
WINAPI
*
pDirectDrawEnumerateW
)(
LPDDENUMCALLBACKW
,
LPVOID
);
static
HRESULT
(
WINAPI
*
pDirectDrawEnumerateExA
)(
LPDDENUMCALLBACKEXA
,
LPVOID
,
DWORD
);
static
HRESULT
(
WINAPI
*
pDirectDrawEnumerateExW
)(
LPDDENUMCALLBACKEXW
,
LPVOID
,
DWORD
);
static
void
init_function_pointers
(
void
)
{
...
...
@@ -48,6 +49,7 @@ static void init_function_pointers(void)
pDirectDrawEnumerateA
=
(
void
*
)
GetProcAddress
(
hmod
,
"DirectDrawEnumerateA"
);
pDirectDrawEnumerateW
=
(
void
*
)
GetProcAddress
(
hmod
,
"DirectDrawEnumerateW"
);
pDirectDrawEnumerateExA
=
(
void
*
)
GetProcAddress
(
hmod
,
"DirectDrawEnumerateExA"
);
pDirectDrawEnumerateExW
=
(
void
*
)
GetProcAddress
(
hmod
,
"DirectDrawEnumerateExW"
);
}
static
void
createwindow
(
void
)
...
...
@@ -273,6 +275,50 @@ static void test_DirectDrawEnumerateExA(void)
ok
(
ret
==
DD_OK
,
"Expected DD_OK, got %d
\n
"
,
ret
);
}
static
BOOL
WINAPI
test_callbackExW
(
GUID
*
lpGUID
,
LPWSTR
lpDriverDescription
,
LPWSTR
lpDriverName
,
LPVOID
lpContext
,
HMONITOR
hm
)
{
ok
(
0
,
"The callback should not be invoked by DirectDrawEnumerateExW.
\n
"
);
return
TRUE
;
}
static
void
test_DirectDrawEnumerateExW
(
void
)
{
HRESULT
ret
;
if
(
!
pDirectDrawEnumerateExW
)
{
win_skip
(
"DirectDrawEnumerateExW is not available
\n
"
);
return
;
}
/* DirectDrawEnumerateExW is not implemented on Windows. */
/* Test with NULL callback parameter. */
ret
=
pDirectDrawEnumerateExW
(
NULL
,
NULL
,
0
);
ok
(
ret
==
DDERR_UNSUPPORTED
,
"Expected DDERR_UNSUPPORTED, got %d
\n
"
,
ret
);
/* Test with invalid callback parameter. */
ret
=
pDirectDrawEnumerateExW
((
LPDDENUMCALLBACKEXW
)
0xdeadbeef
,
NULL
,
0
);
ok
(
ret
==
DDERR_UNSUPPORTED
,
"Expected DDERR_UNSUPPORTED, got %d
\n
"
,
ret
);
/* Test with valid callback parameter and invalid flags */
ret
=
pDirectDrawEnumerateExW
(
test_callbackExW
,
NULL
,
~
0
);
ok
(
ret
==
DDERR_UNSUPPORTED
,
"Expected DDERR_UNSUPPORTED, got %d
\n
"
,
ret
);
/* Test with valid callback parameter and NULL context parameter. */
ret
=
pDirectDrawEnumerateExW
(
test_callbackExW
,
NULL
,
0
);
ok
(
ret
==
DDERR_UNSUPPORTED
,
"Expected DDERR_UNSUPPORTED, got %d
\n
"
,
ret
);
/* Test with valid callback parameter, NULL context parameter, and all flags set. */
ret
=
pDirectDrawEnumerateExW
(
test_callbackExW
,
NULL
,
DDENUM_ATTACHEDSECONDARYDEVICES
|
DDENUM_DETACHEDSECONDARYDEVICES
|
DDENUM_NONDISPLAYDEVICES
);
ok
(
ret
==
DDERR_UNSUPPORTED
,
"Expected DDERR_UNSUPPORTED, got %d
\n
"
,
ret
);
}
static
void
adddisplaymode
(
LPDDSURFACEDESC
lpddsd
)
{
if
(
!
modes
)
...
...
@@ -603,6 +649,7 @@ START_TEST(ddrawmodes)
test_DirectDrawEnumerateA
();
test_DirectDrawEnumerateW
();
test_DirectDrawEnumerateExA
();
test_DirectDrawEnumerateExW
();
enumdisplaymodes
();
if
(
winetest_interactive
)
...
...
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