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
bab8f7e5
Commit
bab8f7e5
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 DirectDrawEnumerateW.
parent
4c61c2ff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
5 deletions
+51
-5
ddraw.spec
dlls/ddraw/ddraw.spec
+1
-1
main.c
dlls/ddraw/main.c
+13
-4
ddrawmodes.c
dlls/ddraw/tests/ddrawmodes.c
+37
-0
No files found.
dlls/ddraw/ddraw.spec
View file @
bab8f7e5
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
@ stdcall DirectDrawEnumerateA(ptr ptr)
@ stdcall DirectDrawEnumerateA(ptr ptr)
@ stdcall DirectDrawEnumerateExA(ptr ptr long)
@ stdcall DirectDrawEnumerateExA(ptr ptr long)
@ stub DirectDrawEnumerateExW
@ stub DirectDrawEnumerateExW
@ st
ub DirectDrawEnumerateW
@ st
dcall DirectDrawEnumerateW(ptr ptr)
@ stdcall -private DllCanUnloadNow()
@ stdcall -private DllCanUnloadNow()
@ stdcall -private DllGetClassObject(ptr ptr ptr)
@ stdcall -private DllGetClassObject(ptr ptr ptr)
@ stdcall -private DllRegisterServer()
@ stdcall -private DllRegisterServer()
...
...
dlls/ddraw/main.c
View file @
bab8f7e5
...
@@ -428,12 +428,21 @@ DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA Callback,
...
@@ -428,12 +428,21 @@ DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA Callback,
/***********************************************************************
/***********************************************************************
* DirectDrawEnumerateW (DDRAW.@)
* DirectDrawEnumerateW (DDRAW.@)
*
*
* Enumerates legacy drivers, unicode version. See
* Enumerates legacy drivers, unicode version.
* the comments above DirectDrawEnumerateA for more details.
* This function is not implemented on Windows.
*
* The Flag member is not supported right now.
*
*
***********************************************************************/
***********************************************************************/
HRESULT
WINAPI
DirectDrawEnumerateW
(
LPDDENUMCALLBACKW
Callback
,
LPVOID
Context
)
{
TRACE
(
"(%p, %p)
\n
"
,
Callback
,
Context
);
if
(
!
Callback
)
return
DDERR_INVALIDPARAMS
;
else
return
DDERR_UNSUPPORTED
;
}
/***********************************************************************
/***********************************************************************
* DirectDrawEnumerateExW (DDRAW.@)
* DirectDrawEnumerateExW (DDRAW.@)
...
...
dlls/ddraw/tests/ddrawmodes.c
View file @
bab8f7e5
...
@@ -39,11 +39,13 @@ static int modes_size;
...
@@ -39,11 +39,13 @@ static int modes_size;
static
LPDDSURFACEDESC
modes
;
static
LPDDSURFACEDESC
modes
;
static
HRESULT
(
WINAPI
*
pDirectDrawEnumerateA
)(
LPDDENUMCALLBACKA
,
LPVOID
);
static
HRESULT
(
WINAPI
*
pDirectDrawEnumerateA
)(
LPDDENUMCALLBACKA
,
LPVOID
);
static
HRESULT
(
WINAPI
*
pDirectDrawEnumerateW
)(
LPDDENUMCALLBACKW
,
LPVOID
);
static
void
init_function_pointers
(
void
)
static
void
init_function_pointers
(
void
)
{
{
HMODULE
hmod
=
GetModuleHandleA
(
"ddraw.dll"
);
HMODULE
hmod
=
GetModuleHandleA
(
"ddraw.dll"
);
pDirectDrawEnumerateA
=
(
void
*
)
GetProcAddress
(
hmod
,
"DirectDrawEnumerateA"
);
pDirectDrawEnumerateA
=
(
void
*
)
GetProcAddress
(
hmod
,
"DirectDrawEnumerateA"
);
pDirectDrawEnumerateW
=
(
void
*
)
GetProcAddress
(
hmod
,
"DirectDrawEnumerateW"
);
}
}
static
void
createwindow
(
void
)
static
void
createwindow
(
void
)
...
@@ -158,6 +160,40 @@ static void test_DirectDrawEnumerateA(void)
...
@@ -158,6 +160,40 @@ static void test_DirectDrawEnumerateA(void)
ok
(
ret
==
DD_OK
,
"Expected DD_OK, got %d
\n
"
,
ret
);
ok
(
ret
==
DD_OK
,
"Expected DD_OK, got %d
\n
"
,
ret
);
}
}
static
BOOL
WINAPI
test_callbackW
(
GUID
*
lpGUID
,
LPWSTR
lpDriverDescription
,
LPWSTR
lpDriverName
,
LPVOID
lpContext
)
{
ok
(
0
,
"The callback should not be invoked by DirectDrawEnumerateW
\n
"
);
return
TRUE
;
}
static
void
test_DirectDrawEnumerateW
(
void
)
{
HRESULT
ret
;
if
(
!
pDirectDrawEnumerateW
)
{
win_skip
(
"DirectDrawEnumerateW is not available
\n
"
);
return
;
}
/* DirectDrawEnumerateW is not implemented on Windows. */
/* Test with NULL callback parameter. */
ret
=
pDirectDrawEnumerateW
(
NULL
,
NULL
);
ok
(
ret
==
DDERR_INVALIDPARAMS
,
"Expected DDERR_INVALIDPARAMS, got %d
\n
"
,
ret
);
/* Test with invalid callback parameter. */
ret
=
pDirectDrawEnumerateW
((
LPDDENUMCALLBACKW
)
0xdeadbeef
,
NULL
);
ok
(
ret
==
DDERR_INVALIDPARAMS
/* XP */
||
ret
==
DDERR_UNSUPPORTED
/* Win7 */
,
"Expected DDERR_INVALIDPARAMS or DDERR_UNSUPPORTED, got %d
\n
"
,
ret
);
/* Test with valid callback parameter and NULL context parameter. */
ret
=
pDirectDrawEnumerateW
(
test_callbackW
,
NULL
);
ok
(
ret
==
DDERR_UNSUPPORTED
,
"Expected DDERR_UNSUPPORTED, got %d
\n
"
,
ret
);
}
static
void
adddisplaymode
(
LPDDSURFACEDESC
lpddsd
)
static
void
adddisplaymode
(
LPDDSURFACEDESC
lpddsd
)
{
{
if
(
!
modes
)
if
(
!
modes
)
...
@@ -486,6 +522,7 @@ START_TEST(ddrawmodes)
...
@@ -486,6 +522,7 @@ START_TEST(ddrawmodes)
return
;
return
;
test_DirectDrawEnumerateA
();
test_DirectDrawEnumerateA
();
test_DirectDrawEnumerateW
();
enumdisplaymodes
();
enumdisplaymodes
();
if
(
winetest_interactive
)
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