Module: wine Branch: refs/heads/master Commit: a32b3e86ec3c6b83804d896ed1cc3438cd9dc482 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=a32b3e86ec3c6b83804d896e...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Mar 9 22:48:37 2006 +0100
user: Support packing/unpacking the WM_DEVICECHANGE message.
---
dlls/user/message.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/user/message.c b/dlls/user/message.c index 8dc0b3c..8fe2ee7 100644 --- a/dlls/user/message.c +++ b/dlls/user/message.c @@ -32,6 +32,7 @@ #include "winuser.h" #include "winerror.h" #include "winnls.h" +#include "dbt.h" #include "dde.h" #include "wine/unicode.h" #include "wine/server.h" @@ -603,6 +604,12 @@ static size_t pack_message( HWND hwnd, U case WM_MDIGETACTIVE: if (lparam) return sizeof(BOOL); return 0; + case WM_DEVICECHANGE: + { + DEV_BROADCAST_HDR *header = (DEV_BROADCAST_HDR *)lparam; + push_data( data, header, header->dbch_size ); + return 0; + } case WM_WINE_SETWINDOWPOS: push_data( data, (WINDOWPOS *)lparam, sizeof(WINDOWPOS) ); return 0; @@ -646,7 +653,6 @@ static size_t pack_message( HWND hwnd, U case WM_DRAGLOOP: case WM_DRAGSELECT: case WM_DRAGMOVE: - case WM_DEVICECHANGE: FIXME( "msg %x (%s) not supported yet\n", message, SPY_GetMsgName(message, hwnd) ); data->count = -1; return 0; @@ -864,6 +870,9 @@ static BOOL unpack_message( HWND hwnd, U if (!*lparam) return TRUE; if (!get_buffer_space( buffer, sizeof(BOOL) )) return FALSE; break; + case WM_DEVICECHANGE: + minsize = sizeof(DEV_BROADCAST_HDR); + break; case WM_WINE_KEYBOARD_LL_HOOK: minsize = sizeof(KBDLLHOOKSTRUCT); break; @@ -904,7 +913,6 @@ static BOOL unpack_message( HWND hwnd, U case WM_DRAGLOOP: case WM_DRAGSELECT: case WM_DRAGMOVE: - case WM_DEVICECHANGE: FIXME( "msg %x (%s) not supported yet\n", message, SPY_GetMsgName(message, hwnd) ); return FALSE;