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
11d550df
Commit
11d550df
authored
Oct 04, 2004
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 04, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more message conversion tests, make the tests pass under Wine.
parent
6be32f7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
10 deletions
+30
-10
message.c
dlls/user/message.c
+4
-4
msg.c
dlls/user/tests/msg.c
+26
-6
No files found.
dlls/user/message.c
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
;
...
...
dlls/user/tests/msg.c
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
)
...
...
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