webview2 uses this function to locate media foundation. I also saw the UWP version of FH5 calling this function as well, interestingly.
From: Etaash Mathamsetty etaash.mathamsetty@gmail.com
--- dlls/kernel32/kernel32.spec | 1 + dlls/kernelbase/kernelbase.spec | 2 +- dlls/kernelbase/version.c | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 16ce6ffa41e..c85b2aa9f6c 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -774,6 +774,7 @@ @ stdcall -import GetUserPreferredUILanguages(long ptr ptr ptr) @ stdcall GetPackageFamilyName(long ptr ptr) kernelbase.GetPackageFamilyName @ stdcall GetPackageFullName(long ptr ptr) kernelbase.GetPackageFullName +@ stdcall GetPackagesByPackageFamily(wstr ptr ptr ptr ptr) kernelbase.GetPackagesByPackageFamily @ stdcall -import GetPhysicallyInstalledSystemMemory(ptr) @ stdcall -import GetPriorityClass(long) @ stdcall GetPrivateProfileIntA(str str long str) diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index af3af8ecabe..9fd9ad5f038 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -643,7 +643,7 @@ # @ stub GetPackageStatusForUser # @ stub GetPackageTargetPlatformProperty # @ stub GetPackageVolumeSisPath -# @ stub GetPackagesByPackageFamily +@ stdcall GetPackagesByPackageFamily(wstr ptr ptr ptr ptr) @ stdcall GetPerformanceInfo(ptr long) @ stdcall GetPhysicallyInstalledSystemMemory(ptr) # @ stub GetPreviousFgPolicyRefreshInfoInternal diff --git a/dlls/kernelbase/version.c b/dlls/kernelbase/version.c index 4d5a8a4de93..fc35c6c6c3c 100644 --- a/dlls/kernelbase/version.c +++ b/dlls/kernelbase/version.c @@ -1604,6 +1604,21 @@ LONG WINAPI /* DECLSPEC_HOTPATCH */ GetPackageFamilyName( HANDLE process, UINT32 return APPMODEL_ERROR_NO_PACKAGE; }
+/*********************************************************************** + * GetPackagesByPackageFamily (kernelbase.@) + */ +LONG WINAPI /* DECLSPEC_HOTPATCH */ GetPackagesByPackageFamily(const WCHAR *family_name, UINT32 *count, + WCHAR *full_names, UINT32 *buffer_len, WCHAR *buffer) +{ + FIXME( "(%s %p %p %p %p): stub\n", debugstr_w(family_name), count, full_names, buffer_len, buffer ); + + if (!count || !buffer_len) + return ERROR_INVALID_PARAMETER; + + *count = 0; + *buffer_len = 0; + return ERROR_SUCCESS; +}
static const struct {
The patch name is probably off (the actually added function is GetPackagesByPackageFamily and not GetCurrentPackageFamilyName)?
FWIW The function is implemented in Proton for a while: https://github.com/ValveSoftware/wine/commit/4f20827500da2d90b6b18163f18d6ff...
The reason it hasn't been sent upstream yet is that for original occasion (Forza Horizon 4) the stub won't work, it needs the actual data returned. and the implementation apparently won't do that without the information present in registry. Proton has another patch for that right before this one: "wine.inf: Create package repository for VCLibs.140.". But that is essentially a workaround, doing it properly is a bit more complicated and involves introducing the package repository in Wine to be updated from builtin VC components.
So the question is, does the app concerned here depends on GetPackagesByPackageFamily returning success? If not, maybe worth considdering taking the implementation as by itself it is probably correct and has a test. Not entirely sure though, maybe it doesn't worth the complication until the actual package info is there.