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
609a3998
Commit
609a3998
authored
Nov 05, 2008
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Nov 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Fix crash on win9x in the dde test.
parent
aa1effe3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
9 deletions
+28
-9
dde.c
dlls/user32/tests/dde.c
+28
-9
No files found.
dlls/user32/tests/dde.c
View file @
609a3998
...
...
@@ -1055,9 +1055,14 @@ static void test_msg_client()
/* WM_DDE_POKE, no ddepoke */
lparam
=
PackDDElParam
(
WM_DDE_POKE
,
0
,
item
);
/* win9x returns 0 here and crashes in PostMessageA */
if
(
lparam
)
{
PostMessageA
(
server_hwnd
,
WM_DDE_POKE
,
(
WPARAM
)
client_hwnd
,
lparam
);
flush_events
();
}
else
win_skip
(
"no lparam for WM_DDE_POKE
\n
"
);
/* WM_DDE_POKE, no item */
lparam
=
PackDDElParam
(
WM_DDE_POKE
,
(
UINT_PTR
)
hglobal
,
0
);
...
...
@@ -1522,15 +1527,9 @@ static void test_DdeCreateDataHandle(void)
item
=
DdeCreateStringHandleA
(
dde_inst
,
"item"
,
CP_WINANSI
);
ok
(
item
!=
NULL
,
"Expected non-NULL hsz
\n
"
);
/* invalid instance id */
DdeGetLastError
(
dde_inst
);
if
(
0
)
{
/* do not test with an invalid instance id: that crashes on win9x */
hdata
=
DdeCreateDataHandle
(
0xdeadbeef
,
(
LPBYTE
)
"data"
,
MAX_PATH
,
0
,
item
,
CF_TEXT
,
0
);
err
=
DdeGetLastError
(
dde_inst
);
todo_wine
{
ok
(
hdata
==
NULL
,
"Expected NULL, got %p
\n
"
,
hdata
);
ok
(
err
==
DMLERR_INVALIDPARAMETER
,
"Expected DMLERR_INVALIDPARAMETER, got %d
\n
"
,
err
);
}
/* 0 instance id */
...
...
@@ -1826,6 +1825,8 @@ static void test_PackDDElParam(void)
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
lparam
=
PackDDElParam
(
WM_DDE_ADVISE
,
0xcafe
,
0xbeef
);
/* win9x returns 0 here */
if
(
lparam
)
{
ptr
=
GlobalLock
((
HGLOBAL
)
lparam
);
ok
(
ptr
!=
NULL
,
"Expected non-NULL ptr
\n
"
);
ok
(
ptr
[
0
]
==
0xcafe
,
"Expected 0xcafe, got %08lx
\n
"
,
ptr
[
0
]);
...
...
@@ -1839,6 +1840,9 @@ static void test_PackDDElParam(void)
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
ok
(
lo
==
0xcafe
,
"Expected 0xcafe, got %08lx
\n
"
,
lo
);
ok
(
hi
==
0xbeef
,
"Expected 0xbeef, got %08lx
\n
"
,
hi
);
}
else
win_skip
(
"no lparam for WM_DDE_ADVISE
\n
"
);
ret
=
FreeDDElParam
(
WM_DDE_ADVISE
,
lparam
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
...
...
@@ -1865,6 +1869,8 @@ static void test_PackDDElParam(void)
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
lparam
=
PackDDElParam
(
WM_DDE_ACK
,
0xcafe
,
0xbeef
);
/* win9x returns the input (0xbeef<<16 | 0xcafe) here */
if
(
lparam
!=
0xbeefcafe
)
{
ptr
=
GlobalLock
((
HGLOBAL
)
lparam
);
ok
(
ptr
!=
NULL
,
"Expected non-NULL ptr
\n
"
);
ok
(
ptr
[
0
]
==
0xcafe
,
"Expected 0xcafe, got %08lx
\n
"
,
ptr
[
0
]);
...
...
@@ -1886,8 +1892,13 @@ static void test_PackDDElParam(void)
ok
(
hglobal
==
(
HGLOBAL
)
lparam
,
"Expected lparam, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
}
else
win_skip
(
"got lparam 0x%lx for WM_DDE_ACK
\n
"
,
lparam
);
lparam
=
PackDDElParam
(
WM_DDE_DATA
,
0xcafe
,
0xbeef
);
/* win9x returns 0 here */
if
(
lparam
)
{
ptr
=
GlobalLock
((
HGLOBAL
)
lparam
);
ok
(
ptr
!=
NULL
,
"Expected non-NULL ptr
\n
"
);
ok
(
ptr
[
0
]
==
0xcafe
,
"Expected 0xcafe, got %08lx
\n
"
,
ptr
[
0
]);
...
...
@@ -1901,6 +1912,9 @@ static void test_PackDDElParam(void)
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
ok
(
lo
==
0xcafe
,
"Expected 0xcafe, got %08lx
\n
"
,
lo
);
ok
(
hi
==
0xbeef
,
"Expected 0xbeef, got %08lx
\n
"
,
hi
);
}
else
win_skip
(
"no lparam for WM_DDE_DATA
\n
"
);
ret
=
FreeDDElParam
(
WM_DDE_DATA
,
lparam
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
...
...
@@ -1927,6 +1941,8 @@ static void test_PackDDElParam(void)
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
lparam
=
PackDDElParam
(
WM_DDE_POKE
,
0xcafe
,
0xbeef
);
/* win9x returns 0 here */
if
(
lparam
)
{
ptr
=
GlobalLock
((
HGLOBAL
)
lparam
);
ok
(
ptr
!=
NULL
,
"Expected non-NULL ptr
\n
"
);
ok
(
ptr
[
0
]
==
0xcafe
,
"Expected 0xcafe, got %08lx
\n
"
,
ptr
[
0
]);
...
...
@@ -1940,6 +1956,9 @@ static void test_PackDDElParam(void)
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
ok
(
lo
==
0xcafe
,
"Expected 0xcafe, got %08lx
\n
"
,
lo
);
ok
(
hi
==
0xbeef
,
"Expected 0xbeef, got %08lx
\n
"
,
hi
);
}
else
win_skip
(
"no lparam for WM_DDE_POKE
\n
"
);
ret
=
FreeDDElParam
(
WM_DDE_POKE
,
lparam
);
ok
(
ret
==
TRUE
,
"Expected TRUE, got %d
\n
"
,
ret
);
...
...
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