diff --git a/patches/libs-Unicode_Collation/0001-libs-Fix-most-problems-with-CompareString.patch b/patches/libs-Unicode_Collation/0001-libs-Fix-most-problems-with-CompareString.patch index b23cc86f..66adc11b 100644 --- a/patches/libs-Unicode_Collation/0001-libs-Fix-most-problems-with-CompareString.patch +++ b/patches/libs-Unicode_Collation/0001-libs-Fix-most-problems-with-CompareString.patch @@ -1,7 +1,7 @@ -From 5871f04dcacf0fc07ee027db46608ce09e79e0c9 Mon Sep 17 00:00:00 2001 +From 2b81cf8ae5a8be48f3548a3a598800f35ee5615f Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Mon, 28 Jul 2003 07:39:25 -0500 -Subject: libs: Fix most problems with CompareString. +Subject: [PATCH] libs: Fix most problems with CompareString. --- dlls/kernel32/tests/locale.c | 9 +++---- @@ -9,10 +9,10 @@ Subject: libs: Fix most problems with CompareString. 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c -index a99763d..3414334 100644 +index b9b36d8a132..95e6ee9ea45 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c -@@ -1963,13 +1963,13 @@ static void test_CompareStringA(void) +@@ -1965,13 +1965,13 @@ static void test_CompareStringA(void) todo_wine ok(ret != CSTR_EQUAL, "\\2 vs \\1 expected unequal\n"); ret = CompareStringA(lcid, NORM_IGNORECASE | LOCALE_USE_CP_ACP, "#", -1, ".", -1); @@ -29,16 +29,16 @@ index a99763d..3414334 100644 lcid = MAKELCID(MAKELANGID(LANG_POLISH, SUBLANG_DEFAULT), SORT_DEFAULT); -@@ -5518,6 +5518,5 @@ START_TEST(locale) - test_GetUserPreferredUILanguages(); +@@ -5702,6 +5702,5 @@ START_TEST(locale) test_FindNLSStringEx(); test_SetThreadUILanguage(); + test_NormalizeString(); - /* this requires collation table patch to make it MS compatible */ - if (0) test_sorting(); + test_sorting(); } diff --git a/libs/wine/collation.c b/libs/wine/collation.c -index 465d740..f354a75 100644 +index 465d740001b..f354a75f686 100644 --- a/libs/wine/collation.c +++ b/libs/wine/collation.c @@ -75,34 +75,34 @@ const unsigned int collation_table[12800] = @@ -168,5 +168,5 @@ index 465d740..f354a75 100644 0x0a130121, 0x0a140121, 0x02370121, 0x02350121, 0x03a30121, 0x03a40121, 0x03a50121, 0x024e0121, 0x02a10121, 0x0a150161, 0x0a290151, 0x0a3d0161, 0x0a490161, 0x0a650161, 0x0a910161, 0x0a990161, -- -2.7.4 +2.16.3 diff --git a/patches/msvcr110-__crtCapturePreviousContext/0001-msvcr110-Add-__crtCaptureCurrentContext-implementation.txt b/patches/msvcr110-__crtCapturePreviousContext/0001-msvcr110-Add-__crtCaptureCurrentContext-implementation.txt deleted file mode 100644 index 85d89191..00000000 --- a/patches/msvcr110-__crtCapturePreviousContext/0001-msvcr110-Add-__crtCaptureCurrentContext-implementation.txt +++ /dev/null @@ -1,54 +0,0 @@ -From d03c4fba17c177b3be775915ae77aa565a78187f Mon Sep 17 00:00:00 2001 -From: Piotr Caban -Date: Fri, 23 Mar 2018 20:57:12 +0100 -Subject: [PATCH 1/2] msvcr110: Add __crtCaptureCurrentContext implementation -To: wine-devel - ---- - dlls/msvcr110/msvcr110.spec | 2 +- - dlls/msvcr120/msvcr120.spec | 2 +- - dlls/msvcr120_app/msvcr120_app.spec | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec -index 27b3508e03..1a041614e2 100644 ---- a/dlls/msvcr110/msvcr110.spec -+++ b/dlls/msvcr110/msvcr110.spec -@@ -904,7 +904,7 @@ - @ cdecl __clean_type_info_names_internal(ptr) - @ cdecl -arch=i386 __control87_2(long long ptr ptr) - @ cdecl __create_locale(long str) MSVCRT__create_locale --@ stub -arch=win64 __crtCaptureCurrentContext -+@ cdecl -arch=win64 -norelay __crtCaptureCurrentContext(ptr) ntdll.RtlCaptureContext - @ stub -arch=win64 __crtCapturePreviousContext - @ cdecl __crtCompareStringA(long long str long str long) - @ stub -arch=i386,win64 __crtCompareStringEx -diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec -index 254040a4bf..f65669caac 100644 ---- a/dlls/msvcr120/msvcr120.spec -+++ b/dlls/msvcr120/msvcr120.spec -@@ -889,7 +889,7 @@ - @ cdecl __clean_type_info_names_internal(ptr) - @ cdecl -arch=i386 __control87_2(long long ptr ptr) - @ cdecl __create_locale(long str) MSVCRT__create_locale --@ stub -arch=win64 __crtCaptureCurrentContext -+@ cdecl -arch=win64 -norelay __crtCaptureCurrentContext(ptr) ntdll.RtlCaptureContext - @ stub -arch=win64 __crtCapturePreviousContext - @ cdecl __crtCompareStringA(long long str long str long) - @ stub -arch=i386,win64 __crtCompareStringEx -diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec -index 473905530e..0ba1780078 100644 ---- a/dlls/msvcr120_app/msvcr120_app.spec -+++ b/dlls/msvcr120_app/msvcr120_app.spec -@@ -883,7 +883,7 @@ - @ cdecl __clean_type_info_names_internal(ptr) msvcr120.__clean_type_info_names_internal - @ cdecl -arch=i386 __control87_2(long long ptr ptr) msvcr120.__control87_2 - @ cdecl __create_locale(long str) msvcr120.__create_locale --@ stub -arch=win64 __crtCaptureCurrentContext -+@ cdecl -arch=win64 -norelay __crtCaptureCurrentContext(ptr) msvcr120.__crtCaptureCurrentContext - @ stub -arch=win64 __crtCapturePreviousContext - @ stub __crtCloseWinRTThreadHandle - @ cdecl __crtCompareStringA(long long str long str long) msvcr120.__crtCompareStringA --- -2.16.1 - diff --git a/patches/msvcr110-__crtCapturePreviousContext/0002-msvcr110-Add-__crtCapturePreviousContext-implementatio.txt b/patches/msvcr110-__crtCapturePreviousContext/0002-msvcr110-Add-__crtCapturePreviousContext-implementatio.txt deleted file mode 100644 index 51277663..00000000 --- a/patches/msvcr110-__crtCapturePreviousContext/0002-msvcr110-Add-__crtCapturePreviousContext-implementatio.txt +++ /dev/null @@ -1,102 +0,0 @@ -From de4f0940ee3fe0770e214441aa9bb2e5efbd8658 Mon Sep 17 00:00:00 2001 -From: Piotr Caban -Date: Fri, 23 Mar 2018 21:05:45 +0100 -Subject: [PATCH 2/2] msvcr110: Add __crtCapturePreviousContext implementation -To: wine-devel - ---- - dlls/msvcr110/msvcr110.spec | 2 +- - dlls/msvcr120/msvcr120.spec | 2 +- - dlls/msvcr120_app/msvcr120_app.spec | 2 +- - dlls/msvcrt/except_x86_64.c | 38 +++++++++++++++++++++++++++++++++++++ - 4 files changed, 41 insertions(+), 3 deletions(-) - -diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec -index 1a041614e2..3572664443 100644 ---- a/dlls/msvcr110/msvcr110.spec -+++ b/dlls/msvcr110/msvcr110.spec -@@ -905,7 +905,7 @@ - @ cdecl -arch=i386 __control87_2(long long ptr ptr) - @ cdecl __create_locale(long str) MSVCRT__create_locale - @ cdecl -arch=win64 -norelay __crtCaptureCurrentContext(ptr) ntdll.RtlCaptureContext --@ stub -arch=win64 __crtCapturePreviousContext -+@ cdecl -arch=x86_64 -norelay __crtCapturePreviousContext(ptr) - @ cdecl __crtCompareStringA(long long str long str long) - @ stub -arch=i386,win64 __crtCompareStringEx - @ cdecl __crtCompareStringW(long long wstr long wstr long) -diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec -index f65669caac..9e0c3957b5 100644 ---- a/dlls/msvcr120/msvcr120.spec -+++ b/dlls/msvcr120/msvcr120.spec -@@ -890,7 +890,7 @@ - @ cdecl -arch=i386 __control87_2(long long ptr ptr) - @ cdecl __create_locale(long str) MSVCRT__create_locale - @ cdecl -arch=win64 -norelay __crtCaptureCurrentContext(ptr) ntdll.RtlCaptureContext --@ stub -arch=win64 __crtCapturePreviousContext -+@ cdecl -arch=x86_64 -norelay __crtCapturePreviousContext(ptr) - @ cdecl __crtCompareStringA(long long str long str long) - @ stub -arch=i386,win64 __crtCompareStringEx - @ cdecl __crtCompareStringW(long long wstr long wstr long) -diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec -index 0ba1780078..a732118849 100644 ---- a/dlls/msvcr120_app/msvcr120_app.spec -+++ b/dlls/msvcr120_app/msvcr120_app.spec -@@ -884,7 +884,7 @@ - @ cdecl -arch=i386 __control87_2(long long ptr ptr) msvcr120.__control87_2 - @ cdecl __create_locale(long str) msvcr120.__create_locale - @ cdecl -arch=win64 -norelay __crtCaptureCurrentContext(ptr) msvcr120.__crtCaptureCurrentContext --@ stub -arch=win64 __crtCapturePreviousContext -+@ cdecl -arch=x86_64 -norelay __crtCapturePreviousContext(ptr) msvcr120.__crtCapturePreviousContext - @ stub __crtCloseWinRTThreadHandle - @ cdecl __crtCompareStringA(long long str long str long) msvcr120.__crtCompareStringA - @ cdecl __crtCompareStringW(long long wstr long wstr long) msvcr120.__crtCompareStringW -diff --git a/dlls/msvcrt/except_x86_64.c b/dlls/msvcrt/except_x86_64.c -index 77c519dc50..9cd19398a8 100644 ---- a/dlls/msvcrt/except_x86_64.c -+++ b/dlls/msvcrt/except_x86_64.c -@@ -798,4 +798,42 @@ int __cdecl _fpieee_flt(ULONG exception_code, EXCEPTION_POINTERS *ep, - return EXCEPTION_CONTINUE_SEARCH; - } - -+#if _MSVCR_VER>=110 && _MSVCR_VER<=120 -+/********************************************************************* -+ * __crtCapturePreviousContext (MSVCR110.@) -+ */ -+void __cdecl get_prev_context(CONTEXT *ctx, DWORD64 rip) -+{ -+ ULONG64 frame, image_base; -+ RUNTIME_FUNCTION *rf; -+ void *data; -+ -+ TRACE("(%p)\n", ctx); -+ -+ ctx->Rip = rip; -+ ctx->Rsp += 3*8; /* Rip, Rcx, return address */ -+ -+ rf = RtlLookupFunctionEntry(ctx->Rip, &image_base, NULL); -+ if(!rf) { -+ FIXME("RtlLookupFunctionEntry failed\n"); -+ return; -+ } -+ -+ RtlVirtualUnwind(UNW_FLAG_NHANDLER, image_base, ctx->Rip, -+ rf, ctx, &data, &frame, NULL); -+} -+ -+__ASM_GLOBAL_FUNC( __crtCapturePreviousContext, -+ "pushq (%rsp)\n\t" /* save Rip */ -+ __ASM_CFI(".cfi_adjust_cfa_offset 8\n\t") -+ "pushq %rcx\n\t" -+ __ASM_CFI(".cfi_adjust_cfa_offset 8\n\t") -+ "call " __ASM_NAME("RtlCaptureContext") "\n\t" -+ "popq %rcx\n\t" -+ __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t") -+ "popq %rdx\n\t" -+ __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t") -+ "jmp " __ASM_NAME("get_prev_context") ); -+#endif -+ - #endif /* __x86_64__ */ --- -2.16.1 - diff --git a/patches/msvcr110-__crtCapturePreviousContext/definition b/patches/msvcr110-__crtCapturePreviousContext/definition deleted file mode 100644 index c3823b7d..00000000 --- a/patches/msvcr110-__crtCapturePreviousContext/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [43051] Implement __crtCapturePreviousContext and __crtCaptureCurrentContext diff --git a/patches/ole32-Implicit_MTA/0002-ole32-Add-a-helper-for-grabbing-the-current-apartmen.patch b/patches/ole32-Implicit_MTA/0002-ole32-Add-a-helper-for-grabbing-the-current-apartmen.patch deleted file mode 100644 index 1b5c4ee9..00000000 --- a/patches/ole32-Implicit_MTA/0002-ole32-Add-a-helper-for-grabbing-the-current-apartmen.patch +++ /dev/null @@ -1,105 +0,0 @@ -From e2f80faaee4be9b8c2477d6b6039a69c7a73403f Mon Sep 17 00:00:00 2001 -From: Zebediah Figura -Date: Wed, 28 Mar 2018 20:24:35 -0500 -Subject: [PATCH 2/7] ole32: Add a helper for grabbing the current apartment or - MTA. - -Signed-off-by: Zebediah Figura ---- - dlls/ole32/compobj.c | 48 +++++++++++++++++++++++++----------------------- - 1 file changed, 25 insertions(+), 23 deletions(-) - -diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c -index 1c7645b..a3b4598 100644 ---- a/dlls/ole32/compobj.c -+++ b/dlls/ole32/compobj.c -@@ -734,6 +734,19 @@ static APARTMENT *apartment_find_mta(void) - return apt; - } - -+/* Return the current apartment if it exists, or, failing that, the MTA. Caller -+ * must free the returned apartment in either case. */ -+static APARTMENT *apartment_get_current_or_mta(void) -+{ -+ APARTMENT *apt = COM_CurrentApt(); -+ if (apt) -+ { -+ apartment_addref(apt); -+ return apt; -+ } -+ return apartment_find_mta(); -+} -+ - static void COM_RevokeRegisteredClassObject(RegisteredClass *curClass) - { - list_remove(&curClass->entry); -@@ -2997,15 +3010,10 @@ HRESULT WINAPI DECLSPEC_HOTPATCH CoGetClassObject( - - *ppv = NULL; - -- if ((apt = COM_CurrentApt())) -- apartment_addref(apt); -- else -+ if (!(apt = apartment_get_current_or_mta())) - { -- if (!(apt = apartment_find_mta())) -- { -- ERR("apartment not initialised\n"); -- return CO_E_NOTINITIALIZED; -- } -+ ERR("apartment not initialised\n"); -+ return CO_E_NOTINITIALIZED; - } - - if (pServerInfo) { -@@ -3298,15 +3306,12 @@ HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstanceEx( - if(FAILED(hres)) - clsid = *rclsid; - -- if (!(apt = COM_CurrentApt())) -+ if (!(apt = apartment_get_current_or_mta())) - { -- if (!(apt = apartment_find_mta())) -- { -- ERR("apartment not initialised\n"); -- return CO_E_NOTINITIALIZED; -- } -- apartment_release(apt); -+ ERR("apartment not initialised\n"); -+ return CO_E_NOTINITIALIZED; - } -+ apartment_release(apt); - - /* - * The Standard Global Interface Table (GIT) object is a process-wide singleton. -@@ -4998,22 +5003,19 @@ HRESULT WINAPI CoGetObjectContext(REFIID riid, void **ppv) - HRESULT WINAPI CoGetContextToken( ULONG_PTR *token ) - { - struct oletls *info = COM_CurrentInfo(); -+ APARTMENT *apt; - - TRACE("(%p)\n", token); - - if (!info) - return E_OUTOFMEMORY; - -- if (!info->apt) -+ if (!(apt = apartment_get_current_or_mta())) - { -- APARTMENT *apt; -- if (!(apt = apartment_find_mta())) -- { -- ERR("apartment not initialised\n"); -- return CO_E_NOTINITIALIZED; -- } -- apartment_release(apt); -+ ERR("apartment not initialised\n"); -+ return CO_E_NOTINITIALIZED; - } -+ apartment_release(apt); - - if (!token) - return E_POINTER; --- -2.7.4 - diff --git a/patches/ole32-Implicit_MTA/0003-ole32-Allow-more-functions-to-use-the-implicit-MTA.patch b/patches/ole32-Implicit_MTA/0003-ole32-Allow-more-functions-to-use-the-implicit-MTA.patch deleted file mode 100644 index be9e1baa..00000000 --- a/patches/ole32-Implicit_MTA/0003-ole32-Allow-more-functions-to-use-the-implicit-MTA.patch +++ /dev/null @@ -1,225 +0,0 @@ -From 2f75a3115d6377d4c6a707990755354b80c948af Mon Sep 17 00:00:00 2001 -From: Zebediah Figura -Date: Wed, 28 Mar 2018 20:27:45 -0500 -Subject: [PATCH 3/7] ole32: Allow more functions to use the implicit MTA. - -Signed-off-by: Zebediah Figura ---- - dlls/ole32/compobj.c | 43 ++++++++++++++++++++++++++++++------------- - dlls/ole32/tests/compobj.c | 24 ++++++++++++++++++++++++ - 2 files changed, 54 insertions(+), 13 deletions(-) - -diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c -index a3b4598..ca91848 100644 ---- a/dlls/ole32/compobj.c -+++ b/dlls/ole32/compobj.c -@@ -1089,8 +1089,7 @@ HRESULT WINAPI DECLSPEC_HOTPATCH CoRevokeClassObject( - - TRACE("(%08x)\n",dwRegister); - -- apt = COM_CurrentApt(); -- if (!apt) -+ if (!(apt = apartment_get_current_or_mta())) - { - ERR("COM was not initialized\n"); - return CO_E_NOTINITIALIZED; -@@ -1121,7 +1120,7 @@ HRESULT WINAPI DECLSPEC_HOTPATCH CoRevokeClassObject( - } - - LeaveCriticalSection( &csRegisteredClassList ); -- -+ apartment_release(apt); - return hr; - } - -@@ -2072,9 +2071,11 @@ HRESULT WINAPI CoDisconnectObject( LPUNKNOWN lpUnk, DWORD reserved ) - return hr; - } - -- apt = COM_CurrentApt(); -- if (!apt) -+ if (!(apt = apartment_get_current_or_mta())) -+ { -+ ERR("apartment not initialised\n"); - return CO_E_NOTINITIALIZED; -+ } - - manager = get_stub_manager_from_object(apt, lpUnk, FALSE); - if (manager) { -@@ -2089,6 +2090,7 @@ HRESULT WINAPI CoDisconnectObject( LPUNKNOWN lpUnk, DWORD reserved ) - * not found, making apps think that the object was disconnected, when - * it actually wasn't */ - -+ apartment_release(apt); - return S_OK; - } - -@@ -2596,7 +2598,7 @@ HRESULT WINAPI CoGetPSClsid(REFIID riid, CLSID *pclsid) - static const WCHAR wszInterface[] = {'I','n','t','e','r','f','a','c','e','\\',0}; - static const WCHAR wszPSC[] = {'\\','P','r','o','x','y','S','t','u','b','C','l','s','i','d','3','2',0}; - WCHAR path[ARRAYSIZE(wszInterface) - 1 + CHARS_IN_GUID - 1 + ARRAYSIZE(wszPSC)]; -- APARTMENT *apt = COM_CurrentApt(); -+ APARTMENT *apt; - struct registered_psclsid *registered_psclsid; - ACTCTX_SECTION_KEYED_DATA data; - HRESULT hr; -@@ -2605,11 +2607,12 @@ HRESULT WINAPI CoGetPSClsid(REFIID riid, CLSID *pclsid) - - TRACE("() riid=%s, pclsid=%p\n", debugstr_guid(riid), pclsid); - -- if (!apt) -+ if (!(apt = apartment_get_current_or_mta())) - { - ERR("apartment not initialised\n"); - return CO_E_NOTINITIALIZED; - } -+ apartment_release(apt); - - if (!pclsid) - return E_INVALIDARG; -@@ -2680,16 +2683,17 @@ HRESULT WINAPI CoGetPSClsid(REFIID riid, CLSID *pclsid) - */ - HRESULT WINAPI CoRegisterPSClsid(REFIID riid, REFCLSID rclsid) - { -- APARTMENT *apt = COM_CurrentApt(); -+ APARTMENT *apt; - struct registered_psclsid *registered_psclsid; - - TRACE("(%s, %s)\n", debugstr_guid(riid), debugstr_guid(rclsid)); - -- if (!apt) -+ if (!(apt = apartment_get_current_or_mta())) - { - ERR("apartment not initialised\n"); - return CO_E_NOTINITIALIZED; - } -+ apartment_release(apt); - - EnterCriticalSection(&cs_registered_psclsid_list); - -@@ -2815,8 +2819,7 @@ HRESULT WINAPI CoRegisterClassObject( - if ( (lpdwRegister==0) || (pUnk==0) ) - return E_INVALIDARG; - -- apt = COM_CurrentApt(); -- if (!apt) -+ if (!(apt = apartment_get_current_or_mta())) - { - ERR("COM was not initialized\n"); - return CO_E_NOTINITIALIZED; -@@ -2839,16 +2842,21 @@ HRESULT WINAPI CoRegisterClassObject( - if (dwClsContext & CLSCTX_LOCAL_SERVER) - hr = CoLockObjectExternal(foundObject, TRUE, FALSE); - IUnknown_Release(foundObject); -+ apartment_release(apt); - return hr; - } - IUnknown_Release(foundObject); - ERR("object already registered for class %s\n", debugstr_guid(rclsid)); -+ apartment_release(apt); - return CO_E_OBJISREG; - } - - newClass = HeapAlloc(GetProcessHeap(), 0, sizeof(RegisteredClass)); - if ( newClass == NULL ) -+ { -+ apartment_release(apt); - return E_OUTOFMEMORY; -+ } - - newClass->classIdentifier = *rclsid; - newClass->apartment_id = apt->oxid; -@@ -2877,7 +2885,10 @@ HRESULT WINAPI CoRegisterClassObject( - - hr = get_local_server_stream(apt, &marshal_stream); - if(FAILED(hr)) -+ { -+ apartment_release(apt); - return hr; -+ } - - hr = RPC_StartLocalServer(&newClass->classIdentifier, - marshal_stream, -@@ -2885,6 +2896,7 @@ HRESULT WINAPI CoRegisterClassObject( - &newClass->RpcRegistration); - IStream_Release(marshal_stream); - } -+ apartment_release(apt); - return S_OK; - } - -@@ -3645,8 +3657,11 @@ HRESULT WINAPI CoLockObjectExternal( - TRACE("pUnk=%p, fLock=%s, fLastUnlockReleases=%s\n", - pUnk, fLock ? "TRUE" : "FALSE", fLastUnlockReleases ? "TRUE" : "FALSE"); - -- apt = COM_CurrentApt(); -- if (!apt) return CO_E_NOTINITIALIZED; -+ if (!(apt = apartment_get_current_or_mta())) -+ { -+ ERR("apartment not initialised\n"); -+ return CO_E_NOTINITIALIZED; -+ } - - stubmgr = get_stub_manager_from_object(apt, pUnk, fLock); - if (!stubmgr) -@@ -3655,6 +3670,7 @@ HRESULT WINAPI CoLockObjectExternal( - /* Note: native is pretty broken here because it just silently - * fails, without returning an appropriate error code, making apps - * think that the object was disconnected, when it actually wasn't */ -+ apartment_release(apt); - return S_OK; - } - -@@ -3664,6 +3680,7 @@ HRESULT WINAPI CoLockObjectExternal( - stub_manager_ext_release(stubmgr, 1, FALSE, fLastUnlockReleases); - - stub_manager_int_release(stubmgr); -+ apartment_release(apt); - return S_OK; - } - -diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c -index 0ce941b..ecfbac8 100644 ---- a/dlls/ole32/tests/compobj.c -+++ b/dlls/ole32/tests/compobj.c -@@ -3701,6 +3701,8 @@ static DWORD CALLBACK implicit_mta_proc(void *param) - IComThreadingInfo *threading_info; - ULONG_PTR token; - IUnknown *unk; -+ DWORD cookie; -+ CLSID clsid; - HRESULT hr; - - test_apt_type(APTTYPE_MTA, APTTYPEQUALIFIER_IMPLICIT_MTA, TRUE, TRUE); -@@ -3720,6 +3722,28 @@ static DWORD CALLBACK implicit_mta_proc(void *param) - hr = CoGetContextToken(&token); - ok_ole_success(hr, "CoGetContextToken"); - -+ hr = CoRegisterPSClsid(&IID_IWineTest, &CLSID_WineTestPSFactoryBuffer); -+ ok_ole_success(hr, "CoRegisterPSClsid"); -+ -+ hr = CoGetPSClsid(&IID_IClassFactory, &clsid); -+ ok_ole_success(hr, "CoGetPSClsid"); -+ -+ hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&Test_ClassFactory, -+ CLSCTX_INPROC_SERVER, REGCLS_SINGLEUSE, &cookie); -+ ok_ole_success(hr, "CoRegisterClassObject"); -+ -+ hr = CoRevokeClassObject(cookie); -+ ok_ole_success(hr, "CoRevokeClassObject"); -+ -+ hr = CoRegisterMessageFilter(NULL, NULL); -+ ok(hr == CO_E_NOT_SUPPORTED, "got %#x\n", hr); -+ -+ hr = CoLockObjectExternal((IUnknown *)&Test_Unknown, TRUE, TRUE); -+ ok_ole_success(hr, "CoLockObjectExternal"); -+ -+ hr = CoDisconnectObject((IUnknown *)&Test_Unknown, 0); -+ ok_ole_success(hr, "CoDisconnectObject"); -+ - return 0; - } - --- -2.7.4 - diff --git a/patches/ole32-Implicit_MTA/0004-ole32-Report-the-implicit-MTA-in-CoGetApartmentType.patch b/patches/ole32-Implicit_MTA/0004-ole32-Report-the-implicit-MTA-in-CoGetApartmentType.patch deleted file mode 100644 index 725aa013..00000000 --- a/patches/ole32-Implicit_MTA/0004-ole32-Report-the-implicit-MTA-in-CoGetApartmentType.patch +++ /dev/null @@ -1,119 +0,0 @@ -From 8a5c262f21cd3caedae8f83a471cd5491ba9dde2 Mon Sep 17 00:00:00 2001 -From: Zebediah Figura -Date: Fri, 23 Mar 2018 22:59:32 -0500 -Subject: [PATCH 4/7] ole32: Report the implicit MTA in CoGetApartmentType(). - -Signed-off-by: Zebediah Figura ---- - dlls/ole32/compobj.c | 10 +++++++++- - dlls/ole32/tests/compobj.c | 19 ++++++++----------- - 2 files changed, 17 insertions(+), 12 deletions(-) - -diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c -index ca91848..9cbfaee 100644 ---- a/dlls/ole32/compobj.c -+++ b/dlls/ole32/compobj.c -@@ -5108,8 +5108,9 @@ HRESULT Handler_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) - HRESULT WINAPI CoGetApartmentType(APTTYPE *type, APTTYPEQUALIFIER *qualifier) - { - struct oletls *info = COM_CurrentInfo(); -+ APARTMENT *apt; - -- FIXME("(%p, %p): semi-stub\n", type, qualifier); -+ TRACE("(%p, %p)\n", type, qualifier); - - if (!type || !qualifier) - return E_INVALIDARG; -@@ -5128,6 +5129,13 @@ HRESULT WINAPI CoGetApartmentType(APTTYPE *type, APTTYPEQUALIFIER *qualifier) - - *qualifier = APTTYPEQUALIFIER_NONE; - -+ if (!info->apt && (apt = apartment_find_mta())) -+ { -+ apartment_release(apt); -+ *type = APTTYPE_MTA; -+ *qualifier = APTTYPEQUALIFIER_IMPLICIT_MTA; -+ } -+ - return info->apt ? S_OK : CO_E_NOTINITIALIZED; - } - -diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c -index ecfbac8..b9b7be0 100644 ---- a/dlls/ole32/tests/compobj.c -+++ b/dlls/ole32/tests/compobj.c -@@ -602,9 +602,8 @@ static void test_StringFromGUID2(void) - ok(len == 0, "len: %d (expected 0)\n", len); - } - --#define test_apt_type(t, q, t_t, t_q) _test_apt_type(t, q, t_t, t_q, __LINE__) --static void _test_apt_type(APTTYPE expected_type, APTTYPEQUALIFIER expected_qualifier, BOOL todo_type, -- BOOL todo_qualifier, int line) -+#define test_apt_type(t, q) _test_apt_type(t, q, __LINE__) -+static void _test_apt_type(APTTYPE expected_type, APTTYPEQUALIFIER expected_qualifier, int line) - { - APTTYPEQUALIFIER qualifier = ~0u; - APTTYPE type = ~0u; -@@ -615,9 +614,7 @@ static void _test_apt_type(APTTYPE expected_type, APTTYPEQUALIFIER expected_qual - - hr = pCoGetApartmentType(&type, &qualifier); - ok_(__FILE__, line)(hr == S_OK || hr == CO_E_NOTINITIALIZED, "Unexpected return code: 0x%08x\n", hr); --todo_wine_if(todo_type) - ok_(__FILE__, line)(type == expected_type, "Wrong apartment type %d, expected %d\n", type, expected_type); --todo_wine_if(todo_qualifier) - ok_(__FILE__, line)(qualifier == expected_qualifier, "Wrong apartment qualifier %d, expected %d\n", qualifier, - expected_qualifier); - } -@@ -660,7 +657,7 @@ static void test_CoCreateInstance(void) - hr = CoCreateInstance(rclsid, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&pUnk); - ok(hr == CO_E_NOTINITIALIZED, "CoCreateInstance should have returned CO_E_NOTINITIALIZED instead of 0x%08x\n", hr); - -- test_apt_type(APTTYPE_CURRENT, APTTYPEQUALIFIER_NONE, FALSE, FALSE); -+ test_apt_type(APTTYPE_CURRENT, APTTYPEQUALIFIER_NONE); - } - - static void test_CoGetClassObject(void) -@@ -682,7 +679,7 @@ static void test_CoGetClassObject(void) - broken(hr == CO_E_NOTINITIALIZED), /* win9x */ - "CoGetClassObject should have returned E_INVALIDARG instead of 0x%08x\n", hr); - -- test_apt_type(APTTYPE_CURRENT, APTTYPEQUALIFIER_NONE, FALSE, FALSE); -+ test_apt_type(APTTYPE_CURRENT, APTTYPEQUALIFIER_NONE); - - if (!pRegOverridePredefKey) - { -@@ -1797,7 +1794,7 @@ static void test_CoGetObjectContext(void) - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - -- test_apt_type(APTTYPE_MAINSTA, APTTYPEQUALIFIER_NONE, FALSE, FALSE); -+ test_apt_type(APTTYPE_MAINSTA, APTTYPEQUALIFIER_NONE); - - hr = pCoGetObjectContext(&IID_IComThreadingInfo, (void **)&pComThreadingInfo); - ok_ole_success(hr, "CoGetObjectContext"); -@@ -1993,11 +1990,11 @@ static void test_CoGetContextToken(void) - ok(hr == CO_E_NOTINITIALIZED, "Expected CO_E_NOTINITIALIZED, got 0x%08x\n", hr); - ok(token == 0xdeadbeef, "Expected 0, got 0x%lx\n", token); - -- test_apt_type(APTTYPE_CURRENT, APTTYPEQUALIFIER_NONE, FALSE, FALSE); -+ test_apt_type(APTTYPE_CURRENT, APTTYPEQUALIFIER_NONE); - - CoInitialize(NULL); - -- test_apt_type(APTTYPE_MAINSTA, APTTYPEQUALIFIER_NONE, FALSE, FALSE); -+ test_apt_type(APTTYPE_MAINSTA, APTTYPEQUALIFIER_NONE); - - hr = pCoGetContextToken(NULL); - ok(hr == E_POINTER, "Expected E_POINTER, got 0x%08x\n", hr); -@@ -3705,7 +3702,7 @@ static DWORD CALLBACK implicit_mta_proc(void *param) - CLSID clsid; - HRESULT hr; - -- test_apt_type(APTTYPE_MTA, APTTYPEQUALIFIER_IMPLICIT_MTA, TRUE, TRUE); -+ test_apt_type(APTTYPE_MTA, APTTYPEQUALIFIER_IMPLICIT_MTA); - - hr = CoCreateInstance(&CLSID_InternetZoneManager, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok_ole_success(hr, "CoCreateInstance"); --- -2.7.4 - diff --git a/patches/ole32-Implicit_MTA/0005-ole32-tests-Test-CoWaitForMultipleHandles-in-an-unin.patch b/patches/ole32-Implicit_MTA/0005-ole32-tests-Test-CoWaitForMultipleHandles-in-an-unin.patch deleted file mode 100644 index 985ff3fc..00000000 --- a/patches/ole32-Implicit_MTA/0005-ole32-tests-Test-CoWaitForMultipleHandles-in-an-unin.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 52ec26e3aaeeada37c42f78ba5f01df49464147d Mon Sep 17 00:00:00 2001 -From: Zebediah Figura -Date: Sat, 24 Mar 2018 08:34:52 -0500 -Subject: [PATCH 5/7] ole32/tests: Test CoWaitForMultipleHandles() in an - uninitialized or MTA apartment. - -Signed-off-by: Zebediah Figura ---- - dlls/ole32/tests/compobj.c | 26 ++++++++++++++++++++++++-- - 1 file changed, 24 insertions(+), 2 deletions(-) - -diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c -index b9b7be0..c43e86c 100644 ---- a/dlls/ole32/tests/compobj.c -+++ b/dlls/ole32/tests/compobj.c -@@ -2998,14 +2998,36 @@ static void test_CoWaitForMultipleHandles(void) - ok(index == WAIT_OBJECT_0, "WaitForSingleObject failed\n"); - CloseHandle(thread); - -+ CoUninitialize(); -+ -+ /* If COM was not initialized, messages are neither pumped nor peeked at */ -+ PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); -+ hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index); -+ ok(hr == RPC_S_CALLPENDING, "got %#x\n", hr); -+ success = MsgWaitForMultipleObjectsEx(0, NULL, 2, QS_ALLPOSTMESSAGE, MWMO_ALERTABLE); -+ ok(success == 0, "MsgWaitForMultipleObjects returned %x\n", success); -+ success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); -+ ok(success, "PeekMessage failed: %u\n", GetLastError()); -+ -+ /* same in an MTA */ -+ CoInitializeEx(NULL, COINIT_MULTITHREADED); -+ -+ PostMessageA(hWnd, WM_DDE_FIRST, 0, 0); -+ hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index); -+ ok(hr == RPC_S_CALLPENDING, "got %#x\n", hr); -+ success = MsgWaitForMultipleObjectsEx(0, NULL, 2, QS_ALLPOSTMESSAGE, MWMO_ALERTABLE); -+ ok(success == 0, "MsgWaitForMultipleObjects returned %x\n", success); -+ success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE); -+ ok(success, "PeekMessage failed: %u\n", GetLastError()); -+ -+ CoUninitialize(); -+ - CloseHandle(handles[0]); - CloseHandle(handles[1]); - DestroyWindow(hWnd); - - success = UnregisterClassA(cls_name, GetModuleHandleA(0)); - ok(success, "UnregisterClass failed %u\n", GetLastError()); -- -- CoUninitialize(); - } - - static void test_CoGetMalloc(void) --- -2.7.4 - diff --git a/patches/ole32-Implicit_MTA/0006-ole32-Allow-unmarshalling-objects-into-an-implicit-M.patch b/patches/ole32-Implicit_MTA/0006-ole32-Allow-unmarshalling-objects-into-an-implicit-M.patch deleted file mode 100644 index 4686241d..00000000 --- a/patches/ole32-Implicit_MTA/0006-ole32-Allow-unmarshalling-objects-into-an-implicit-M.patch +++ /dev/null @@ -1,365 +0,0 @@ -From e3eb56f31aab40fcf5c20afa0d712cc77373e989 Mon Sep 17 00:00:00 2001 -From: Zebediah Figura -Date: Sat, 24 Mar 2018 22:14:43 -0500 -Subject: [PATCH 6/7] ole32: Allow unmarshalling objects into an implicit MTA. - -Signed-off-by: Zebediah Figura ---- - dlls/ole32/compobj.c | 2 +- - dlls/ole32/compobj_private.h | 3 +- - dlls/ole32/marshal.c | 32 ++++++++---- - dlls/ole32/rpc.c | 12 +++-- - dlls/ole32/tests/marshal.c | 114 +++++++++++++++++++++++++++++++++++++++++++ - 5 files changed, 148 insertions(+), 15 deletions(-) - -diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c -index 9cbfaee..fd5cbde 100644 ---- a/dlls/ole32/compobj.c -+++ b/dlls/ole32/compobj.c -@@ -736,7 +736,7 @@ static APARTMENT *apartment_find_mta(void) - - /* Return the current apartment if it exists, or, failing that, the MTA. Caller - * must free the returned apartment in either case. */ --static APARTMENT *apartment_get_current_or_mta(void) -+APARTMENT *apartment_get_current_or_mta(void) - { - APARTMENT *apt = COM_CurrentApt(); - if (apt) -diff --git a/dlls/ole32/compobj_private.h b/dlls/ole32/compobj_private.h -index 12413f7..dc09d20 100644 ---- a/dlls/ole32/compobj_private.h -+++ b/dlls/ole32/compobj_private.h -@@ -212,7 +212,7 @@ void RPC_StartRemoting(struct apartment *apt) DECLSPEC_HIDDEN; - HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid, - const OXID_INFO *oxid_info, - DWORD dest_context, void *dest_context_data, -- IRpcChannelBuffer **chan) DECLSPEC_HIDDEN; -+ IRpcChannelBuffer **chan, APARTMENT *apt) DECLSPEC_HIDDEN; - HRESULT RPC_CreateServerChannel(DWORD dest_context, void *dest_context_data, IRpcChannelBuffer **chan) DECLSPEC_HIDDEN; - void RPC_ExecuteCall(struct dispatch_params *params) DECLSPEC_HIDDEN; - HRESULT RPC_RegisterInterface(REFIID riid) DECLSPEC_HIDDEN; -@@ -248,6 +248,7 @@ HRESULT apartment_createwindowifneeded(struct apartment *apt) DECLSPEC_HIDDEN; - HWND apartment_getwindow(const struct apartment *apt) DECLSPEC_HIDDEN; - HRESULT enter_apartment(struct oletls *info, DWORD model) DECLSPEC_HIDDEN; - void leave_apartment(struct oletls *info) DECLSPEC_HIDDEN; -+APARTMENT *apartment_get_current_or_mta(void) DECLSPEC_HIDDEN; - - /* DCOM messages used by the apartment window (not compatible with native) */ - #define DM_EXECUTERPC (WM_USER + 0) /* WPARAM = 0, LPARAM = (struct dispatch_params *) */ -diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c -index b39dac0..822d06e 100644 ---- a/dlls/ole32/marshal.c -+++ b/dlls/ole32/marshal.c -@@ -313,13 +313,15 @@ static HRESULT WINAPI ClientIdentity_QueryMultipleInterfaces(IMultiQI *iface, UL - * the interfaces were returned */ - if (SUCCEEDED(hr)) - { -+ APARTMENT *apt = apartment_get_current_or_mta(); -+ - /* try to unmarshal each object returned to us */ - for (i = 0; i < nonlocal_mqis; i++) - { - ULONG index = mapping[i]; - HRESULT hrobj = qiresults[i].hResult; - if (hrobj == S_OK) -- hrobj = unmarshal_object(&qiresults[i].std, COM_CurrentApt(), -+ hrobj = unmarshal_object(&qiresults[i].std, apt, - This->dest_context, - This->dest_context_data, - pMQIs[index].pIID, &This->oxid_info, -@@ -331,6 +333,8 @@ static HRESULT WINAPI ClientIdentity_QueryMultipleInterfaces(IMultiQI *iface, UL - ERR("Failed to get pointer to interface %s\n", debugstr_guid(pMQIs[index].pIID)); - pMQIs[index].hr = hrobj; - } -+ -+ apartment_release(apt); - } - - /* free the memory allocated by the proxy */ -@@ -1010,8 +1014,7 @@ static HRESULT proxy_manager_get_remunknown(struct proxy_manager * This, IRemUnk - if (This->sorflags & SORFP_NOLIFETIMEMGMT) - return S_FALSE; - -- apt = COM_CurrentApt(); -- if (!apt) -+ if (!(apt = apartment_get_current_or_mta())) - return CO_E_NOTINITIALIZED; - - called_in_original_apt = This->parent && (This->parent->oxid == apt->oxid); -@@ -1046,7 +1049,7 @@ static HRESULT proxy_manager_get_remunknown(struct proxy_manager * This, IRemUnk - stdobjref.ipid = This->oxid_info.ipidRemUnknown; - - /* do the unmarshal */ -- hr = unmarshal_object(&stdobjref, COM_CurrentApt(), This->dest_context, -+ hr = unmarshal_object(&stdobjref, apt, This->dest_context, - This->dest_context_data, &IID_IRemUnknown, - &This->oxid_info, (void**)remunk); - if (hr == S_OK && called_in_original_apt) -@@ -1056,6 +1059,7 @@ static HRESULT proxy_manager_get_remunknown(struct proxy_manager * This, IRemUnk - } - } - LeaveCriticalSection(&This->cs); -+ apartment_release(apt); - - TRACE("got IRemUnknown* pointer %p, hr = 0x%08x\n", *remunk, hr); - -@@ -1288,7 +1292,7 @@ static HRESULT unmarshal_object(const STDOBJREF *stdobjref, APARTMENT *apt, - &proxy_manager->oxid_info, - proxy_manager->dest_context, - proxy_manager->dest_context_data, -- &chanbuf); -+ &chanbuf, apt); - if (hr == S_OK) - hr = proxy_manager_create_ifproxy(proxy_manager, stdobjref, - riid, chanbuf, &ifproxy); -@@ -1324,14 +1328,14 @@ StdMarshalImpl_UnmarshalInterface(IMarshal *iface, IStream *pStm, REFIID riid, v - STDOBJREF stdobjref; - ULONG res; - HRESULT hres; -- APARTMENT *apt = COM_CurrentApt(); -+ APARTMENT *apt; - APARTMENT *stub_apt; - OXID oxid; - - TRACE("(...,%s,....)\n", debugstr_guid(riid)); - - /* we need an apartment to unmarshal into */ -- if (!apt) -+ if (!(apt = apartment_get_current_or_mta())) - { - ERR("Apartment not initialized\n"); - return CO_E_NOTINITIALIZED; -@@ -1339,10 +1343,18 @@ StdMarshalImpl_UnmarshalInterface(IMarshal *iface, IStream *pStm, REFIID riid, v - - /* read STDOBJREF from wire */ - hres = IStream_Read(pStm, &stdobjref, sizeof(stdobjref), &res); -- if (hres != S_OK) return STG_E_READFAULT; -+ if (hres != S_OK) -+ { -+ apartment_release(apt); -+ return STG_E_READFAULT; -+ } - - hres = apartment_getoxid(apt, &oxid); -- if (hres != S_OK) return hres; -+ if (hres != S_OK) -+ { -+ apartment_release(apt); -+ return hres; -+ } - - /* check if we're marshalling back to ourselves */ - if ((oxid == stdobjref.oxid) && (stubmgr = get_stub_manager(apt, stdobjref.oid))) -@@ -1357,6 +1369,7 @@ StdMarshalImpl_UnmarshalInterface(IMarshal *iface, IStream *pStm, REFIID riid, v - stub_manager_ext_release(stubmgr, stdobjref.cPublicRefs, stdobjref.flags & SORFP_TABLEWEAK, FALSE); - - stub_manager_int_release(stubmgr); -+ apartment_release(apt); - return hres; - } - -@@ -1395,6 +1408,7 @@ StdMarshalImpl_UnmarshalInterface(IMarshal *iface, IStream *pStm, REFIID riid, v - if (hres != S_OK) WARN("Failed with error 0x%08x\n", hres); - else TRACE("Successfully created proxy %p\n", *ppv); - -+ apartment_release(apt); - return hres; - } - -diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c -index 8d8276e..5a7626b 100644 ---- a/dlls/ole32/rpc.c -+++ b/dlls/ole32/rpc.c -@@ -830,14 +830,16 @@ static HRESULT WINAPI ClientRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac - ORPC_EXTENT_ARRAY orpc_ext_array; - WIRE_ORPC_EXTENT *first_wire_orpc_extent = NULL; - HRESULT hrFault = S_OK; -+ APARTMENT *apt = apartment_get_current_or_mta(); - - TRACE("(%p) iMethod=%d\n", olemsg, olemsg->iMethod); - -- hr = ClientRpcChannelBuffer_IsCorrectApartment(This, COM_CurrentApt()); -+ hr = ClientRpcChannelBuffer_IsCorrectApartment(This, apt); - if (hr != S_OK) - { - ERR("called from wrong apartment, should have been 0x%s\n", - wine_dbgstr_longlong(This->oxid)); -+ if (apt) apartment_release(apt); - return RPC_E_WRONG_THREAD; - } - /* This situation should be impossible in multi-threaded apartments, -@@ -845,11 +847,12 @@ static HRESULT WINAPI ClientRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac - * Note: doing a COM call during the processing of a sent message is - * only disallowed if a client call is already being waited for - * completion */ -- if (!COM_CurrentApt()->multi_threaded && -+ if (!apt->multi_threaded && - COM_CurrentInfo()->pending_call_count_client && - InSendMessage()) - { - ERR("can't make an outgoing COM call in response to a sent message\n"); -+ apartment_release(apt); - return RPC_E_CANTCALLOUT_ININPUTSYNCCALL; - } - -@@ -967,6 +970,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac - - TRACE("-- 0x%08x\n", hr); - -+ apartment_release(apt); - return hr; - } - -@@ -1094,7 +1098,7 @@ static const IRpcChannelBufferVtbl ServerRpcChannelBufferVtbl = - HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid, - const OXID_INFO *oxid_info, - DWORD dest_context, void *dest_context_data, -- IRpcChannelBuffer **chan) -+ IRpcChannelBuffer **chan, APARTMENT *apt) - { - ClientRpcChannelBuffer *This; - WCHAR endpoint[200]; -@@ -1148,7 +1152,7 @@ HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid, - This->super.dest_context = dest_context; - This->super.dest_context_data = dest_context_data; - This->bind = bind; -- apartment_getoxid(COM_CurrentApt(), &This->oxid); -+ apartment_getoxid(apt, &This->oxid); - This->server_pid = oxid_info->dwPid; - This->event = NULL; - -diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c -index 12c46e9..c5c69f0 100644 ---- a/dlls/ole32/tests/marshal.c -+++ b/dlls/ole32/tests/marshal.c -@@ -3419,6 +3419,119 @@ static void test_manualresetevent(void) - ok(!ref, "Got nonzero ref: %d\n", ref); - } - -+static DWORD CALLBACK implicit_mta_unmarshal_proc(void *param) -+{ -+ IStream *stream = param; -+ IClassFactory *cf; -+ IUnknown *proxy; -+ HRESULT hr; -+ -+ IStream_Seek(stream, ullZero, STREAM_SEEK_SET, NULL); -+ hr = CoUnmarshalInterface(stream, &IID_IClassFactory, (void **)&cf); -+ ok_ole_success(hr, CoUnmarshalInterface); -+ -+ hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (void **)&proxy); -+ ok_ole_success(hr, IClassFactory_CreateInstance); -+ -+ IUnknown_Release(proxy); -+ -+ /* But if we initialize an STA in this apartment, it becomes the wrong one. */ -+ CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); -+ -+ hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (void **)&proxy); -+ ok(hr == RPC_E_WRONG_THREAD, "got %#x\n", hr); -+ -+ CoUninitialize(); -+ -+ ok_more_than_one_lock(); -+ ok_non_zero_external_conn(); -+ -+ IClassFactory_Release(cf); -+ -+ ok_no_locks(); -+ ok_zero_external_conn(); -+ ok_last_release_closes(TRUE); -+ return 0; -+} -+ -+static DWORD CALLBACK implicit_mta_use_proc(void *param) -+{ -+ IClassFactory *cf = param; -+ IUnknown *proxy; -+ HRESULT hr; -+ -+ hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (void **)&proxy); -+ ok_ole_success(hr, IClassFactory_CreateInstance); -+ -+ IUnknown_Release(proxy); -+ -+ /* But if we initialize an STA in this apartment, it becomes the wrong one. */ -+ CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); -+ -+ hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (void **)&proxy); -+ ok(hr == RPC_E_WRONG_THREAD, "got %#x\n", hr); -+ -+ CoUninitialize(); -+ return 0; -+} -+ -+static void test_implicit_mta(void) -+{ -+ HANDLE host_thread, thread; -+ IClassFactory *cf; -+ IStream *stream; -+ HRESULT hr; -+ DWORD tid; -+ -+ cLocks = 0; -+ external_connections = 0; -+ -+ CoInitializeEx(NULL, COINIT_MULTITHREADED); -+ -+ /* Firstly: we can unmarshal and use an object while in the implicit MTA. */ -+ hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); -+ ok_ole_success(hr, CreateStreamOnHGlobal); -+ tid = start_host_object(stream, &IID_IClassFactory, (IUnknown *)&Test_ClassFactory, MSHLFLAGS_NORMAL, &host_thread); -+ -+ ok_more_than_one_lock(); -+ ok_non_zero_external_conn(); -+ -+ thread = CreateThread(NULL, 0, implicit_mta_unmarshal_proc, stream, 0, NULL); -+ ok(!WaitForSingleObject(thread, 1000), "wait failed\n"); -+ CloseHandle(thread); -+ -+ IStream_Release(stream); -+ end_host_object(tid, host_thread); -+ -+ /* Secondly: we can unmarshal an object into the real MTA and then use it -+ * from the implicit MTA. */ -+ hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); -+ ok_ole_success(hr, CreateStreamOnHGlobal); -+ tid = start_host_object(stream, &IID_IClassFactory, (IUnknown *)&Test_ClassFactory, MSHLFLAGS_NORMAL, &host_thread); -+ -+ ok_more_than_one_lock(); -+ ok_non_zero_external_conn(); -+ -+ IStream_Seek(stream, ullZero, STREAM_SEEK_SET, NULL); -+ hr = CoUnmarshalInterface(stream, &IID_IClassFactory, (void **)&cf); -+ ok_ole_success(hr, CoUnmarshalInterface); -+ -+ thread = CreateThread(NULL, 0, implicit_mta_use_proc, cf, 0, NULL); -+ ok(!WaitForSingleObject(thread, 1000), "wait failed\n"); -+ CloseHandle(thread); -+ -+ IClassFactory_Release(cf); -+ IStream_Release(stream); -+ -+ ok_no_locks(); -+ ok_non_zero_external_conn(); -+ ok_last_release_closes(TRUE); -+ -+ end_host_object(tid, host_thread); -+ -+ CoUninitialize(); -+} -+ - static const char *debugstr_iid(REFIID riid) - { - static char name[256]; -@@ -3765,6 +3878,7 @@ START_TEST(marshal) - register_test_window(); - - test_cocreateinstance_proxy(); -+ test_implicit_mta(); - - pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - --- -2.7.4 - diff --git a/patches/ole32-Implicit_MTA/0007-ole32-Allow-marshalling-objects-from-an-implicit-MTA.patch b/patches/ole32-Implicit_MTA/0007-ole32-Allow-marshalling-objects-from-an-implicit-MTA.patch deleted file mode 100644 index 61f0cae8..00000000 --- a/patches/ole32-Implicit_MTA/0007-ole32-Allow-marshalling-objects-from-an-implicit-MTA.patch +++ /dev/null @@ -1,158 +0,0 @@ -From f10ef429a65d47df792d67d5c54248eac1921a41 Mon Sep 17 00:00:00 2001 -From: Zebediah Figura -Date: Sat, 24 Mar 2018 22:44:56 -0500 -Subject: [PATCH 7/7] ole32: Allow marshalling objects from an implicit MTA. - -Signed-off-by: Zebediah Figura ---- - dlls/ole32/compobj_private.h | 2 +- - dlls/ole32/marshal.c | 5 +++-- - dlls/ole32/rpc.c | 2 +- - dlls/ole32/stubmanager.c | 3 +-- - dlls/ole32/tests/marshal.c | 50 ++++++++++++++++++++++++++++++++++++++++++++ - 5 files changed, 56 insertions(+), 6 deletions(-) - -diff --git a/dlls/ole32/compobj_private.h b/dlls/ole32/compobj_private.h -index dc09d20..212d328 100644 ---- a/dlls/ole32/compobj_private.h -+++ b/dlls/ole32/compobj_private.h -@@ -200,7 +200,7 @@ void stub_manager_release_marshal_data(struct stub_manager *m, ULONG refs, const - void stub_manager_disconnect(struct stub_manager *m) DECLSPEC_HIDDEN; - HRESULT ipid_get_dispatch_params(const IPID *ipid, APARTMENT **stub_apt, struct stub_manager **manager, IRpcStubBuffer **stub, - IRpcChannelBuffer **chan, IID *iid, IUnknown **iface) DECLSPEC_HIDDEN; --HRESULT start_apartment_remote_unknown(void) DECLSPEC_HIDDEN; -+HRESULT start_apartment_remote_unknown(APARTMENT *apt) DECLSPEC_HIDDEN; - - HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnknown *obj, DWORD dest_context, void *dest_context_data, MSHLFLAGS mshlflags) DECLSPEC_HIDDEN; - -diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c -index 822d06e..7c0f541 100644 ---- a/dlls/ole32/marshal.c -+++ b/dlls/ole32/marshal.c -@@ -1225,11 +1225,11 @@ StdMarshalImpl_MarshalInterface( - STDOBJREF stdobjref; - ULONG res; - HRESULT hres; -- APARTMENT *apt = COM_CurrentApt(); -+ APARTMENT *apt; - - TRACE("(...,%s,...)\n", debugstr_guid(riid)); - -- if (!apt) -+ if (!(apt = apartment_get_current_or_mta())) - { - ERR("Apartment not initialized\n"); - return CO_E_NOTINITIALIZED; -@@ -1239,6 +1239,7 @@ StdMarshalImpl_MarshalInterface( - RPC_StartRemoting(apt); - - hres = marshal_object(apt, &stdobjref, riid, pv, dest_context, dest_context_data, mshlflags); -+ apartment_release(apt); - if (hres != S_OK) - { - ERR("Failed to create ifstub, hres=0x%x\n", hres); -diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c -index 5a7626b..a73d23c 100644 ---- a/dlls/ole32/rpc.c -+++ b/dlls/ole32/rpc.c -@@ -1648,7 +1648,7 @@ void RPC_StartRemoting(struct apartment *apt) - - /* FIXME: move remote unknown exporting into this function */ - } -- start_apartment_remote_unknown(); -+ start_apartment_remote_unknown(apt); - } - - -diff --git a/dlls/ole32/stubmanager.c b/dlls/ole32/stubmanager.c -index 57048c6..75c4b04 100644 ---- a/dlls/ole32/stubmanager.c -+++ b/dlls/ole32/stubmanager.c -@@ -812,11 +812,10 @@ static const IRemUnknownVtbl RemUnknown_Vtbl = - }; - - /* starts the IRemUnknown listener for the current apartment */ --HRESULT start_apartment_remote_unknown(void) -+HRESULT start_apartment_remote_unknown(APARTMENT *apt) - { - IRemUnknown *pRemUnknown; - HRESULT hr = S_OK; -- APARTMENT *apt = COM_CurrentApt(); - - EnterCriticalSection(&apt->cs); - if (!apt->remunk_exported) -diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c -index c5c69f0..e8558dd 100644 ---- a/dlls/ole32/tests/marshal.c -+++ b/dlls/ole32/tests/marshal.c -@@ -3475,10 +3475,34 @@ static DWORD CALLBACK implicit_mta_use_proc(void *param) - return 0; - } - -+struct implicit_mta_marshal_data -+{ -+ IStream *stream; -+ HANDLE start; -+ HANDLE stop; -+}; -+ -+static DWORD CALLBACK implicit_mta_marshal_proc(void *param) -+{ -+ struct implicit_mta_marshal_data *data = param; -+ HRESULT hr; -+ -+ hr = CoMarshalInterface(data->stream, &IID_IClassFactory, -+ (IUnknown *)&Test_ClassFactory, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); -+ ok_ole_success(hr, CoMarshalInterface); -+ -+ SetEvent(data->start); -+ -+ ok(!WaitForSingleObject(data->stop, 1000), "wait failed\n"); -+ return 0; -+} -+ - static void test_implicit_mta(void) - { -+ struct implicit_mta_marshal_data data; - HANDLE host_thread, thread; - IClassFactory *cf; -+ IUnknown *proxy; - IStream *stream; - HRESULT hr; - DWORD tid; -@@ -3529,6 +3553,32 @@ static void test_implicit_mta(void) - - end_host_object(tid, host_thread); - -+ /* Thirdly: we can marshal an object from the implicit MTA and then -+ * unmarshal it into the real one. */ -+ data.start = CreateEventA(NULL, FALSE, FALSE, NULL); -+ data.stop = CreateEventA(NULL, FALSE, FALSE, NULL); -+ -+ hr = CreateStreamOnHGlobal(NULL, TRUE, &data.stream); -+ ok_ole_success(hr, CreateStreamOnHGlobal); -+ -+ thread = CreateThread(NULL, 0, implicit_mta_marshal_proc, &data, 0, NULL); -+ ok(!WaitForSingleObject(data.start, 1000), "wait failed\n"); -+ -+ IStream_Seek(data.stream, ullZero, STREAM_SEEK_SET, NULL); -+ hr = CoUnmarshalInterface(data.stream, &IID_IClassFactory, (void **)&cf); -+ ok_ole_success(hr, CoUnmarshalInterface); -+ -+ hr = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (void **)&proxy); -+ ok_ole_success(hr, IClassFactory_CreateInstance); -+ -+ IUnknown_Release(proxy); -+ -+ SetEvent(data.stop); -+ ok(!WaitForSingleObject(thread, 1000), "wait failed\n"); -+ CloseHandle(thread); -+ -+ IStream_Release(data.stream); -+ - CoUninitialize(); - } - --- -2.7.4 - diff --git a/patches/ole32-Implicit_MTA/definition b/patches/ole32-Implicit_MTA/definition deleted file mode 100644 index 6fd1e37f..00000000 --- a/patches/ole32-Implicit_MTA/definition +++ /dev/null @@ -1,2 +0,0 @@ -# This patchset doesn't fix any known bugs. It's indirectly for bug 18070. -# It might be useful, however. \ No newline at end of file diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index da30bb7f..1148c497 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "dd2624a24fba400bf59b9396e496d16c43d399d9" + echo "4a6a7655e1cbc614f609ea53939e240f4f785a94" } # Show version information @@ -267,7 +267,6 @@ patch_enable_all () enable_nvcuvid_CUDA_Video_Support="$1" enable_nvencodeapi_Video_Encoder="$1" enable_ole32_HGLOBALStream="$1" - enable_ole32_Implicit_MTA="$1" enable_ole32_STGPROP="$1" enable_oleaut32_CreateTypeLib="$1" enable_oleaut32_DispCallFunc="$1" @@ -424,7 +423,6 @@ patch_enable_all () enable_winmm_mciSendCommandA="$1" enable_wintrust_WinVerifyTrust="$1" enable_wpcap_Dynamic_Linking="$1" - enable_wpcap_Several_Fixes="$1" enable_ws2_32_APC_Performance="$1" enable_ws2_32_Connect_Time="$1" enable_ws2_32_Tests="$1" @@ -995,9 +993,6 @@ patch_enable () ole32-HGLOBALStream) enable_ole32_HGLOBALStream="$2" ;; - ole32-Implicit_MTA) - enable_ole32_Implicit_MTA="$2" - ;; ole32-STGPROP) enable_ole32_STGPROP="$2" ;; @@ -1466,9 +1461,6 @@ patch_enable () wpcap-Dynamic_Linking) enable_wpcap_Dynamic_Linking="$2" ;; - wpcap-Several_Fixes) - enable_wpcap_Several_Fixes="$2" - ;; ws2_32-APC_Performance) enable_ws2_32_APC_Performance="$2" ;; @@ -1874,13 +1866,6 @@ if test "$enable_ws2_32_TransmitFile" -eq 1; then enable_server_Desktop_Refcount=1 fi -if test "$enable_wpcap_Dynamic_Linking" -eq 1; then - if test "$enable_wpcap_Several_Fixes" -gt 1; then - abort "Patchset wpcap-Several_Fixes disabled, but wpcap-Dynamic_Linking depends on that." - fi - enable_wpcap_Several_Fixes=1 -fi - if test "$enable_winex11_WM_WINDOWPOSCHANGING" -eq 1; then if test "$enable_winex11__NET_ACTIVE_WINDOW" -gt 1; then abort "Patchset winex11-_NET_ACTIVE_WINDOW disabled, but winex11-WM_WINDOWPOSCHANGING depends on that." @@ -5860,29 +5845,6 @@ if test "$enable_ole32_HGLOBALStream" -eq 1; then ) >> "$patchlist" fi -# Patchset ole32-Implicit_MTA -# | -# | Modified files: -# | * dlls/ole32/compobj.c, dlls/ole32/compobj_private.h, dlls/ole32/marshal.c, dlls/ole32/rpc.c, dlls/ole32/stubmanager.c, -# | dlls/ole32/tests/compobj.c, dlls/ole32/tests/marshal.c -# | -if test "$enable_ole32_Implicit_MTA" -eq 1; then - patch_apply ole32-Implicit_MTA/0002-ole32-Add-a-helper-for-grabbing-the-current-apartmen.patch - patch_apply ole32-Implicit_MTA/0003-ole32-Allow-more-functions-to-use-the-implicit-MTA.patch - patch_apply ole32-Implicit_MTA/0004-ole32-Report-the-implicit-MTA-in-CoGetApartmentType.patch - patch_apply ole32-Implicit_MTA/0005-ole32-tests-Test-CoWaitForMultipleHandles-in-an-unin.patch - patch_apply ole32-Implicit_MTA/0006-ole32-Allow-unmarshalling-objects-into-an-implicit-M.patch - patch_apply ole32-Implicit_MTA/0007-ole32-Allow-marshalling-objects-from-an-implicit-MTA.patch - ( - printf '%s\n' '+ { "Zebediah Figura", "ole32: Add a helper for grabbing the current apartment or MTA.", 1 },'; - printf '%s\n' '+ { "Zebediah Figura", "ole32: Allow more functions to use the implicit MTA.", 1 },'; - printf '%s\n' '+ { "Zebediah Figura", "ole32: Report the implicit MTA in CoGetApartmentType().", 1 },'; - printf '%s\n' '+ { "Zebediah Figura", "ole32/tests: Test CoWaitForMultipleHandles() in an uninitialized or MTA apartment.", 1 },'; - printf '%s\n' '+ { "Zebediah Figura", "ole32: Allow unmarshalling objects into an implicit MTA.", 1 },'; - printf '%s\n' '+ { "Zebediah Figura", "ole32: Allow marshalling objects from an implicit MTA.", 1 },'; - ) >> "$patchlist" -fi - # Patchset ole32-STGPROP # | # | This patchset fixes the following Wine bugs: @@ -8565,23 +8527,8 @@ if test "$enable_wintrust_WinVerifyTrust" -eq 1; then ) >> "$patchlist" fi -# Patchset wpcap-Several_Fixes -# | -# | Modified files: -# | * dlls/wpcap/wpcap.c, dlls/wpcap/wpcap.spec -# | -if test "$enable_wpcap_Several_Fixes" -eq 1; then - patch_apply wpcap-Several_Fixes/0001-wpcap-Implement-pcap_dump_open-and-pcap_dump.patch - ( - printf '%s\n' '+ { "Jianqiu Zhang", "wpcap: Implement pcap_dump_open and pcap_dump.", 1 },'; - ) >> "$patchlist" -fi - # Patchset wpcap-Dynamic_Linking # | -# | This patchset has the following (direct or indirect) dependencies: -# | * wpcap-Several_Fixes -# | # | Modified files: # | * configure.ac, dlls/wpcap/Makefile.in, dlls/wpcap/wpcap.c # | diff --git a/patches/wpcap-Dynamic_Linking/0001-wpcap-Load-libpcap-dynamically.patch b/patches/wpcap-Dynamic_Linking/0001-wpcap-Load-libpcap-dynamically.patch index c29c2112..0357dcca 100644 --- a/patches/wpcap-Dynamic_Linking/0001-wpcap-Load-libpcap-dynamically.patch +++ b/patches/wpcap-Dynamic_Linking/0001-wpcap-Load-libpcap-dynamically.patch @@ -1,7 +1,7 @@ -From a6a51cbacb0ebe2f387b04824ece1048611becc2 Mon Sep 17 00:00:00 2001 +From 852993baf2f57a99f9646f946d0921449be43c82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Tue, 26 Aug 2014 00:59:37 +0200 -Subject: wpcap: Load libpcap dynamically. +Subject: [PATCH] wpcap: Load libpcap dynamically. This is intended for packagers, without this patch libpcap easily becomes a fixed dependency of wine. Something we don't want i guess. @@ -12,10 +12,10 @@ Something we don't want i guess. 3 files changed, 139 insertions(+), 37 deletions(-) diff --git a/configure.ac b/configure.ac -index 1e6bba3..f0a3b55 100644 +index be946d542eb..9c59bb5a070 100644 --- a/configure.ac +++ b/configure.ac -@@ -1174,9 +1174,9 @@ WINE_NOTICE_WITH(opencl,[test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes], +@@ -1292,9 +1292,9 @@ WINE_NOTICE_WITH(opencl,[test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes], dnl **** Check for libpcap **** if test "$ac_cv_header_pcap_pcap_h" = "yes" then @@ -39,7 +39,7 @@ index 91b4a955911..aeef71a46e5 100644 C_SRCS = \ wpcap.c diff --git a/dlls/wpcap/wpcap.c b/dlls/wpcap/wpcap.c -index d731d8494f2..94d5479305c 100644 +index e7908cd038a..a88c325189e 100644 --- a/dlls/wpcap/wpcap.c +++ b/dlls/wpcap/wpcap.c @@ -18,6 +18,9 @@ @@ -52,9 +52,9 @@ index d731d8494f2..94d5479305c 100644 #include /* pcap.h might define those: */ -@@ -45,47 +48,128 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag); - #define PCAP_SRC_IFLOCAL 3 - #endif +@@ -62,47 +65,128 @@ static inline WCHAR *heap_strdupAtoW(const char *str) + return ret; + } +static void (*ppcap_breakloop)(pcap_t *); +static void (*ppcap_close)(pcap_t *); @@ -188,7 +188,7 @@ index d731d8494f2..94d5479305c 100644 } typedef struct -@@ -114,10 +198,10 @@ int CDECL wine_pcap_dispatch(pcap_t *p, int cnt, +@@ -131,10 +215,10 @@ int CDECL wine_pcap_dispatch(pcap_t *p, int cnt, PCAP_HANDLER_CALLBACK pcb; pcb.pfn_cb = callback; pcb.user_data = user; @@ -201,7 +201,7 @@ index d731d8494f2..94d5479305c 100644 } int CDECL wine_pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf) -@@ -125,7 +209,7 @@ int CDECL wine_pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf) +@@ -142,7 +226,7 @@ int CDECL wine_pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf) int ret; TRACE("(%p %p)\n", alldevsp, errbuf); @@ -210,7 +210,7 @@ index d731d8494f2..94d5479305c 100644 if(alldevsp && !*alldevsp) ERR_(winediag)("Failed to access raw network (pcap), this requires special permissions.\n"); -@@ -141,13 +225,13 @@ int CDECL wine_pcap_findalldevs_ex(char *source, void *auth, pcap_if_t **alldevs +@@ -158,13 +242,13 @@ int CDECL wine_pcap_findalldevs_ex(char *source, void *auth, pcap_if_t **alldevs void CDECL wine_pcap_freealldevs(pcap_if_t *alldevs) { TRACE("(%p)\n", alldevs); @@ -226,7 +226,7 @@ index d731d8494f2..94d5479305c 100644 } typedef struct _AirpcapHandle *PAirpcapHandle; -@@ -160,18 +244,18 @@ PAirpcapHandle CDECL wine_pcap_get_airpcap_handle(pcap_t *p) +@@ -177,18 +261,18 @@ PAirpcapHandle CDECL wine_pcap_get_airpcap_handle(pcap_t *p) char* CDECL wine_pcap_geterr(pcap_t *p) { TRACE("(%p)\n", p); @@ -248,7 +248,7 @@ index d731d8494f2..94d5479305c 100644 TRACE("%s\n", debugstr_a(ret)); return ret; } -@@ -179,20 +263,20 @@ const char* CDECL wine_pcap_lib_version(void) +@@ -196,20 +280,20 @@ const char* CDECL wine_pcap_lib_version(void) int CDECL wine_pcap_list_datalinks(pcap_t *p, int **dlt_buffer) { TRACE("(%p %p)\n", p, dlt_buffer); @@ -272,7 +272,7 @@ index d731d8494f2..94d5479305c 100644 } int CDECL wine_pcap_loop(pcap_t *p, int cnt, -@@ -206,34 +290,34 @@ int CDECL wine_pcap_loop(pcap_t *p, int cnt, +@@ -223,34 +307,34 @@ int CDECL wine_pcap_loop(pcap_t *p, int cnt, PCAP_HANDLER_CALLBACK pcb; pcb.pfn_cb = callback; pcb.user_data = user; @@ -313,7 +313,7 @@ index d731d8494f2..94d5479305c 100644 } #define PCAP_OPENFLAG_PROMISCUOUS 1 -@@ -244,14 +328,14 @@ pcap_t* CDECL wine_pcap_open(const char *source, int snaplen, int flags, int rea +@@ -261,14 +345,14 @@ pcap_t* CDECL wine_pcap_open(const char *source, int snaplen, int flags, int rea int promisc = flags & PCAP_OPENFLAG_PROMISCUOUS; FIXME("(%s %i %i %i %p %p): partial stub\n", debugstr_a(source), snaplen, flags, read_timeout, auth, errbuf); @@ -330,7 +330,7 @@ index d731d8494f2..94d5479305c 100644 } int CDECL wine_pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf) -@@ -295,13 +379,13 @@ int CDECL wine_pcap_parsesrcstr(const char *source, int *type, char *host, char +@@ -312,13 +396,13 @@ int CDECL wine_pcap_parsesrcstr(const char *source, int *type, char *host, char int CDECL wine_pcap_sendpacket(pcap_t *p, const unsigned char *buf, int size) { TRACE("(%p %p %i)\n", p, buf, size); @@ -346,7 +346,7 @@ index d731d8494f2..94d5479305c 100644 } int CDECL wine_pcap_setbuff(pcap_t * p, int dim) -@@ -313,25 +397,25 @@ int CDECL wine_pcap_setbuff(pcap_t * p, int dim) +@@ -330,25 +414,25 @@ int CDECL wine_pcap_setbuff(pcap_t * p, int dim) int CDECL wine_pcap_setfilter(pcap_t *p, struct bpf_program *fp) { TRACE("(%p %p)\n", p, fp); @@ -376,16 +376,19 @@ index d731d8494f2..94d5479305c 100644 } int CDECL wine_wsockinit(void) -@@ -344,10 +428,29 @@ int CDECL wine_wsockinit(void) +@@ -374,7 +458,7 @@ pcap_dumper_t* CDECL wine_pcap_dump_open(pcap_t *p, const char *fname) - pcap_dumper_t* CDECL wine_pcap_dump_open(pcap_t *p, const char *fname) - { -- return pcap_dump_open(p, fname); -+ return ppcap_dump_open(p, fname); - } + TRACE("unix_path %s\n", debugstr_a(unix_path)); +- dumper = pcap_dump_open(p, unix_path); ++ dumper = ppcap_dump_open(p, unix_path); + heap_free(unix_path); + + return dumper; +@@ -383,5 +467,24 @@ pcap_dumper_t* CDECL wine_pcap_dump_open(pcap_t *p, const char *fname) void CDECL wine_pcap_dump(u_char *user, const struct pcap_pkthdr *h, const u_char *sp) { + TRACE("(%p %p %p)\n", user, h, sp); - return pcap_dump(user, h, sp); + return ppcap_dump(user, h, sp); +} @@ -409,5 +412,5 @@ index d731d8494f2..94d5479305c 100644 + return TRUE; } -- -2.13.1 +2.16.3 diff --git a/patches/wpcap-Dynamic_Linking/definition b/patches/wpcap-Dynamic_Linking/definition index fb8be161..e69de29b 100644 --- a/patches/wpcap-Dynamic_Linking/definition +++ b/patches/wpcap-Dynamic_Linking/definition @@ -1 +0,0 @@ -Depends: wpcap-Several_Fixes diff --git a/patches/wpcap-Several_Fixes/0001-wpcap-Implement-pcap_dump_open-and-pcap_dump.patch b/patches/wpcap-Several_Fixes/0001-wpcap-Implement-pcap_dump_open-and-pcap_dump.patch deleted file mode 100644 index b6e70ec9..00000000 --- a/patches/wpcap-Several_Fixes/0001-wpcap-Implement-pcap_dump_open-and-pcap_dump.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 9e5dd79c03afddd6a3d327b33cef358b849e891d Mon Sep 17 00:00:00 2001 -From: Jianqiu Zhang -Date: Thu, 7 Jan 2016 16:33:34 +0800 -Subject: wpcap: Implement pcap_dump_open and pcap_dump - -Signed-off-by: Jianqiu Zhang ---- - dlls/wpcap/wpcap.c | 10 ++++++++++ - dlls/wpcap/wpcap.spec | 4 ++-- - 2 files changed, 12 insertions(+), 2 deletions(-) - -diff --git a/dlls/wpcap/wpcap.c b/dlls/wpcap/wpcap.c -index ae9e482..da911c7 100644 ---- a/dlls/wpcap/wpcap.c -+++ b/dlls/wpcap/wpcap.c -@@ -339,3 +339,13 @@ int CDECL wine_wsockinit(void) - if (WSAStartup(MAKEWORD(1,1), &wsadata)) return -1; - return 0; - } -+ -+pcap_dumper_t* CDECL wine_pcap_dump_open(pcap_t *p, const char *fname) -+{ -+ return pcap_dump_open(p, fname); -+} -+ -+void CDECL wine_pcap_dump(u_char *user, const struct pcap_pkthdr *h, const u_char *sp) -+{ -+ return pcap_dump(user, h, sp); -+} -diff --git a/dlls/wpcap/wpcap.spec b/dlls/wpcap/wpcap.spec -index 0e1e208..cf2ed43 100644 ---- a/dlls/wpcap/wpcap.spec -+++ b/dlls/wpcap/wpcap.spec -@@ -16,12 +16,12 @@ - @ cdecl pcap_datalink_val_to_description(long) wine_pcap_datalink_val_to_description - @ cdecl pcap_datalink_val_to_name(long) wine_pcap_datalink_val_to_name - @ cdecl pcap_dispatch(ptr long ptr ptr) wine_pcap_dispatch --@ stub pcap_dump -+@ cdecl pcap_dump(ptr ptr str) wine_pcap_dump - @ stub pcap_dump_close - @ stub pcap_dump_file - @ stub pcap_dump_flush - @ stub pcap_dump_ftell --@ stub pcap_dump_open -+@ cdecl pcap_dump_open(ptr str) wine_pcap_dump_open - @ stub pcap_file - @ stub pcap_fileno - @ cdecl pcap_findalldevs(ptr ptr) wine_pcap_findalldevs --- -2.6.4 - diff --git a/patches/wpcap-Several_Fixes/definition b/patches/wpcap-Several_Fixes/definition deleted file mode 100644 index 5fcfade6..00000000 --- a/patches/wpcap-Several_Fixes/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: Implement pcap_dump_open and pcap_dump