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
37deec74
Commit
37deec74
authored
Jun 09, 2007
by
Misha Koshelev
Committed by
Alexandre Julliard
Jun 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Simplify DDE thread and message loop.
parent
1fc0cb75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
35 deletions
+11
-35
shlexec.c
dlls/shell32/tests/shlexec.c
+11
-35
No files found.
dlls/shell32/tests/shlexec.c
View file @
37deec74
...
...
@@ -1125,12 +1125,12 @@ typedef struct
static
DWORD
CALLBACK
ddeThread
(
LPVOID
arg
)
{
dde_thread_info_t
*
info
=
(
dde_thread_info_t
*
)
arg
;
int
rc
;
assert
(
info
&&
info
->
filename
);
rc
=
shell_execute
(
NULL
,
info
->
filename
,
NULL
,
NULL
);
PostThreadMessage
(
info
->
threadIdParent
,
WM_QUIT
,
0
,
0L
);
ExitThread
(
rc
);
PostThreadMessage
(
info
->
threadIdParent
,
WM_QUIT
,
shell_execute
(
NULL
,
info
->
filename
,
NULL
,
NULL
),
0L
);
ExitThread
(
0
);
}
/* ShellExecute won't successfully send DDE commands to console applications after starting them,
...
...
@@ -1144,7 +1144,6 @@ static void test_dde(void)
dde_thread_info_t
info
=
{
filename
,
GetCurrentThreadId
()
};
const
dde_tests_t
*
test
;
char
params
[
1024
];
HANDLE
hThread
;
MSG
msg
;
int
rc
;
...
...
@@ -1174,20 +1173,9 @@ static void test_dde(void)
denyNextConnection
=
TRUE
;
ddeExec
[
0
]
=
0
;
hThread
=
CreateThread
(
NULL
,
0
,
ddeThread
,
(
LPVOID
)
&
info
,
0
,
NULL
);
assert
(
hThread
);
while
(
GetMessage
(
&
msg
,
NULL
,
0
,
0
))
{
/* Need a message loop for DDE server */
TranslateMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
}
rc
=
WaitForSingleObject
(
hThread
,
5000
);
assert
(
rc
==
WAIT_OBJECT_0
);
GetExitCodeThread
(
hThread
,
(
DWORD
*
)
&
rc
);
if
(
rc
>
32
)
rc
=
33
;
assert
(
CreateThread
(
NULL
,
0
,
ddeThread
,
(
LPVOID
)
&
info
,
0
,
NULL
));
while
(
GetMessage
(
&
msg
,
NULL
,
0
,
0
))
DispatchMessage
(
&
msg
);
rc
=
msg
.
wParam
>
32
?
33
:
msg
.
wParam
;
if
((
test
->
todo
&
0x1
)
==
0
)
{
ok
(
rc
==
test
->
rc
,
"%s failed: rc=%d err=%d
\n
"
,
shell_call
,
...
...
@@ -1296,7 +1284,6 @@ static void test_dde_default_app(void)
dde_thread_info_t
info
=
{
filename
,
GetCurrentThreadId
()
};
const
dde_default_app_tests_t
*
test
;
char
params
[
1024
];
HANDLE
hThread
;
MSG
msg
;
int
rc
;
...
...
@@ -1329,20 +1316,9 @@ static void test_dde_default_app(void)
* so don't wait for it */
SetEvent
(
hEvent
);
hThread
=
CreateThread
(
NULL
,
0
,
ddeThread
,
(
LPVOID
)
&
info
,
0
,
NULL
);
assert
(
hThread
);
while
(
GetMessage
(
&
msg
,
NULL
,
0
,
0
))
{
/* Need a message loop for DDE server */
TranslateMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
}
rc
=
WaitForSingleObject
(
hThread
,
5000
);
assert
(
rc
==
WAIT_OBJECT_0
);
GetExitCodeThread
(
hThread
,
(
DWORD
*
)
&
rc
);
if
(
rc
>
32
)
rc
=
33
;
assert
(
CreateThread
(
NULL
,
0
,
ddeThread
,
(
LPVOID
)
&
info
,
0
,
NULL
));
while
(
GetMessage
(
&
msg
,
NULL
,
0
,
0
))
DispatchMessage
(
&
msg
);
rc
=
msg
.
wParam
>
32
?
33
:
msg
.
wParam
;
if
((
test
->
todo
&
0x1
)
==
0
)
{
ok
(
rc
==
test
->
rc
,
"%s failed: rc=%d err=%d
\n
"
,
shell_call
,
...
...
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