};
/* check whether a given message type includes pointers */
-static inline BOOL is_pointer_message( UINT message )
+static inline BOOL is_pointer_message( UINT message, WPARAM wparam )
{
if (message >= 8*sizeof(message_pointer_flags)) return FALSE;
+ if (message == WM_DEVICECHANGE && !(wparam & 0x8000)) return FALSE;
return (message_pointer_flags[message / 32] & SET(message)) != 0;
}
{
struct send_message_info info;
- if (is_pointer_message(msg))
+ if (is_pointer_message( msg, wparam ))
{
SetLastError( ERROR_MESSAGE_SYNC_ONLY );
return FALSE;
{
struct send_message_info info;
- if (is_pointer_message(msg))
+ if (is_pointer_message( msg, wparam ))
{
SetLastError( ERROR_MESSAGE_SYNC_ONLY );
return FALSE;
{
struct send_message_info info;
- if (is_pointer_message(msg))
+ if (is_pointer_message( msg, wparam ))
{
SetLastError( ERROR_MESSAGE_SYNC_ONLY );
return FALSE;
{
struct send_message_info info;
- if (is_pointer_message(msg))
+ if (is_pointer_message( msg, wparam ))
{
SetLastError( ERROR_MESSAGE_SYNC_ONLY );
return FALSE;
{
struct send_message_info info;
- if (is_pointer_message( msg ))
+ if (is_pointer_message( msg, wparam ))
{
SetLastError( ERROR_MESSAGE_SYNC_ONLY );
return FALSE;
{
struct send_message_info info;
- if (is_pointer_message( msg ))
+ if (is_pointer_message( msg, wparam ))
{
SetLastError( ERROR_MESSAGE_SYNC_ONLY );
return FALSE;
}
else
{
- todo_wine {
- ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE);
- ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %x\n", ret);
- memset(&msg, 0, sizeof(msg));
- ok(PeekMessageA(&msg, 0, 0, 0, PM_REMOVE), "PeekMessage should succeed\n");
- ok(msg.message == WM_DEVICECHANGE, "got %04x instead of WM_DEVICECHANGE\n", msg.message);
- }
+ ret = MsgWaitForMultipleObjects(0, NULL, FALSE, 0, QS_POSTMESSAGE);
+ ok(ret == WAIT_OBJECT_0, "MsgWaitForMultipleObjects returned %x\n", ret);
+ memset(&msg, 0, sizeof(msg));
+ ok(PeekMessageA(&msg, 0, 0, 0, PM_REMOVE), "PeekMessage should succeed\n");
+ ok(msg.message == WM_DEVICECHANGE, "got %04x instead of WM_DEVICECHANGE\n", msg.message);
}
}
}