Handling of messages above WM_USER in pack_message

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Wed Apr 10 17:14:11 CDT 2002


Hallo,

I don't know if this global approach is valid, but at least it helped me to
get winhlp32 working called with WinHelpA from an application. In what other
way can we cope with user defined messages and their related structures in
inter-process SendMessage? 

Maybe the WARN should be a FIXME for some time?

Changelog
	dlls/users/message: pack_message
	Assume User Defined Messages Structures to have it's size
	always as first parameter
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Free Software: If you contribute nothing, expect nothing
--
Index: wine/dlls/user/message.c
===================================================================
RCS file: /home/wine/wine/dlls/user/message.c,v
retrieving revision 1.16
diff -u -r1.16 message.c
--- wine/dlls/user/message.c	11 Mar 2002 05:06:04 -0000	1.16
+++ wine/dlls/user/message.c	10 Apr 2002 22:12:37 -0000
@@ -377,6 +377,15 @@
                             struct packed_message *data )
 {
     data->count = 0;
+    if (message > WM_USER)
+      {
+	if (*(WORD*)lparam)
+	  {
+	    push_data( data, (void*)lparam,*(WORD*)lparam);
+	    WARN( "WM_USER + 0x%4x pushing %d bytes may be wrong\n",message - WM_USER, *(WORD*)lparam);
+	    return *(WORD*)lparam;
+	  }
+      }
     switch(message)
     {
     case WM_NCCREATE:



More information about the wine-patches mailing list