[PATCH] user.exe16: Add missing SELECTOROF in WM_DDE_EXECUTE.

Alexandre Julliard julliard at winehq.org
Fri Jan 6 04:47:54 CST 2017


Zebediah Figura <z.figura12 at gmail.com> writes:

> On 01/05/2017 05:23 AM, Alexandre Julliard wrote:
>> Zebediah Figura <z.figura12 at gmail.com> writes:
>> 
>>> Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
>>> ---
>>>  dlls/user.exe16/message.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/dlls/user.exe16/message.c b/dlls/user.exe16/message.c
>>> index 7bcc8e2..383d746 100644
>>> --- a/dlls/user.exe16/message.c
>>> +++ b/dlls/user.exe16/message.c
>>> @@ -900,7 +900,7 @@ LRESULT WINPROC_CallProc16To32A( winproc_callback_t callback, HWND16 hwnd, UINT1
>>>          }
>>>          break; /* FIXME don't know how to free allocated memory (handle) !! */
>>>      case WM_DDE_EXECUTE:
>>> -        lParam = convert_handle_16_to_32( lParam, GMEM_DDESHARE );
>>> +        lParam = convert_handle_16_to_32( SELECTOROF(lParam), GMEM_DDESHARE );
>> 
>> This won't work without fixing the opposite mapping. Do you have a
>> reference for this? What application is this for?
>> 
>
> Sorry, I'm a little new to Wine development.
>
> The application is The Magic School Bus Explores The Solar System [1],
> an old educational game. I was trying to fix a bug [2] in which the
> Progman DDE interface, besides being unimplemented, was being passed
> garbage memory. The program itself was passing values like 14660000 to
> lParam.

Thanks. It does look like the handle (not the selector) is supposed to
be in the high word for 16-bit, so the patch is OK, though HIWORD would
be better that SELECTOROF. And you need to do the opposite conversion
for the 32->16 translation.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list