Re: [PATCH v3] user32: Add MOUSEHOOKSTRUCTEX to fix mouse wheel support for JA2 1.13 and other apps which use it
Hello again.
+typedef struct +{ + MOUSEHOOKSTRUCT MOUSEHOOKSTRUCT; + DWORD mouseData; +} MOUSEHOOKSTRUCTEX, *PMOUSEHOOKSTRUCTEX, *LPMOUSEHOOKSTRUCTEX;
Apparently that's not how Windows SDK defines it. For some obscure reason they didn't define EX struct simply as non-EX + extra field, but used cpp style, kind of. Older versions don't even have field name for MOUSEHOOKSTRUCT portion, only type, but this won't work, not with gcc at least. SDK 10 uses DUMMYSTRUCTNAME as a field name, which resolves to 's', if NONAMELESSSTRUCT is defined. I guess we have to follow version 10 definition.
Hello @André and @Nikolay, please note that I defined the struct this exact way because of this MSDN article: https://msdn.microsoft.com/en-us/library/windows/desktop/ms644969%28v=vs.85%... So if you think it's a bad idea to follow the definition of the MSDN article then please tell me what I should change so I can improve the patch. kind regards, Kira On Tue, Dec 22, 2015 at 8:13 PM, Nikolay Sivov <bunglehead(a)gmail.com> wrote:
Hello again.
+typedef struct +{ + MOUSEHOOKSTRUCT MOUSEHOOKSTRUCT; + DWORD mouseData; +} MOUSEHOOKSTRUCTEX, *PMOUSEHOOKSTRUCTEX, *LPMOUSEHOOKSTRUCTEX;
Apparently that's not how Windows SDK defines it. For some obscure reason they didn't define EX struct simply as non-EX + extra field, but used cpp style, kind of. Older versions don't even have field name for MOUSEHOOKSTRUCT portion, only type, but this won't work, not with gcc at least. SDK 10 uses DUMMYSTRUCTNAME as a field name, which resolves to 's', if NONAMELESSSTRUCT is defined. I guess we have to follow version 10 definition.
How should we proceed here? One suggestion that came up was to just add the fields of MOUSEHOOKSTRUCT to the ..EX struct, and I'm fine with that solution. rgds, Kira On Tue, Dec 22, 2015 at 11:32 PM, Kira Backes <kira.backes(a)nrwsoft.de> wrote:
Hello @André and @Nikolay,
please note that I defined the struct this exact way because of this MSDN article: https://msdn.microsoft.com/en-us/library/windows/desktop/ms644969%28v=vs.85%...
So if you think it's a bad idea to follow the definition of the MSDN article then please tell me what I should change so I can improve the patch.
kind regards, Kira
On Tue, Dec 22, 2015 at 8:13 PM, Nikolay Sivov <bunglehead(a)gmail.com> wrote:
Hello again.
+typedef struct +{ + MOUSEHOOKSTRUCT MOUSEHOOKSTRUCT; + DWORD mouseData; +} MOUSEHOOKSTRUCTEX, *PMOUSEHOOKSTRUCTEX, *LPMOUSEHOOKSTRUCTEX;
Apparently that's not how Windows SDK defines it. For some obscure reason they didn't define EX struct simply as non-EX + extra field, but used cpp style, kind of. Older versions don't even have field name for MOUSEHOOKSTRUCT portion, only type, but this won't work, not with gcc at least. SDK 10 uses DUMMYSTRUCTNAME as a field name, which resolves to 's', if NONAMELESSSTRUCT is defined. I guess we have to follow version 10 definition.
Kira Backes <kira.backes(a)nrwsoft.de> writes:
On Tue, Dec 22, 2015 at 11:32 PM, Kira Backes <kira.backes(a)nrwsoft.de> wrote:
Hello @André and @Nikolay,
please note that I defined the struct this exact way because of this MSDN article: https://msdn.microsoft.com/en-us/library/windows/desktop/ms644969%28v=vs.85%...
So if you think it's a bad idea to follow the definition of the MSDN article then please tell me what I should change so I can improve the patch.
kind regards, Kira
On Tue, Dec 22, 2015 at 8:13 PM, Nikolay Sivov <bunglehead(a)gmail.com> wrote:
Hello again.
+typedef struct +{ + MOUSEHOOKSTRUCT MOUSEHOOKSTRUCT; + DWORD mouseData; +} MOUSEHOOKSTRUCTEX, *PMOUSEHOOKSTRUCTEX, *LPMOUSEHOOKSTRUCTEX;
Apparently that's not how Windows SDK defines it. For some obscure reason they didn't define EX struct simply as non-EX + extra field, but used cpp style, kind of. Older versions don't even have field name for MOUSEHOOKSTRUCT portion, only type, but this won't work, not with gcc at least. SDK 10 uses DUMMYSTRUCTNAME as a field name, which resolves to 's', if NONAMELESSSTRUCT is defined. I guess we have to follow version 10 definition.
How should we proceed here? One suggestion that came up was to just add the fields of MOUSEHOOKSTRUCT to the ..EX struct, and I'm fine with that solution.
If the latest SDK is using DUMMYSTRUCTNAME that's what we should use too. -- Alexandre Julliard julliard(a)winehq.org
Okay, I've looked at the win10 SDK and made MOUSEHOOKSTRUCTEX compatible with it using DUMMYSTRUCTNAME and submitted a new patch version kind regards, Kira On Wed, Dec 30, 2015 at 5:00 PM, Alexandre Julliard <julliard(a)winehq.org> wrote:
Kira Backes <kira.backes(a)nrwsoft.de> writes:
On Tue, Dec 22, 2015 at 11:32 PM, Kira Backes <kira.backes(a)nrwsoft.de> wrote:
Hello @André and @Nikolay,
please note that I defined the struct this exact way because of this MSDN article: https://msdn.microsoft.com/en-us/library/windows/desktop/ms644969%28v=vs.85%...
So if you think it's a bad idea to follow the definition of the MSDN article then please tell me what I should change so I can improve the patch.
kind regards, Kira
On Tue, Dec 22, 2015 at 8:13 PM, Nikolay Sivov <bunglehead(a)gmail.com> wrote:
Hello again.
+typedef struct +{ + MOUSEHOOKSTRUCT MOUSEHOOKSTRUCT; + DWORD mouseData; +} MOUSEHOOKSTRUCTEX, *PMOUSEHOOKSTRUCTEX, *LPMOUSEHOOKSTRUCTEX;
Apparently that's not how Windows SDK defines it. For some obscure reason they didn't define EX struct simply as non-EX + extra field, but used cpp style, kind of. Older versions don't even have field name for MOUSEHOOKSTRUCT portion, only type, but this won't work, not with gcc at least. SDK 10 uses DUMMYSTRUCTNAME as a field name, which resolves to 's', if NONAMELESSSTRUCT is defined. I guess we have to follow version 10 definition.
How should we proceed here? One suggestion that came up was to just add the fields of MOUSEHOOKSTRUCT to the ..EX struct, and I'm fine with that solution.
If the latest SDK is using DUMMYSTRUCTNAME that's what we should use too.
-- Alexandre Julliard julliard(a)winehq.org
participants (3)
-
Alexandre Julliard -
Kira Backes -
Nikolay Sivov