Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
11d550df
Commit
11d550df
authored
20 years ago
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
20 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add more message conversion tests, make the tests pass under Wine.
parent
6be32f7e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/user/message.c
+4
-4
4 additions, 4 deletions
dlls/user/message.c
dlls/user/tests/msg.c
+26
-6
26 additions, 6 deletions
dlls/user/tests/msg.c
with
30 additions
and
10 deletions
dlls/user/message.c
+
4
−
4
View file @
11d550df
...
...
@@ -2033,7 +2033,7 @@ BOOL WINAPI SendNotifyMessageW( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpara
if
(
is_pointer_message
(
msg
))
{
SetLastError
(
ERROR_
INVALID_PARAMETER
);
SetLastError
(
ERROR_
MESSAGE_SYNC_ONLY
);
return
FALSE
;
}
...
...
@@ -2086,7 +2086,7 @@ BOOL WINAPI SendMessageCallbackW( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa
if
(
is_pointer_message
(
msg
))
{
SetLastError
(
ERROR_
INVALID_PARAMETER
);
SetLastError
(
ERROR_
MESSAGE_SYNC_ONLY
);
return
FALSE
;
}
...
...
@@ -2175,7 +2175,7 @@ BOOL WINAPI PostMessageW( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
if
(
is_pointer_message
(
msg
))
{
SetLastError
(
ERROR_
INVALID_PARAMETER
);
SetLastError
(
ERROR_
MESSAGE_SYNC_ONLY
);
return
FALSE
;
}
...
...
@@ -2223,7 +2223,7 @@ BOOL WINAPI PostThreadMessageW( DWORD thread, UINT msg, WPARAM wparam, LPARAM lp
if
(
is_pointer_message
(
msg
))
{
SetLastError
(
ERROR_
INVALID_PARAMETER
);
SetLastError
(
ERROR_
MESSAGE_SYNC_ONLY
);
return
FALSE
;
}
if
(
USER_IsExitingThread
(
thread
))
return
TRUE
;
...
...
This diff is collapsed.
Click to expand it.
dlls/user/tests/msg.c
+
26
−
6
View file @
11d550df
...
...
@@ -32,7 +32,6 @@
#include
"winuser.h"
#include
"wine/test.h"
#include
"wine/unicode.h"
#define MDI_FIRST_CHILD_ID 2004
...
...
@@ -2945,9 +2944,9 @@ static LRESULT CALLBACK MsgConversionProcW(HWND hwnd, UINT uMsg, WPARAM wParam,
{
case
CB_FINDSTRINGEXACT
:
trace
(
"String: %p
\n
"
,
(
LPCWSTR
)
lParam
);
if
(
!
strcmpW
((
LPCWSTR
)
lParam
,
wszUnicode
))
if
(
!
l
strcmpW
((
LPCWSTR
)
lParam
,
wszUnicode
))
return
1
;
if
(
!
strcmpW
((
LPCWSTR
)
lParam
,
wszAnsi
))
if
(
!
l
strcmpW
((
LPCWSTR
)
lParam
,
wszAnsi
))
return
0
;
return
-
1
;
}
...
...
@@ -3006,8 +3005,6 @@ static void test_message_conversion(void)
/* Asynchronous messages */
todo_wine
{
SetLastError
(
0
);
lRes
=
PostMessageA
(
hwnd
,
CB_FINDSTRINGEXACT
,
0
,
(
LPARAM
)
wszUnicode
);
ok
(
lRes
==
0
&&
GetLastError
()
==
ERROR_MESSAGE_SYNC_ONLY
,
...
...
@@ -3016,7 +3013,30 @@ static void test_message_conversion(void)
lRes
=
PostMessageW
(
hwnd
,
CB_FINDSTRINGEXACT
,
0
,
(
LPARAM
)
wszUnicode
);
ok
(
lRes
==
0
&&
GetLastError
()
==
ERROR_MESSAGE_SYNC_ONLY
,
"PostMessage on sync only message returned %ld, last error %ld
\n
"
,
lRes
,
GetLastError
());
}
SetLastError
(
0
);
lRes
=
PostThreadMessageA
(
GetCurrentThreadId
(),
CB_FINDSTRINGEXACT
,
0
,
(
LPARAM
)
wszUnicode
);
ok
(
lRes
==
0
&&
GetLastError
()
==
ERROR_MESSAGE_SYNC_ONLY
,
"PosThreadtMessage on sync only message returned %ld, last error %ld
\n
"
,
lRes
,
GetLastError
());
SetLastError
(
0
);
lRes
=
PostThreadMessageW
(
GetCurrentThreadId
(),
CB_FINDSTRINGEXACT
,
0
,
(
LPARAM
)
wszUnicode
);
ok
(
lRes
==
0
&&
GetLastError
()
==
ERROR_MESSAGE_SYNC_ONLY
,
"PosThreadtMessage on sync only message returned %ld, last error %ld
\n
"
,
lRes
,
GetLastError
());
SetLastError
(
0
);
lRes
=
SendNotifyMessageA
(
hwnd
,
CB_FINDSTRINGEXACT
,
0
,
(
LPARAM
)
wszUnicode
);
ok
(
lRes
==
0
&&
GetLastError
()
==
ERROR_MESSAGE_SYNC_ONLY
,
"SendNotifyMessage on sync only message returned %ld, last error %ld
\n
"
,
lRes
,
GetLastError
());
SetLastError
(
0
);
lRes
=
SendNotifyMessageW
(
hwnd
,
CB_FINDSTRINGEXACT
,
0
,
(
LPARAM
)
wszUnicode
);
ok
(
lRes
==
0
&&
GetLastError
()
==
ERROR_MESSAGE_SYNC_ONLY
,
"SendNotifyMessage on sync only message returned %ld, last error %ld
\n
"
,
lRes
,
GetLastError
());
SetLastError
(
0
);
lRes
=
SendMessageCallbackA
(
hwnd
,
CB_FINDSTRINGEXACT
,
0
,
(
LPARAM
)
wszUnicode
,
NULL
,
0
);
ok
(
lRes
==
0
&&
GetLastError
()
==
ERROR_MESSAGE_SYNC_ONLY
,
"SendMessageCallback on sync only message returned %ld, last error %ld
\n
"
,
lRes
,
GetLastError
());
SetLastError
(
0
);
lRes
=
SendMessageCallbackW
(
hwnd
,
CB_FINDSTRINGEXACT
,
0
,
(
LPARAM
)
wszUnicode
,
NULL
,
0
);
ok
(
lRes
==
0
&&
GetLastError
()
==
ERROR_MESSAGE_SYNC_ONLY
,
"SendMessageCallback on sync only message returned %ld, last error %ld
\n
"
,
lRes
,
GetLastError
());
}
START_TEST
(
msg
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment