https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c6058bca24938e660c261c...
commit c6058bca24938e660c261c53a5be2e9feff5c0b1 Author: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org AuthorDate: Sun Feb 23 16:44:30 2020 +0100 Commit: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org CommitDate: Sun Feb 23 16:52:03 2020 +0100
[ATL] Import Wine upstream patch https://github.com/wine-mirror/wine/commit/3043ab3e62772ddef8e4e27674bf4178e...
Author: Puetz Kevin A PuetzKevinA@JohnDeere.com atlbase.h: Fix some declarations on win64.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org --- dll/win32/atl/atl.c | 2 +- modules/rostests/winetests/atl/module.c | 25 ++++++++++++++----------- sdk/include/reactos/wine/atlbase.h | 8 ++++---- 3 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/dll/win32/atl/atl.c b/dll/win32/atl/atl.c index 6461d69fc33..2f93b89d5ec 100644 --- a/dll/win32/atl/atl.c +++ b/dll/win32/atl/atl.c @@ -217,7 +217,7 @@ HRESULT WINAPI AtlInternalQueryInterface(void* this, const _ATL_INTMAP_ENTRY* pE
while (pEntries[i].pFunc != 0) { - TRACE("Trying entry %i (%s %i %p)\n",i,debugstr_guid(pEntries[i].piid), + TRACE("Trying entry %i (%s %lx %p)\n",i,debugstr_guid(pEntries[i].piid), pEntries[i].dw, pEntries[i].pFunc);
if (!pEntries[i].piid || IsEqualGUID(iid,pEntries[i].piid)) diff --git a/modules/rostests/winetests/atl/module.c b/modules/rostests/winetests/atl/module.c index f176d070b3c..1c2a4963805 100644 --- a/modules/rostests/winetests/atl/module.c +++ b/modules/rostests/winetests/atl/module.c @@ -163,9 +163,9 @@ static void test_winclassinfo(void) ok(len == expectedLen, "wci.m_szAutoName has length %d, expected length %d\n", len, expectedLen); }
-static DWORD cb_val; +static DWORD_PTR cb_val;
-static void WINAPI term_callback(DWORD dw) +static void WINAPI term_callback(DWORD_PTR dw) { cb_val = dw; } @@ -173,33 +173,36 @@ static void WINAPI term_callback(DWORD dw) static void test_term(void) { _ATL_MODULEW test; + ULONG_PTR ex; HRESULT hres;
+ ex = (ULONG_PTR)-37; + test.cbSize = sizeof(_ATL_MODULEW);
hres = AtlModuleInit(&test, NULL, NULL); - ok (hres == S_OK, "AtlModuleInit failed (0x%x).\n", (int)hres); + ok (hres == S_OK, "AtlModuleInit failed (0x%x).\n", hres);
- hres = AtlModuleAddTermFunc(&test, term_callback, 0x22); - ok (hres == S_OK, "AtlModuleAddTermFunc failed (0x%x).\n", (int)hres); + hres = AtlModuleAddTermFunc(&test, term_callback, ex); + ok (hres == S_OK, "AtlModuleAddTermFunc failed (0x%x).\n", hres);
cb_val = 0xdeadbeef; hres = AtlModuleTerm(&test); - ok (hres == S_OK, "AtlModuleTerm failed (0x%x).\n", (int)hres); - ok (cb_val == 0x22, "wrong callback value (0x%x).\n", (int)cb_val); + ok (hres == S_OK, "AtlModuleTerm failed (0x%x).\n", hres); + ok (cb_val == ex, "wrong callback value (0x%lx).\n", cb_val);
test.cbSize = FIELD_OFFSET(_ATL_MODULEW, dwAtlBuildVer);
hres = AtlModuleInit(&test, NULL, NULL); - ok (hres == S_OK, "AtlModuleInit failed (0x%x).\n", (int)hres); + ok (hres == S_OK, "AtlModuleInit failed (0x%x).\n", hres);
hres = AtlModuleAddTermFunc(&test, term_callback, 0x23); - ok (hres == S_OK, "AtlModuleAddTermFunc failed (0x%x).\n", (int)hres); + ok (hres == S_OK, "AtlModuleAddTermFunc failed (0x%x).\n", hres);
cb_val = 0xdeadbeef; hres = AtlModuleTerm(&test); - ok (hres == S_OK, "AtlModuleTerm failed (0x%x).\n", (int)hres); - ok (cb_val == 0xdeadbeef, "wrong callback value (0x%x).\n", (int)cb_val); + ok (hres == S_OK, "AtlModuleTerm failed (0x%x).\n", hres); + ok (cb_val == 0xdeadbeef, "wrong callback value (0x%lx).\n", cb_val); }
START_TEST(module) diff --git a/sdk/include/reactos/wine/atlbase.h b/sdk/include/reactos/wine/atlbase.h index 1e0d76082fc..4d9fafc688d 100644 --- a/sdk/include/reactos/wine/atlbase.h +++ b/sdk/include/reactos/wine/atlbase.h @@ -37,12 +37,12 @@ #endif
typedef HRESULT (WINAPI _ATL_CREATORFUNC)(void* pv, REFIID riid, LPVOID* ppv); -typedef HRESULT (WINAPI _ATL_CREATORARGFUNC)(void* pv, REFIID riid, LPVOID* ppv, DWORD dw); -typedef HRESULT (WINAPI _ATL_MODULEFUNC)(DWORD dw); +typedef HRESULT (WINAPI _ATL_CREATORARGFUNC)(void* pv, REFIID riid, LPVOID* ppv, DWORD_PTR dw); +typedef HRESULT (WINAPI _ATL_MODULEFUNC)(DWORD_PTR dw); typedef LPCSTR (WINAPI _ATL_DESCRIPTIONFUNCA)(void); typedef LPCWSTR (WINAPI _ATL_DESCRIPTIONFUNCW)(void); typedef const struct _ATL_CATMAP_ENTRY* (_ATL_CATMAPFUNC)(void); -typedef void (WINAPI _ATL_TERMFUNC)(DWORD dw); +typedef void (WINAPI _ATL_TERMFUNC)(DWORD_PTR dw);
typedef CRITICAL_SECTION CComCriticalSection;
@@ -234,7 +234,7 @@ typedef _ATL_MODULEW _ATL_WIN_MODULE; typedef struct _ATL_INTMAP_ENTRY_TAG { const IID* piid; - DWORD dw; + DWORD_PTR dw; _ATL_CREATORARGFUNC* pFunc; } _ATL_INTMAP_ENTRY;