[PATCH 2/2] shlwapi: Make SHCreateWorkerWindowA() and SHCreateWorkerWindowW() x64-compatible.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 2/2] shlwapi: Make SHCreateWorkerWindowA() and SHCreateWorkerWindowW() x64-compatible.

Hermès BÉLUSCA - MAÏTO
[PATCH 2/2] shlwapi: Make SHCreateWorkerWindowA() and
SHCreateWorkerWindowW() x64-compatible.

The first parameter of these functions is a pointer to a window procedure,
having a definite prototype, so employ a correct typedef WNDPROC,
which ensures both correct pointer size and parameter type enforcement.
This also ensures that we use instead a correct pointer size, since
otherwise LONG remains 32-bits for Windows compatibility on x64 platforms.
The wndProc parameter is thus casted to LONG_PTR to comply with the
SetWindowLongPtrA/W calls.

In SHCreateWorkerWindowW(), the last "wnd_extra" parameter should also be
LONG_PTR to be able to pass 64-bit data pointer on x64 platforms.
Therefore fix also setting the wc.cbWndExtra size. One should note that the
ANSI SHCreateWorkerWindowA() function had everything OK already.


Best regards,
Hermès Bélusca-Maïto



0002-shlwapi-Make-SHCreateWorkerWindowA-and-SHCreateWorke.patch (4K) Download Attachment