diff --git a/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch b/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch index 53da8fbc..4d3f2fc8 100644 --- a/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch +++ b/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch @@ -1,4 +1,4 @@ -From 7d5594cc0b3760843d7d566e642e175a9e542a08 Mon Sep 17 00:00:00 2001 +From 169d29bc138015c6d54cc71c817bad9ff25ba7f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Mon, 3 Apr 2017 05:30:27 +0200 Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data. @@ -10,7 +10,7 @@ Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data. 3 files changed, 145 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c -index bdcb3448ab7..8e9e780bb50 100644 +index d48c422e432..1d246ec7a71 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -30,6 +30,7 @@ @@ -21,7 +21,7 @@ index bdcb3448ab7..8e9e780bb50 100644 #include "wine/test.h" #include "delayloadhandler.h" -@@ -3993,6 +3994,79 @@ static void test_dll_file( const char *name ) +@@ -4039,6 +4040,79 @@ static void test_dll_file( const char *name ) #undef OK_FIELD } @@ -101,10 +101,10 @@ index bdcb3448ab7..8e9e780bb50 100644 START_TEST(loader) { int argc; -@@ -4061,10 +4135,12 @@ START_TEST(loader) - test_import_resolution(); +@@ -4110,10 +4184,12 @@ START_TEST(loader) test_ExitProcess(); test_InMemoryOrderModuleList(); + test_wow64_redirection(); + test_HashLinks(); test_dll_file( "ntdll.dll" ); test_dll_file( "kernel32.dll" ); @@ -115,10 +115,10 @@ index bdcb3448ab7..8e9e780bb50 100644 test_Loader(); } diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 8fe2038b346..5a3036e1246 100644 +index 432369e40a8..b00d9ce13bb 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -96,6 +96,9 @@ static const char * const reason_names[] = +@@ -119,6 +119,9 @@ static const char * const reason_names[] = static const WCHAR dllW[] = {'.','d','l','l',0}; @@ -128,7 +128,7 @@ index 8fe2038b346..5a3036e1246 100644 /* internal representation of 32bit modules. per process. */ typedef struct _wine_modref { -@@ -429,6 +432,52 @@ static void call_ldr_notifications( ULONG reason, LDR_MODULE *module ) +@@ -461,6 +464,52 @@ static void call_ldr_notifications( ULONG reason, LDR_MODULE *module ) } } @@ -181,7 +181,7 @@ index 8fe2038b346..5a3036e1246 100644 /************************************************************************* * get_modref * -@@ -1176,7 +1225,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name +@@ -1208,7 +1257,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name &wm->ldr.InLoadOrderModuleList); InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderModuleList); @@ -194,7 +194,7 @@ index 8fe2038b346..5a3036e1246 100644 if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT)) { -@@ -1921,6 +1975,7 @@ static void load_builtin_callback( void *module, const char *filename ) +@@ -1953,6 +2007,7 @@ static void load_builtin_callback( void *module, const char *filename ) /* the module has only be inserted in the load & memory order lists */ RemoveEntryList(&wm->ldr.InLoadOrderModuleList); RemoveEntryList(&wm->ldr.InMemoryOrderModuleList); @@ -202,7 +202,7 @@ index 8fe2038b346..5a3036e1246 100644 /* FIXME: free the modref */ builtin_load_info->status = STATUS_DLL_NOT_FOUND; return; -@@ -2288,6 +2343,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam +@@ -2476,6 +2531,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam /* the module has only be inserted in the load & memory order lists */ RemoveEntryList(&wm->ldr.InLoadOrderModuleList); RemoveEntryList(&wm->ldr.InMemoryOrderModuleList); @@ -210,7 +210,7 @@ index 8fe2038b346..5a3036e1246 100644 /* FIXME: there are several more dangling references * left. Including dlls loaded by this dll before the -@@ -3451,6 +3507,7 @@ static void free_modref( WINE_MODREF *wm ) +@@ -3650,6 +3706,7 @@ static void free_modref( WINE_MODREF *wm ) { RemoveEntryList(&wm->ldr.InLoadOrderModuleList); RemoveEntryList(&wm->ldr.InMemoryOrderModuleList); @@ -218,7 +218,7 @@ index 8fe2038b346..5a3036e1246 100644 if (wm->ldr.InInitializationOrderModuleList.Flink) RemoveEntryList(&wm->ldr.InInitializationOrderModuleList); -@@ -3937,6 +3994,7 @@ void __wine_process_init(void) +@@ -4376,6 +4433,7 @@ void __wine_process_init(void) UNICODE_STRING nt_name; void * (CDECL *init_func)(void); INITIAL_TEB stack; @@ -226,7 +226,7 @@ index 8fe2038b346..5a3036e1246 100644 thread_init(); -@@ -3946,6 +4004,10 @@ void __wine_process_init(void) +@@ -4385,6 +4443,10 @@ void __wine_process_init(void) load_global_options(); @@ -237,7 +237,7 @@ index 8fe2038b346..5a3036e1246 100644 /* setup the load callback and create ntdll modref */ wine_dll_set_callback( load_builtin_callback ); -@@ -4000,6 +4062,9 @@ void __wine_process_init(void) +@@ -4439,6 +4501,9 @@ void __wine_process_init(void) RemoveEntryList( &wm->ldr.InMemoryOrderModuleList ); InsertHeadList( &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderModuleList ); @@ -248,10 +248,10 @@ index 8fe2038b346..5a3036e1246 100644 { ERR( "Main exe initialization for %s failed, status %x\n", diff --git a/include/winternl.h b/include/winternl.h -index 4cd531a4613..0d5e0e9bd8a 100644 +index df1418477ad..2d7c86c389c 100644 --- a/include/winternl.h +++ b/include/winternl.h -@@ -2225,8 +2225,8 @@ typedef struct _LDR_MODULE +@@ -2242,8 +2242,8 @@ typedef struct _LDR_MODULE ULONG Flags; SHORT LoadCount; SHORT TlsIndex; @@ -261,7 +261,7 @@ index 4cd531a4613..0d5e0e9bd8a 100644 ULONG TimeDateStamp; HANDLE ActivationContext; PVOID PatchInformation; -@@ -2236,6 +2236,9 @@ typedef struct _LDR_MODULE +@@ -2253,6 +2253,9 @@ typedef struct _LDR_MODULE PVOID ContextInformation; ULONG_PTR OriginalBase; LARGE_INTEGER LoadTime; diff --git a/patches/ntdll-SystemModuleInformation/0002-ntdll-Return-ntdll.dll-as-the-first-entry-for-System.patch b/patches/ntdll-SystemModuleInformation/0002-ntdll-Return-ntdll.dll-as-the-first-entry-for-System.patch index b75e12ff..3ea4579f 100644 --- a/patches/ntdll-SystemModuleInformation/0002-ntdll-Return-ntdll.dll-as-the-first-entry-for-System.patch +++ b/patches/ntdll-SystemModuleInformation/0002-ntdll-Return-ntdll.dll-as-the-first-entry-for-System.patch @@ -1,7 +1,7 @@ -From 4ae8c8dcc501081481fd07302f7cba16d19ecda6 Mon Sep 17 00:00:00 2001 +From fb0f6b366765e5cd7cf236d660a974541e85b100 Mon Sep 17 00:00:00 2001 From: Andrew Wesie Date: Fri, 12 Apr 2019 20:04:03 -0500 -Subject: [PATCH 2/3] ntdll: Return ntdll.dll as the first entry for +Subject: [PATCH] ntdll: Return ntdll.dll as the first entry for SystemModuleInformation. --- @@ -9,10 +9,10 @@ Subject: [PATCH 2/3] ntdll: Return ntdll.dll as the first entry for 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c -index 7cc5d81b2..df3c40fcc 100644 +index a9cec53e0b6..c7d4c804e2c 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c -@@ -2352,6 +2352,33 @@ BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature ) +@@ -2454,6 +2454,33 @@ BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature ) return feature < PROCESSOR_FEATURE_MAX && user_shared_data->ProcessorFeatures[feature]; } @@ -27,14 +27,14 @@ index 7cc5d81b2..df3c40fcc 100644 + entry = NtCurrentTeb()->Peb->LdrData->InLoadOrderModuleList.Flink; + mod = CONTAINING_RECORD(entry, LDR_MODULE, InLoadOrderModuleList); + -+ sm->Reserved1 = 0; -+ sm->Reserved2 = 0; ++ sm->Section = 0; ++ sm->MappedBaseAddress = 0; + sm->ImageBaseAddress = mod->BaseAddress; + sm->ImageSize = mod->SizeOfImage; + sm->Flags = mod->Flags; -+ sm->Id = 0; -+ sm->Rank = 0; -+ sm->Unknown = 0; ++ sm->LoadOrderIndex = 0; ++ sm->InitOrderIndex = 0; ++ sm->LoadCount = 0; + str.Length = 0; + str.MaximumLength = MAXIMUM_FILENAME_LENGTH; + str.Buffer = (char*)sm->Name; @@ -46,7 +46,7 @@ index 7cc5d81b2..df3c40fcc 100644 /****************************************************************************** * NtQuerySystemInformation [NTDLL.@] * ZwQuerySystemInformation [NTDLL.@] -@@ -2780,7 +2807,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( +@@ -2853,7 +2880,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( FIXME("returning fake driver list\n"); smi->ModulesCount = 1; @@ -56,5 +56,5 @@ index 7cc5d81b2..df3c40fcc 100644 } break; -- -2.21.0 +2.17.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 78b3629e..639b23d7 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "8c74027ba60a360f24cf232ee233e71262d8f1ff" + echo "98c2c9a9c98d174851fa7a87db79599dd7d8af89" } # Show version information @@ -5416,14 +5416,10 @@ if test "$enable_quartz_MediaSeeking_Positions" -eq 1; then patch_apply quartz-MediaSeeking_Positions/0001-strmbase-Fix-MediaSeekingPassThru_GetPositions-retur.patch patch_apply quartz-MediaSeeking_Positions/0002-quartz-Include-the-stream-position-in-addition-to-th.patch patch_apply quartz-MediaSeeking_Positions/0003-quartz-Implement-MediaSeeking_GetCurrentPosition-on-.patch - patch_apply quartz-MediaSeeking_Positions/0004-quartz-Implement-MediaSeeking_GetStopPosition-on-top.patch - patch_apply quartz-MediaSeeking_Positions/0005-quartz-Remove-unused-cache-of-MediaSeeking-stop-posi.patch ( printf '%s\n' '+ { "Erich E. Hoover", "strmbase: Fix MediaSeekingPassThru_GetPositions return when the pins are unconnected.", 1 },'; printf '%s\n' '+ { "Erich E. Hoover", "quartz: Include the stream position in addition to the reference clock offset in the time returned by MediaSeeking_GetPositions.", 1 },'; printf '%s\n' '+ { "Erich E. Hoover", "quartz: Implement MediaSeeking_GetCurrentPosition on top of MediaSeeking_GetPositions.", 1 },'; - printf '%s\n' '+ { "Erich E. Hoover", "quartz: Implement MediaSeeking_GetStopPosition on top of MediaSeeking_GetPositions.", 1 },'; - printf '%s\n' '+ { "Erich E. Hoover", "quartz: Remove unused cache of MediaSeeking stop position.", 1 },'; ) >> "$patchlist" fi diff --git a/patches/quartz-MediaSeeking_Positions/0004-quartz-Implement-MediaSeeking_GetStopPosition-on-top.patch b/patches/quartz-MediaSeeking_Positions/0004-quartz-Implement-MediaSeeking_GetStopPosition-on-top.patch deleted file mode 100644 index c7e1be02..00000000 --- a/patches/quartz-MediaSeeking_Positions/0004-quartz-Implement-MediaSeeking_GetStopPosition-on-top.patch +++ /dev/null @@ -1,68 +0,0 @@ -From e2abc9b73d2e909f62468de5d66c5d9ec51fce0f Mon Sep 17 00:00:00 2001 -From: "Erich E. Hoover" -Date: Tue, 22 Jul 2014 08:32:31 -0600 -Subject: quartz: Implement MediaSeeking_GetStopPosition on top of - MediaSeeking_GetPositions. - ---- - dlls/quartz/filtergraph.c | 37 ++++++++++++++++--------------------- - 1 file changed, 16 insertions(+), 21 deletions(-) - -diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c -index 4c093f3..0d06ba4 100644 ---- a/dlls/quartz/filtergraph.c -+++ b/dlls/quartz/filtergraph.c -@@ -2430,27 +2430,6 @@ static HRESULT WINAPI MediaSeeking_GetDuration(IMediaSeeking *iface, LONGLONG *p - return hr; - } - --static HRESULT WINAPI MediaSeeking_GetStopPosition(IMediaSeeking *iface, LONGLONG *pStop) --{ -- IFilterGraphImpl *This = impl_from_IMediaSeeking(iface); -- HRESULT hr = S_OK; -- -- TRACE("(%p/%p)->(%p)\n", This, iface, pStop); -- -- if (!pStop) -- return E_POINTER; -- -- EnterCriticalSection(&This->cs); -- if (This->stop_position < 0) -- /* Stop position not set, use duration instead */ -- hr = IMediaSeeking_GetDuration(iface, pStop); -- else -- *pStop = This->stop_position; -- LeaveCriticalSection(&This->cs); -- -- return hr; --} -- - static HRESULT WINAPI MediaSeeking_ConvertTimeFormat(IMediaSeeking *iface, LONGLONG *pTarget, - const GUID *pTargetFormat, LONGLONG Source, const GUID *pSourceFormat) - { -@@ -2565,6 +2544,22 @@ static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONG - return hr; - } - -+static HRESULT WINAPI MediaSeeking_GetStopPosition(IMediaSeeking *iface, LONGLONG *pStop) -+{ -+ IFilterGraphImpl *This = impl_from_IMediaSeeking(iface); -+ LONGLONG time; -+ HRESULT hr; -+ -+ TRACE("(%p/%p)->(%p)\n", This, iface, pStop); -+ -+ if (!pStop) -+ return E_POINTER; -+ -+ hr = MediaSeeking_GetPositions(iface, &time, pStop); -+ -+ return hr; -+} -+ - static HRESULT WINAPI MediaSeeking_GetAvailable(IMediaSeeking *iface, LONGLONG *pEarliest, - LONGLONG *pLatest) - { --- -1.7.9.5 - diff --git a/patches/quartz-MediaSeeking_Positions/0005-quartz-Remove-unused-cache-of-MediaSeeking-stop-posi.patch b/patches/quartz-MediaSeeking_Positions/0005-quartz-Remove-unused-cache-of-MediaSeeking-stop-posi.patch deleted file mode 100644 index 22f04439..00000000 --- a/patches/quartz-MediaSeeking_Positions/0005-quartz-Remove-unused-cache-of-MediaSeeking-stop-posi.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 3c9438db949d434b8cb5fba36ee55df384624016 Mon Sep 17 00:00:00 2001 -From: "Erich E. Hoover" -Date: Tue, 22 Jul 2014 08:34:09 -0600 -Subject: quartz: Remove unused cache of MediaSeeking stop position. - ---- - dlls/quartz/filtergraph.c | 7 ------- - 1 file changed, 7 deletions(-) - -diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c -index 0d06ba4..df6b4bd 100644 ---- a/dlls/quartz/filtergraph.c -+++ b/dlls/quartz/filtergraph.c -@@ -201,7 +201,6 @@ typedef struct _IFilterGraphImpl { - GUID timeformatseek; - REFERENCE_TIME start_time; - REFERENCE_TIME pause_time; -- LONGLONG stop_position; - LONG recursioncount; - IUnknown *pSite; - LONG version; -@@ -2471,11 +2470,6 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG * - (dwCurrentFlags & 0x7) != AM_SEEKING_NoPositioning) - FIXME("Adjust method %x not handled yet!\n", dwCurrentFlags & 0x7); - -- if ((dwStopFlags & 0x7) == AM_SEEKING_AbsolutePositioning) -- This->stop_position = *pStop; -- else if ((dwStopFlags & 0x7) != AM_SEEKING_NoPositioning) -- FIXME("Stop position not handled yet!\n"); -- - if (state == State_Running && !(dwCurrentFlags & AM_SEEKING_NoFlush)) - IMediaControl_Pause(&This->IMediaControl_iface); - args.current = pCurrent; -@@ -5669,7 +5663,6 @@ HRESULT FilterGraph_create(IUnknown *pUnkOuter, LPVOID *ppObj) - fimpl->nItfCacheEntries = 0; - memcpy(&fimpl->timeformatseek, &TIME_FORMAT_MEDIA_TIME, sizeof(GUID)); - fimpl->start_time = fimpl->pause_time = 0; -- fimpl->stop_position = -1; - fimpl->punkFilterMapper2 = NULL; - fimpl->recursioncount = 0; - fimpl->version = 0; --- -1.7.9.5 -