From hermes.belusca at sfr.fr Mon Feb 12 16:49:16 2018 From: hermes.belusca at sfr.fr (=?iso-8859-1?Q?Herm=E8s_B=C9LUSCA-MA=CFTO?=) Date: Mon, 12 Feb 2018 23:49:16 +0100 Subject: [PATCH 1/2] shlwapi: Refactor the SHCreateWorkerWindowW() prototype to match its ANSI SHCreateWorkerWindowA() counterpart. Message-ID: <000001d3a453$b62adea0$22809be0$@sfr.fr> [PATCH 1/2] shlwapi: Refactor the SHCreateWorkerWindowW() prototype to match its ANSI SHCreateWorkerWindowA() counterpart. The last parameter is really to be understood as an extra window data, and not a "message result" (as it would be the case for dialog window procedure). That is why I also remove the mention of "DWLP_MSGRESULT" in the SetWindowLongPtrW() call. SHCreateWorkerWindowA() had it OK but SHCreateWorkerWindowW() did not. Best, Hermès Bélusca-Maïto -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-shlwapi-Refactor-the-SHCreateWorkerWindowW-prototype.patch Type: application/octet-stream Size: 2349 bytes Desc: not available URL: From hermes.belusca at sfr.fr Mon Feb 12 16:50:38 2018 From: hermes.belusca at sfr.fr (=?iso-8859-1?Q?Herm=E8s_B=C9LUSCA-MA=CFTO?=) Date: Mon, 12 Feb 2018 23:50:38 +0100 Subject: [PATCH 2/2] shlwapi: Make SHCreateWorkerWindowA() and SHCreateWorkerWindowW() x64-compatible. Message-ID: <000a01d3a453$e6ff7ae0$b4fe70a0$@sfr.fr> [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 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-shlwapi-Make-SHCreateWorkerWindowA-and-SHCreateWorke.patch Type: application/octet-stream Size: 4494 bytes Desc: not available URL: