From b6035fb6526e937d1326bd2103d3f14d3e04fe58 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 7 Feb 2018 11:19:05 +1100 Subject: [PATCH] Rebase against f9181daa1ddc2c10d3b6ddd4610bc1421cfd0f42 --- ...ediag-message-to-show-warning-that-t.patch | 41 +-- ...2-Implement-BuildSecurityDescriptorW.patch | 22 +- ...Implement-GetExplicitEntriesFromAclW.patch | 279 ------------------ .../definition | 1 - .../0007-shcore-Add-dll.patch | 141 --------- ...vation.idl-with-IActivationFactory-i.patch | 62 ---- ...include-roapi.h-Add-further-typedefs.patch | 6 +- ...ase-Implement-RoGetActivationFactory.patch | 190 ------------ ...combase-Implement-RoActivateInstance.patch | 42 ++- ...dd-stub-for-RoGetApartmentIdentifier.patch | 14 +- ...idl-Add-IApartmentShutdown-interface.patch | 34 --- ...b-for-RoRegisterForApartmentShutdown.patch | 12 +- ...ub-for-RoGetServerActivatableClasses.patch | 16 +- ...ub-for-RoRegisterActivationFactories.patch | 25 +- ...base-Add-stub-for-CleanupTlsOleState.patch | 12 +- patches/patchinstall.sh | 58 +--- ...ort-for-float-formats-with-more-than.patch | 32 -- patches/xaudio2-get_al_format/definition | 1 - ...-Ignore-queued-AL-buffers-after-Stop.patch | 222 -------------- patches/xaudio2_7-Abandon_Albufs/definition | 2 - 20 files changed, 104 insertions(+), 1108 deletions(-) delete mode 100644 patches/advapi32-GetExplicitEntriesFromAclW/0001-advapi32-Implement-GetExplicitEntriesFromAclW.patch delete mode 100644 patches/advapi32-GetExplicitEntriesFromAclW/definition delete mode 100644 patches/api-ms-win-Stub_DLLs/0007-shcore-Add-dll.patch delete mode 100644 patches/combase-RoApi/0001-include-Add-activation.idl-with-IActivationFactory-i.patch delete mode 100644 patches/combase-RoApi/0003-combase-Implement-RoGetActivationFactory.patch delete mode 100644 patches/combase-RoApi/0006-include-objidl.idl-Add-IApartmentShutdown-interface.patch delete mode 100644 patches/xaudio2-get_al_format/0001-xaudio2-Add-support-for-float-formats-with-more-than.patch delete mode 100644 patches/xaudio2-get_al_format/definition delete mode 100644 patches/xaudio2_7-Abandon_Albufs/0001-xaudio2-Ignore-queued-AL-buffers-after-Stop.patch delete mode 100644 patches/xaudio2_7-Abandon_Albufs/definition diff --git a/patches/Staging/0001-kernel32-Add-winediag-message-to-show-warning-that-t.patch b/patches/Staging/0001-kernel32-Add-winediag-message-to-show-warning-that-t.patch index 6a040ffd..99cacced 100644 --- a/patches/Staging/0001-kernel32-Add-winediag-message-to-show-warning-that-t.patch +++ b/patches/Staging/0001-kernel32-Add-winediag-message-to-show-warning-that-t.patch @@ -1,18 +1,18 @@ -From 41ee5d7699182ea01c61223ab9d0a10473e16ac2 Mon Sep 17 00:00:00 2001 +From d0a3d0318debc21cb9bb3962d263f92938042122 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 2 Oct 2014 19:44:31 +0200 -Subject: kernel32: Add winediag message to show warning, that this isn't - vanilla wine. +Subject: [PATCH] kernel32: Add winediag message to show warning, that this + isn't vanilla wine. --- - dlls/kernel32/process.c | 9 +++++++++ - 1 file changed, 9 insertions(+) + dlls/kernel32/process.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c -index 6d0fc74cdf4..ed1d967ffdf 100644 +index 62dc815..31ed9b3bcf 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c -@@ -65,6 +65,7 @@ +@@ -66,6 +66,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(process); WINE_DECLARE_DEBUG_CHANNEL(file); WINE_DECLARE_DEBUG_CHANNEL(relay); @@ -20,21 +20,22 @@ index 6d0fc74cdf4..ed1d967ffdf 100644 #ifdef __APPLE__ extern char **__wine_get_main_environment(void); -@@ -1104,6 +1105,14 @@ static DWORD WINAPI start_process( PEB *peb ) - DPRINTF( "%04x:Starting process %s (entryproc=%p)\n", GetCurrentThreadId(), - debugstr_w(peb->ProcessParameters->ImagePathName.Buffer), entry ); +@@ -1131,6 +1132,15 @@ void WINAPI start_process( LPTHREAD_START_ROUTINE entry, PEB *peb ) -+ if (CreateEventA(0, 0, 0, "__winestaging_warn_event") && GetLastError() != ERROR_ALREADY_EXISTS) -+ { -+ FIXME_(winediag)("Wine Staging %s is a testing version containing experimental patches.\n", wine_get_version()); -+ FIXME_(winediag)("Please mention your exact version when filing bug reports on winehq.org.\n"); -+ } -+ else -+ WARN_(winediag)("Wine Staging %s is a testing version containing experimental patches.\n", wine_get_version()); + __TRY + { ++ if (CreateEventA(0, 0, 0, "__winestaging_warn_event") && GetLastError() != ERROR_ALREADY_EXISTS) ++ { ++ FIXME_(winediag)("Wine Staging %s is a testing version containing experimental patches.\n", wine_get_version()); ++ FIXME_(winediag)("Please mention your exact version when filing bug reports on winehq.org.\n"); ++ } ++ else ++ WARN_(winediag)("Wine Staging %s is a testing version containing experimental patches.\n", wine_get_version()); + - if (!CheckRemoteDebuggerPresent( GetCurrentProcess(), &being_debugged )) - being_debugged = FALSE; ++ + if (!CheckRemoteDebuggerPresent( GetCurrentProcess(), &being_debugged )) + being_debugged = FALSE; -- -2.11.0 +1.9.1 diff --git a/patches/advapi32-BuildSecurityDescriptor/0001-advapi32-Implement-BuildSecurityDescriptorW.patch b/patches/advapi32-BuildSecurityDescriptor/0001-advapi32-Implement-BuildSecurityDescriptorW.patch index 0074e46b..23b74654 100644 --- a/patches/advapi32-BuildSecurityDescriptor/0001-advapi32-Implement-BuildSecurityDescriptorW.patch +++ b/patches/advapi32-BuildSecurityDescriptor/0001-advapi32-Implement-BuildSecurityDescriptorW.patch @@ -1,25 +1,25 @@ -From 994fe46f1b68d851d285a29cce904bd9f22540ea Mon Sep 17 00:00:00 2001 +From 95fd708dbdd9f8d61fdd8f1571c44e98c54b8988 Mon Sep 17 00:00:00 2001 From: Andrew Wesie Date: Tue, 2 May 2017 00:59:49 -0500 -Subject: advapi32: Implement BuildSecurityDescriptorW. +Subject: [PATCH] advapi32: Implement BuildSecurityDescriptorW. --- dlls/advapi32/security.c | 218 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 164 insertions(+), 54 deletions(-) diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c -index 24ec3099713..82bb6689d43 100644 +index 6f4fb44..3737827 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c -@@ -58,6 +58,7 @@ static BOOL ParseStringSecurityDescriptorToSecurityDescriptor( - SECURITY_DESCRIPTOR_RELATIVE* SecurityDescriptor, - LPDWORD cBytes); - static DWORD ParseAclStringFlags(LPCWSTR* StringAcl); +@@ -48,6 +48,7 @@ + WINE_DEFAULT_DEBUG_CHANNEL(advapi); + + static BOOL ParseStringSidToSid(LPCWSTR StringSid, PSID pSid, LPDWORD cBytes); +static DWORD trustee_to_sid(DWORD nDestinationSidLength, PSID pDestinationSid, PTRUSTEEW pTrustee); typedef struct _ACEFLAG { -@@ -1264,16 +1265,122 @@ DWORD WINAPI BuildSecurityDescriptorW( +@@ -1255,16 +1256,122 @@ DWORD WINAPI BuildSecurityDescriptorW( IN ULONG cCountOfAccessEntries, IN PEXPLICIT_ACCESSW pListOfAccessEntries, IN ULONG cCountOfAuditEntries, @@ -147,7 +147,7 @@ index 24ec3099713..82bb6689d43 100644 } /****************************************************************************** -@@ -3766,6 +3873,56 @@ static void free_trustee_name(TRUSTEE_FORM form, WCHAR *trustee_nameW) +@@ -3754,6 +3861,56 @@ static void free_trustee_name(TRUSTEE_FORM form, WCHAR *trustee_nameW) } } @@ -204,7 +204,7 @@ index 24ec3099713..82bb6689d43 100644 /****************************************************************************** * SetEntriesInAclA [ADVAPI32.@] */ -@@ -3861,56 +4018,9 @@ DWORD WINAPI SetEntriesInAclW( ULONG count, PEXPLICIT_ACCESSW pEntries, +@@ -3849,56 +4006,9 @@ DWORD WINAPI SetEntriesInAclW( ULONG count, PEXPLICIT_ACCESSW pEntries, pEntries[i].Trustee.TrusteeForm, pEntries[i].Trustee.TrusteeType, pEntries[i].Trustee.ptstrName); @@ -264,5 +264,5 @@ index 24ec3099713..82bb6689d43 100644 /* Note: we overestimate the ACL size here as a tradeoff between * instructions (simplicity) and memory */ -- -2.12.2 +1.9.1 diff --git a/patches/advapi32-GetExplicitEntriesFromAclW/0001-advapi32-Implement-GetExplicitEntriesFromAclW.patch b/patches/advapi32-GetExplicitEntriesFromAclW/0001-advapi32-Implement-GetExplicitEntriesFromAclW.patch deleted file mode 100644 index af843d27..00000000 --- a/patches/advapi32-GetExplicitEntriesFromAclW/0001-advapi32-Implement-GetExplicitEntriesFromAclW.patch +++ /dev/null @@ -1,279 +0,0 @@ -From 510d9f43f441bc3a9723aabfd2c1cdc8737d6dcc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Sun, 28 Aug 2016 21:56:41 +0200 -Subject: advapi32: Implement GetExplicitEntriesFromAclW. - ---- - dlls/advapi32/security.c | 81 ++++++++++++++++++++++- - dlls/advapi32/tests/security.c | 142 +++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 221 insertions(+), 2 deletions(-) - -diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c -index e36792cff4..b305947347 100644 ---- a/dlls/advapi32/security.c -+++ b/dlls/advapi32/security.c -@@ -4205,8 +4205,85 @@ DWORD WINAPI GetExplicitEntriesFromAclA( PACL pacl, PULONG pcCountOfExplicitEntr - DWORD WINAPI GetExplicitEntriesFromAclW( PACL pacl, PULONG pcCountOfExplicitEntries, - PEXPLICIT_ACCESSW* pListOfExplicitEntries) - { -- FIXME("%p %p %p\n",pacl, pcCountOfExplicitEntries, pListOfExplicitEntries); -- return ERROR_CALL_NOT_IMPLEMENTED; -+ ACL_SIZE_INFORMATION sizeinfo; -+ EXPLICIT_ACCESSW* entries; -+ MAX_SID *sid_entries; -+ ACE_HEADER *ace; -+ NTSTATUS status; -+ int i; -+ -+ FIXME("%p %p %p: semi-stub\n",pacl, pcCountOfExplicitEntries, pListOfExplicitEntries); -+ -+ if (!pcCountOfExplicitEntries || !pListOfExplicitEntries) -+ return ERROR_INVALID_PARAMETER; -+ -+ status = RtlQueryInformationAcl(pacl, &sizeinfo, sizeof(sizeinfo), AclSizeInformation); -+ if (status) return RtlNtStatusToDosError(status); -+ -+ if (!sizeinfo.AceCount) -+ { -+ *pcCountOfExplicitEntries = 0; -+ *pListOfExplicitEntries = NULL; -+ return ERROR_SUCCESS; -+ } -+ -+ entries = LocalAlloc(LMEM_FIXED | LMEM_ZEROINIT, (sizeof(EXPLICIT_ACCESSW) + sizeof(MAX_SID)) * sizeinfo.AceCount); -+ if (!entries) return ERROR_OUTOFMEMORY; -+ sid_entries = (MAX_SID*)((char*)entries + sizeof(EXPLICIT_ACCESSW) * sizeinfo.AceCount); -+ -+ for (i = 0; i < sizeinfo.AceCount; i++) -+ { -+ status = RtlGetAce(pacl, i, (void**)&ace); -+ if (status) goto error; -+ -+ switch (ace->AceType) -+ { -+ case ACCESS_ALLOWED_ACE_TYPE: -+ { -+ ACCESS_ALLOWED_ACE *allow = (ACCESS_ALLOWED_ACE *)ace; -+ entries[i].grfAccessMode = GRANT_ACCESS; -+ entries[i].grfInheritance = ace->AceFlags; -+ entries[i].grfAccessPermissions = allow->Mask; -+ -+ CopySid(sizeof(MAX_SID), (PSID)&sid_entries[i], (PSID)&allow->SidStart); -+ entries[i].Trustee.pMultipleTrustee = NULL; -+ entries[i].Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; -+ entries[i].Trustee.TrusteeForm = TRUSTEE_IS_SID; -+ entries[i].Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN; -+ entries[i].Trustee.ptstrName = (WCHAR *)&sid_entries[i]; -+ break; -+ } -+ -+ case ACCESS_DENIED_ACE_TYPE: -+ { -+ ACCESS_DENIED_ACE *deny = (ACCESS_DENIED_ACE *)ace; -+ entries[i].grfAccessMode = DENY_ACCESS; -+ entries[i].grfInheritance = ace->AceFlags; -+ entries[i].grfAccessPermissions = deny->Mask; -+ -+ CopySid(sizeof(MAX_SID), (PSID)&sid_entries[i], (PSID)&deny->SidStart); -+ entries[i].Trustee.pMultipleTrustee = NULL; -+ entries[i].Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; -+ entries[i].Trustee.TrusteeForm = TRUSTEE_IS_SID; -+ entries[i].Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN; -+ entries[i].Trustee.ptstrName = (WCHAR *)&sid_entries[i]; -+ break; -+ } -+ -+ default: -+ FIXME("Unhandled ace type %d\n", ace->AceType); -+ entries[i].grfAccessMode = NOT_USED_ACCESS; -+ continue; -+ } -+ } -+ -+ *pcCountOfExplicitEntries = sizeinfo.AceCount; -+ *pListOfExplicitEntries = entries; -+ return ERROR_SUCCESS; -+ -+error: -+ LocalFree(entries); -+ return RtlNtStatusToDosError(status); - } - - /****************************************************************************** -diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c -index 3c68205922..ca5edffae5 100644 ---- a/dlls/advapi32/tests/security.c -+++ b/dlls/advapi32/tests/security.c -@@ -134,6 +134,7 @@ static BOOL (WINAPI *pGetWindowsAccountDomainSid)(PSID,PSID,DWORD*); - static void (WINAPI *pRtlInitAnsiString)(PANSI_STRING,PCSZ); - static NTSTATUS (WINAPI *pRtlFreeUnicodeString)(PUNICODE_STRING); - static PSID_IDENTIFIER_AUTHORITY (WINAPI *pGetSidIdentifierAuthority)(PSID); -+static DWORD (WINAPI *pGetExplicitEntriesFromAclW)(PACL,PULONG,PEXPLICIT_ACCESSW*); - - static HMODULE hmod; - static int myARGC; -@@ -230,6 +231,7 @@ static void init(void) - pGetWindowsAccountDomainSid = (void *)GetProcAddress(hmod, "GetWindowsAccountDomainSid"); - pGetSidIdentifierAuthority = (void *)GetProcAddress(hmod, "GetSidIdentifierAuthority"); - pDuplicateTokenEx = (void *)GetProcAddress(hmod, "DuplicateTokenEx"); -+ pGetExplicitEntriesFromAclW = (void *)GetProcAddress(hmod, "GetExplicitEntriesFromAclW"); - - myARGC = winetest_get_mainargs( &myARGV ); - } -@@ -7076,6 +7078,145 @@ static void test_child_token_sd(void) - HeapFree(GetProcessHeap(), 0, sd); - } - -+static void test_GetExplicitEntriesFromAclW(void) -+{ -+ static const WCHAR wszCurrentUser[] = { 'C','U','R','R','E','N','T','_','U','S','E','R','\0'}; -+ SID_IDENTIFIER_AUTHORITY SIDAuthWorld = { SECURITY_WORLD_SID_AUTHORITY }; -+ SID_IDENTIFIER_AUTHORITY SIDAuthNT = { SECURITY_NT_AUTHORITY }; -+ PSID everyone_sid = NULL, users_sid = NULL; -+ EXPLICIT_ACCESSW access; -+ EXPLICIT_ACCESSW *access2; -+ PACL new_acl, old_acl = NULL; -+ ULONG count; -+ DWORD res; -+ -+ if (!pGetExplicitEntriesFromAclW) -+ { -+ win_skip("GetExplicitEntriesFromAclW is not available\n"); -+ return; -+ } -+ -+ if (!pSetEntriesInAclW) -+ { -+ win_skip("SetEntriesInAclW is not available\n"); -+ return; -+ } -+ -+ old_acl = HeapAlloc(GetProcessHeap(), 0, 256); -+ res = InitializeAcl(old_acl, 256, ACL_REVISION); -+ if(!res && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) -+ { -+ win_skip("ACLs not implemented - skipping tests\n"); -+ HeapFree(GetProcessHeap(), 0, old_acl); -+ return; -+ } -+ ok(res, "InitializeAcl failed with error %d\n", GetLastError()); -+ -+ res = AllocateAndInitializeSid(&SIDAuthWorld, 1, SECURITY_WORLD_RID, 0, 0, 0, 0, 0, 0, 0, &everyone_sid); -+ ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); -+ -+ res = AllocateAndInitializeSid(&SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, -+ DOMAIN_ALIAS_RID_USERS, 0, 0, 0, 0, 0, 0, &users_sid); -+ ok(res, "AllocateAndInitializeSid failed with error %d\n", GetLastError()); -+ -+ res = AddAccessAllowedAce(old_acl, ACL_REVISION, KEY_READ, users_sid); -+ ok(res, "AddAccessAllowedAce failed with error %d\n", GetLastError()); -+ -+ access2 = NULL; -+ res = pGetExplicitEntriesFromAclW(old_acl, &count, &access2); -+ ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %d\n", GetLastError()); -+ ok(count == 1, "Expected count == 1, got %d\n", count); -+ ok(access2[0].grfAccessMode == GRANT_ACCESS, "Expected GRANT_ACCESS, got %d\n", access2[0].grfAccessMode); -+ ok(access2[0].grfAccessPermissions == KEY_READ, "Expected KEY_READ, got %d\n", access2[0].grfAccessPermissions); -+ ok(access2[0].Trustee.TrusteeForm == TRUSTEE_IS_SID, "Expected SID trustee, got %d\n", access2[0].Trustee.TrusteeForm); -+ ok(access2[0].grfInheritance == NO_INHERITANCE, "Expected NO_INHERITANCE, got %x\n", access2[0].grfInheritance); -+ ok(EqualSid(access2[0].Trustee.ptstrName, users_sid), "Expected equal SIDs\n"); -+ LocalFree(access2); -+ -+ access.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; -+ access.Trustee.pMultipleTrustee = NULL; -+ -+ access.grfAccessPermissions = KEY_WRITE; -+ access.grfAccessMode = GRANT_ACCESS; -+ access.grfInheritance = NO_INHERITANCE; -+ access.Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP; -+ access.Trustee.TrusteeForm = TRUSTEE_IS_SID; -+ access.Trustee.ptstrName = everyone_sid; -+ res = pSetEntriesInAclW(1, &access, old_acl, &new_acl); -+ ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); -+ ok(new_acl != NULL, "returned acl was NULL\n"); -+ -+ access2 = NULL; -+ res = pGetExplicitEntriesFromAclW(new_acl, &count, &access2); -+ ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %d\n", GetLastError()); -+ ok(count == 2, "Expected count == 2, got %d\n", count); -+ ok(access2[0].grfAccessMode == GRANT_ACCESS, "Expected GRANT_ACCESS, got %d\n", access2[0].grfAccessMode); -+ ok(access2[0].grfAccessPermissions == KEY_WRITE, "Expected KEY_WRITE, got %d\n", access2[0].grfAccessPermissions); -+ ok(access2[0].Trustee.TrusteeType == TRUSTEE_IS_UNKNOWN, -+ "Expected TRUSTEE_IS_UNKNOWN trustee type, got %d\n", access2[0].Trustee.TrusteeType); -+ ok(access2[0].Trustee.TrusteeForm == TRUSTEE_IS_SID, "Expected SID trustee, got %d\n", access2[0].Trustee.TrusteeForm); -+ ok(access2[0].grfInheritance == NO_INHERITANCE, "Expected NO_INHERITANCE, got %x\n", access2[0].grfInheritance); -+ ok(EqualSid(access2[0].Trustee.ptstrName, everyone_sid), "Expected equal SIDs\n"); -+ LocalFree(access2); -+ LocalFree(new_acl); -+ -+ access.Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN; -+ res = pSetEntriesInAclW(1, &access, old_acl, &new_acl); -+ ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); -+ ok(new_acl != NULL, "returned acl was NULL\n"); -+ -+ access2 = NULL; -+ res = pGetExplicitEntriesFromAclW(new_acl, &count, &access2); -+ ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %d\n", GetLastError()); -+ ok(count == 2, "Expected count == 2, got %d\n", count); -+ ok(access2[0].grfAccessMode == GRANT_ACCESS, "Expected GRANT_ACCESS, got %d\n", access2[0].grfAccessMode); -+ ok(access2[0].grfAccessPermissions == KEY_WRITE, "Expected KEY_WRITE, got %d\n", access2[0].grfAccessPermissions); -+ ok(access2[0].Trustee.TrusteeType == TRUSTEE_IS_UNKNOWN, -+ "Expected TRUSTEE_IS_UNKNOWN trustee type, got %d\n", access2[0].Trustee.TrusteeType); -+ ok(access2[0].Trustee.TrusteeForm == TRUSTEE_IS_SID, "Expected SID trustee, got %d\n", access2[0].Trustee.TrusteeForm); -+ ok(access2[0].grfInheritance == NO_INHERITANCE, "Expected NO_INHERITANCE, got %x\n", access2[0].grfInheritance); -+ ok(EqualSid(access2[0].Trustee.ptstrName, everyone_sid), "Expected equal SIDs\n"); -+ LocalFree(access2); -+ LocalFree(new_acl); -+ -+ access.Trustee.TrusteeForm = TRUSTEE_IS_NAME; -+ access.Trustee.ptstrName = (LPWSTR)wszCurrentUser; -+ res = pSetEntriesInAclW(1, &access, old_acl, &new_acl); -+ ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); -+ ok(new_acl != NULL, "returned acl was NULL\n"); -+ -+ access2 = NULL; -+ res = pGetExplicitEntriesFromAclW(new_acl, &count, &access2); -+ ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %d\n", GetLastError()); -+ ok(count == 2, "Expected count == 2, got %d\n", count); -+ ok(access2[0].grfAccessMode == GRANT_ACCESS, "Expected GRANT_ACCESS, got %d\n", access2[0].grfAccessMode); -+ ok(access2[0].grfAccessPermissions == KEY_WRITE, "Expected KEY_WRITE, got %d\n", access2[0].grfAccessPermissions); -+ ok(access2[0].Trustee.TrusteeType == TRUSTEE_IS_UNKNOWN, -+ "Expected TRUSTEE_IS_UNKNOWN trustee type, got %d\n", access2[0].Trustee.TrusteeType); -+ ok(access2[0].Trustee.TrusteeForm == TRUSTEE_IS_SID, "Expected SID trustee, got %d\n", access2[0].Trustee.TrusteeForm); -+ ok(access2[0].grfInheritance == NO_INHERITANCE, "Expected NO_INHERITANCE, got %x\n", access2[0].grfInheritance); -+ LocalFree(access2); -+ LocalFree(new_acl); -+ -+ access.grfAccessMode = REVOKE_ACCESS; -+ access.Trustee.TrusteeForm = TRUSTEE_IS_SID; -+ access.Trustee.ptstrName = users_sid; -+ res = pSetEntriesInAclW(1, &access, old_acl, &new_acl); -+ ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); -+ ok(new_acl != NULL, "returned acl was NULL\n"); -+ -+ access2 = (void *)0xdeadbeef; -+ res = pGetExplicitEntriesFromAclW(new_acl, &count, &access2); -+ ok(res == ERROR_SUCCESS, "GetExplicitEntriesFromAclW failed with error %d\n", GetLastError()); -+ ok(count == 0, "Expected count == 0, got %d\n", count); -+ ok(access2 == NULL, "access2 was not NULL\n"); -+ LocalFree(new_acl); -+ -+ FreeSid(users_sid); -+ FreeSid(everyone_sid); -+ HeapFree(GetProcessHeap(), 0, old_acl); -+} -+ - START_TEST(security) - { - init(); -@@ -7129,6 +7270,7 @@ START_TEST(security) - test_pseudo_tokens(); - test_maximum_allowed(); - test_token_label(); -+ test_GetExplicitEntriesFromAclW(); - - /* Must be the last test, modifies process token */ - test_token_security_descriptor(); --- -2.13.1 - diff --git a/patches/advapi32-GetExplicitEntriesFromAclW/definition b/patches/advapi32-GetExplicitEntriesFromAclW/definition deleted file mode 100644 index 8d58f7bc..00000000 --- a/patches/advapi32-GetExplicitEntriesFromAclW/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: Implement semi-stub for advapi32.GetExplicitEntriesFromAclW diff --git a/patches/api-ms-win-Stub_DLLs/0007-shcore-Add-dll.patch b/patches/api-ms-win-Stub_DLLs/0007-shcore-Add-dll.patch deleted file mode 100644 index 5b9e3695..00000000 --- a/patches/api-ms-win-Stub_DLLs/0007-shcore-Add-dll.patch +++ /dev/null @@ -1,141 +0,0 @@ -From 8f6353a291eaa4d1b61d2063c93a294b7deef7a7 Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Sun, 17 Jan 2016 20:17:46 +0100 -Subject: shcore: Add dll. - ---- - configure.ac | 1 + - dlls/shcore/Makefile.in | 1 + - dlls/shcore/shcore.spec | 83 +++++++++++++++++++++++++++++++++++++++++++++++++ - tools/make_specfiles | 5 +++ - 4 files changed, 90 insertions(+) - create mode 100644 dlls/shcore/Makefile.in - create mode 100644 dlls/shcore/shcore.spec - -diff --git a/configure.ac b/configure.ac -index 04015a1..557f26b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3289,6 +3289,7 @@ WINE_CONFIG_TEST(dlls/setupapi/tests) - WINE_CONFIG_DLL(setupx.dll16,enable_win16) - WINE_CONFIG_DLL(sfc,,[implib]) - WINE_CONFIG_DLL(sfc_os,,[implib]) -+WINE_CONFIG_DLL(shcore) - WINE_CONFIG_DLL(shdoclc,,[clean]) - WINE_CONFIG_DLL(shdocvw,,[clean,implib]) - WINE_CONFIG_TEST(dlls/shdocvw/tests) -diff --git a/dlls/shcore/Makefile.in b/dlls/shcore/Makefile.in -new file mode 100644 -index 0000000..dd5f08f ---- /dev/null -+++ b/dlls/shcore/Makefile.in -@@ -0,0 +1 @@ -+MODULE = shcore.dll -diff --git a/dlls/shcore/shcore.spec b/dlls/shcore/shcore.spec -new file mode 100644 -index 0000000..12a4ef3 ---- /dev/null -+++ b/dlls/shcore/shcore.spec -@@ -0,0 +1,83 @@ -+@ stdcall CommandLineToArgvW(wstr ptr) shell32.CommandLineToArgvW -+@ stub CreateRandomAccessStreamOnFile -+@ stub CreateRandomAccessStreamOverStream -+@ stub CreateStreamOverRandomAccessStream -+@ stdcall -private DllCanUnloadNow() shell32.DllCanUnloadNow -+@ stub DllGetActivationFactory -+@ stdcall -private DllGetClassObject(ptr ptr ptr) shell32.DllGetClassObject -+@ stdcall GetCurrentProcessExplicitAppUserModelID(ptr) shell32.GetCurrentProcessExplicitAppUserModelID -+@ stub GetDpiForMonitor -+@ stub GetDpiForShellUIComponent -+@ stub GetProcessDpiAwareness -+@ stub GetProcessReference -+@ stub GetScaleFactorForDevice -+@ stub GetScaleFactorForMonitor -+@ stub IStream_Copy -+@ stdcall IStream_Read(ptr ptr long) shlwapi.IStream_Read -+@ stub IStream_ReadStr -+@ stdcall IStream_Reset(ptr) shlwapi.IStream_Reset -+@ stdcall IStream_Size(ptr ptr) shlwapi.IStream_Size -+@ stdcall IStream_Write(ptr ptr long) shlwapi.IStream_Write -+@ stub IStream_WriteStr -+@ stdcall IUnknown_AtomicRelease(long) shlwapi.IUnknown_AtomicRelease -+@ stdcall IUnknown_GetSite(ptr ptr ptr) shlwapi.IUnknown_GetSite -+@ stdcall IUnknown_QueryService(ptr ptr ptr ptr) shlwapi.IUnknown_QueryService -+@ stdcall IUnknown_Set(ptr ptr) shlwapi.IUnknown_Set -+@ stdcall IUnknown_SetSite(ptr ptr) shlwapi.IUnknown_SetSite -+@ stdcall IsOS(long) shlwapi.IsOS -+@ stub RegisterScaleChangeEvent -+@ stub RegisterScaleChangeNotifications -+@ stub RevokeScaleChangeNotifications -+@ stdcall SHAnsiToAnsi(str ptr long) shlwapi.SHAnsiToAnsi -+@ stdcall SHAnsiToUnicode(str ptr long) shlwapi.SHAnsiToUnicode -+@ stdcall SHCopyKeyA(long str long long) shlwapi.SHCopyKeyA -+@ stdcall SHCopyKeyW(long wstr long long) shlwapi.SHCopyKeyW -+@ stdcall SHCreateMemStream(ptr long) shlwapi.SHCreateMemStream -+@ stdcall SHCreateStreamOnFileA(str long ptr) shlwapi.SHCreateStreamOnFileA -+@ stdcall SHCreateStreamOnFileEx(wstr long long long ptr ptr) shlwapi.SHCreateStreamOnFileEx -+@ stdcall SHCreateStreamOnFileW(wstr long ptr) shlwapi.SHCreateStreamOnFileW -+@ stdcall SHCreateThread(ptr ptr long ptr) shlwapi.SHCreateThread -+@ stdcall SHCreateThreadRef(ptr ptr) shlwapi.SHCreateThreadRef -+@ stub SHCreateThreadWithHandle -+@ stdcall SHDeleteEmptyKeyA(long ptr) shlwapi.SHDeleteEmptyKeyA -+@ stdcall SHDeleteEmptyKeyW(long ptr) shlwapi.SHDeleteEmptyKeyW -+@ stdcall SHDeleteKeyA(long str) shlwapi.SHDeleteKeyA -+@ stdcall SHDeleteKeyW(long wstr) shlwapi.SHDeleteKeyW -+@ stdcall SHDeleteValueA(long str str) shlwapi.SHDeleteValueA -+@ stdcall SHDeleteValueW(long wstr wstr) shlwapi.SHDeleteValueW -+@ stdcall SHEnumKeyExA(long long str ptr) shlwapi.SHEnumKeyExA -+@ stdcall SHEnumKeyExW(long long wstr ptr) shlwapi.SHEnumKeyExW -+@ stdcall SHEnumValueA(long long str ptr ptr ptr ptr) shlwapi.SHEnumValueA -+@ stdcall SHEnumValueW(long long wstr ptr ptr ptr ptr) shlwapi.SHEnumValueW -+@ stdcall SHGetThreadRef(ptr) shlwapi.SHGetThreadRef -+@ stdcall SHGetValueA( long str str ptr ptr ptr ) shlwapi.SHGetValueA -+@ stdcall SHGetValueW( long wstr wstr ptr ptr ptr ) shlwapi.SHGetValueW -+@ stdcall SHOpenRegStream2A(long str str long) shlwapi.SHOpenRegStream2A -+@ stdcall SHOpenRegStream2W(long wstr wstr long) shlwapi.SHOpenRegStream2W -+@ stdcall SHOpenRegStreamA(long str str long) shlwapi.SHOpenRegStreamA -+@ stdcall SHOpenRegStreamW(long wstr wstr long) shlwapi.SHOpenRegStreamW -+@ stdcall SHQueryInfoKeyA(long ptr ptr ptr ptr) shlwapi.SHQueryInfoKeyA -+@ stdcall SHQueryInfoKeyW(long ptr ptr ptr ptr) shlwapi.SHQueryInfoKeyW -+@ stdcall SHQueryValueExA(long str ptr ptr ptr ptr) shlwapi.SHQueryValueExA -+@ stdcall SHQueryValueExW(long wstr ptr ptr ptr ptr) shlwapi.SHQueryValueExW -+@ stdcall SHRegDuplicateHKey(long) shlwapi.SHRegDuplicateHKey -+@ stdcall SHRegGetIntW(ptr wstr long) shlwapi.SHRegGetIntW -+@ stdcall SHRegGetPathA(long str str ptr long) shlwapi.SHRegGetPathA -+@ stdcall SHRegGetPathW(long wstr wstr ptr long) shlwapi.SHRegGetPathW -+@ stdcall SHRegGetValueA( long str str long ptr ptr ptr ) shlwapi.SHRegGetValueA -+@ stub SHRegGetValueFromHKCUHKLM -+@ stdcall SHRegGetValueW( long wstr wstr long ptr ptr ptr ) shlwapi.SHRegGetValueW -+@ stdcall SHRegSetPathA(long str str str long) shlwapi.SHRegSetPathA -+@ stdcall SHRegSetPathW(long wstr wstr wstr long) shlwapi.SHRegSetPathW -+@ stdcall SHReleaseThreadRef() shlwapi.SHReleaseThreadRef -+@ stdcall SHSetThreadRef(ptr) shlwapi.SHSetThreadRef -+@ stdcall SHSetValueA(long str str long ptr long) shlwapi.SHSetValueA -+@ stdcall SHSetValueW(long wstr wstr long ptr long) shlwapi.SHSetValueW -+@ stdcall SHStrDupA(str ptr) shlwapi.SHStrDupA -+@ stdcall SHStrDupW(wstr ptr) shlwapi.SHStrDupW -+@ stdcall SHUnicodeToAnsi(wstr ptr ptr) shlwapi.SHUnicodeToAnsi -+@ stdcall SHUnicodeToUnicode(wstr ptr long) shlwapi.SHUnicodeToUnicode -+@ stdcall SetCurrentProcessExplicitAppUserModelID(wstr) shell32.SetCurrentProcessExplicitAppUserModelID -+@ stub SetProcessDpiAwareness -+@ stub SetProcessReference -+@ stub UnregisterScaleChangeEvent -diff --git a/tools/make_specfiles b/tools/make_specfiles -index 2c64243..611aaca 100755 ---- a/tools/make_specfiles -+++ b/tools/make_specfiles -@@ -238,6 +238,11 @@ my @dll_groups = - "api-ms-win-core-url-l1-1-0", - ], - [ -+ "shell32", -+ "shlwapi", -+ "shcore", -+ ], -+ [ - "user32", - "api-ms-win-core-stringansi-l1-1-0", - "api-ms-win-core-string-l2-1-0", --- -2.9.0 - diff --git a/patches/combase-RoApi/0001-include-Add-activation.idl-with-IActivationFactory-i.patch b/patches/combase-RoApi/0001-include-Add-activation.idl-with-IActivationFactory-i.patch deleted file mode 100644 index cfd00190..00000000 --- a/patches/combase-RoApi/0001-include-Add-activation.idl-with-IActivationFactory-i.patch +++ /dev/null @@ -1,62 +0,0 @@ -From dd6fc285ffa83e8eb9dce0aa482df44288faa2ea Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Sun, 17 Jan 2016 01:36:08 +0100 -Subject: include: Add activation.idl with IActivationFactory interface. - ---- - include/Makefile.in | 1 + - include/activation.idl | 31 +++++++++++++++++++++++++++++++ - 2 files changed, 32 insertions(+) - create mode 100644 include/activation.idl - -diff --git a/include/Makefile.in b/include/Makefile.in -index 129ff6d..14e934c 100644 ---- a/include/Makefile.in -+++ b/include/Makefile.in -@@ -1,5 +1,6 @@ - IDL_SRCS = \ - access.idl \ -+ activation.idl \ - activaut.idl \ - activdbg.idl \ - activscp.idl \ -diff --git a/include/activation.idl b/include/activation.idl -new file mode 100644 -index 0000000..b86c9f6 ---- /dev/null -+++ b/include/activation.idl -@@ -0,0 +1,31 @@ -+/* -+ * Copyright 2016 Michael Müller -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA -+ */ -+ -+#ifndef DO_NO_IMPORTS -+import "inspectable.idl"; -+#endif -+ -+[ -+ object, -+ uuid(00000035-0000-0000-c000-000000000046), -+ pointer_default(unique) -+] -+interface IActivationFactory : IInspectable -+{ -+ HRESULT ActivateInstance([out] IInspectable **instance); -+} --- -2.6.4 - diff --git a/patches/combase-RoApi/0002-include-roapi.h-Add-further-typedefs.patch b/patches/combase-RoApi/0002-include-roapi.h-Add-further-typedefs.patch index da5c494f..ae861ff8 100644 --- a/patches/combase-RoApi/0002-include-roapi.h-Add-further-typedefs.patch +++ b/patches/combase-RoApi/0002-include-roapi.h-Add-further-typedefs.patch @@ -1,7 +1,7 @@ -From ab3de1775fa8321218d5712b7562b8575a222a31 Mon Sep 17 00:00:00 2001 +From 4e75102aea7a341d58ca1326639b3d4b795e82d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 17 Jan 2016 01:37:09 +0100 -Subject: include/roapi.h: Add further typedefs. +Subject: [PATCH 1/7] include/roapi.h: Add further typedefs. --- include/roapi.h | 7 +++++++ @@ -39,5 +39,5 @@ index 0421fe9..f4154f8 100644 extern "C" { #endif -- -2.6.4 +1.9.1 diff --git a/patches/combase-RoApi/0003-combase-Implement-RoGetActivationFactory.patch b/patches/combase-RoApi/0003-combase-Implement-RoGetActivationFactory.patch deleted file mode 100644 index f3744e50..00000000 --- a/patches/combase-RoApi/0003-combase-Implement-RoGetActivationFactory.patch +++ /dev/null @@ -1,190 +0,0 @@ -From a197dcbcf3f89fecd23028760bdc57502e0c7633 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Sun, 17 Jan 2016 01:42:05 +0100 -Subject: combase: Implement RoGetActivationFactory. - ---- - dlls/combase/Makefile.in | 2 +- - dlls/combase/roapi.c | 137 +++++++++++++++++++++++++++++++++++++++++++++-- - 2 files changed, 134 insertions(+), 5 deletions(-) - -diff --git a/dlls/combase/Makefile.in b/dlls/combase/Makefile.in -index c5ab8d2..cf17a36 100644 ---- a/dlls/combase/Makefile.in -+++ b/dlls/combase/Makefile.in -@@ -1,5 +1,5 @@ - MODULE = combase.dll --IMPORTS = ole32 -+IMPORTS = advapi32 ole32 - - C_SRCS = \ - roapi.c \ -diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c -index a2dfd54..6fd4df5 100644 ---- a/dlls/combase/roapi.c -+++ b/dlls/combase/roapi.c -@@ -1,5 +1,6 @@ - /* - * Copyright 2014 Martin Storsjo -+ * Copyright 2016 Michael Müller - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -17,13 +18,93 @@ - */ - - #include "objbase.h" -+#include "initguid.h" -+#define COBJMACROS - #include "roapi.h" --#include "hstring.h" -+#include "winstring.h" - - #include "wine/debug.h" - - WINE_DEFAULT_DEBUG_CHANNEL(combase); - -+static const char *debugstr_hstring(HSTRING hstr) -+{ -+ const WCHAR *str; -+ UINT32 len; -+ if (hstr && !((ULONG_PTR)hstr >> 16)) return "(invalid)"; -+ str = WindowsGetStringRawBuffer(hstr, &len); -+ return wine_dbgstr_wn(str, len); -+} -+ -+static HRESULT get_library_for_classid(const WCHAR *classid, WCHAR **out) -+{ -+ static const WCHAR classkeyW[] = {'S','o','f','t','w','a','r','e','\\', -+ 'M','i','c','r','o','s','o','f','t','\\', -+ 'W','i','n','d','o','w','s','R','u','n','t','i','m','e','\\', -+ 'A','c','t','i','v','a','t','a','b','l','e','C','l','a','s','s','I','d',0}; -+ static const WCHAR dllpathW[] = {'D','l','l','P','a','t','h',0}; -+ HKEY hkey_root, hkey_class; -+ DWORD type, size; -+ HRESULT hr; -+ WCHAR *buf = NULL; -+ -+ *out = NULL; -+ -+ /* load class registry key */ -+ if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, classkeyW, 0, KEY_READ, &hkey_root)) -+ return REGDB_E_READREGDB; -+ if (RegOpenKeyExW(hkey_root, classid, 0, KEY_READ, &hkey_class)) -+ { -+ WARN("Class %s not found in registry\n", debugstr_w(classid)); -+ RegCloseKey(hkey_root); -+ return REGDB_E_CLASSNOTREG; -+ } -+ RegCloseKey(hkey_root); -+ -+ /* load (and expand) DllPath registry value */ -+ if (RegQueryValueExW(hkey_class, dllpathW, NULL, &type, NULL, &size)) -+ { -+ hr = REGDB_E_READREGDB; -+ goto done; -+ } -+ if (type != REG_SZ && type != REG_EXPAND_SZ) -+ { -+ hr = REGDB_E_READREGDB; -+ goto done; -+ } -+ if (!(buf = HeapAlloc(GetProcessHeap(), 0, size))) -+ { -+ hr = E_OUTOFMEMORY; -+ goto done; -+ } -+ if (RegQueryValueExW(hkey_class, dllpathW, NULL, NULL, (BYTE *)buf, &size)) -+ { -+ hr = REGDB_E_READREGDB; -+ goto done; -+ } -+ if (type == REG_EXPAND_SZ) -+ { -+ WCHAR *expanded; -+ DWORD len = ExpandEnvironmentStringsW(buf, NULL, 0); -+ if (!(expanded = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) -+ { -+ hr = E_OUTOFMEMORY; -+ goto done; -+ } -+ ExpandEnvironmentStringsW(buf, expanded, len); -+ HeapFree(GetProcessHeap(), 0, buf); -+ buf = expanded; -+ } -+ -+ *out = buf; -+ return S_OK; -+ -+done: -+ HeapFree(GetProcessHeap(), 0, buf); -+ RegCloseKey(hkey_class); -+ return hr; -+} -+ - /*********************************************************************** - * RoInitialize (combase.@) - */ -@@ -50,8 +131,56 @@ void WINAPI RoUninitialize(void) - /*********************************************************************** - * RoGetActivationFactory (combase.@) - */ --HRESULT WINAPI RoGetActivationFactory(HSTRING classid, REFIID iid, void **factory) -+HRESULT WINAPI RoGetActivationFactory(HSTRING classid, REFIID iid, void **class_factory) - { -- FIXME("stub: %p %p %p\n", classid, iid, factory); -- return E_NOTIMPL; -+ PFNGETACTIVATIONFACTORY pDllGetActivationFactory; -+ IActivationFactory *factory; -+ WCHAR *library; -+ HMODULE module; -+ HRESULT hr; -+ -+ FIXME("(%s, %s, %p): semi-stub\n", debugstr_hstring(classid), debugstr_guid(iid), class_factory); -+ -+ if (!iid || !class_factory) -+ return E_INVALIDARG; -+ -+ hr = get_library_for_classid(WindowsGetStringRawBuffer(classid, NULL), &library); -+ if (FAILED(hr)) -+ { -+ ERR("Failed to find library for %s\n", debugstr_hstring(classid)); -+ return hr; -+ } -+ -+ if (!(module = LoadLibraryW(library))) -+ { -+ ERR("Failed to load module %s\n", debugstr_w(library)); -+ hr = HRESULT_FROM_WIN32(GetLastError()); -+ goto done; -+ } -+ -+ if (!(pDllGetActivationFactory = (void *)GetProcAddress(module, "DllGetActivationFactory"))) -+ { -+ ERR("Module %s does not implement DllGetActivationFactory\n", debugstr_w(library)); -+ hr = E_FAIL; -+ goto done; -+ } -+ -+ TRACE("Found library %s for class %s\n", debugstr_w(library), debugstr_hstring(classid)); -+ -+ hr = pDllGetActivationFactory(classid, &factory); -+ if (SUCCEEDED(hr)) -+ { -+ hr = IActivationFactory_QueryInterface(factory, iid, class_factory); -+ if (SUCCEEDED(hr)) -+ { -+ TRACE("Created interface %p\n", *class_factory); -+ module = NULL; -+ } -+ IActivationFactory_Release(factory); -+ } -+ -+done: -+ HeapFree(GetProcessHeap(), 0, library); -+ if (module) FreeLibrary(module); -+ return hr; - } --- -2.6.4 - diff --git a/patches/combase-RoApi/0004-combase-Implement-RoActivateInstance.patch b/patches/combase-RoApi/0004-combase-Implement-RoActivateInstance.patch index 6ab76802..134cc46e 100644 --- a/patches/combase-RoApi/0004-combase-Implement-RoActivateInstance.patch +++ b/patches/combase-RoApi/0004-combase-Implement-RoActivateInstance.patch @@ -1,13 +1,13 @@ -From c78968d3484d613945a0ee33eeb4df5d96a7c406 Mon Sep 17 00:00:00 2001 +From 8274b8bb8f25d89c2f01b1724aed7e9e2eb5614b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 17 Jan 2016 01:45:30 +0100 -Subject: combase: Implement RoActivateInstance. +Subject: [PATCH 2/7] combase: Implement RoActivateInstance. --- - .../api-ms-win-core-winrt-l1-1-0.spec | 2 +- - dlls/combase/combase.spec | 2 +- - dlls/combase/roapi.c | 20 ++++++++++++++++++++ - 3 files changed, 22 insertions(+), 2 deletions(-) + .../api-ms-win-core-winrt-l1-1-0.spec | 2 +- + dlls/combase/combase.spec | 2 +- + dlls/combase/roapi.c | 24 +++++++++++++++++++++- + 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec b/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec index 74c9d27..978c3dc 100644 @@ -20,7 +20,7 @@ index 74c9d27..978c3dc 100644 @ stub RoGetApartmentIdentifier @ stdcall RoInitialize(long) combase.RoInitialize diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec -index 5082f39..9b1ab30 100644 +index c238eb8..f42bdae 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -242,7 +242,7 @@ @@ -33,12 +33,28 @@ index 5082f39..9b1ab30 100644 @ stub RoClearError @ stub RoFailFastWithErrorContext diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c -index 6fd4df5..695b6fd 100644 +index a2d62520..a272d2c 100644 --- a/dlls/combase/roapi.c +++ b/dlls/combase/roapi.c -@@ -184,3 +184,23 @@ done: - if (module) FreeLibrary(module); - return hr; +@@ -15,12 +15,14 @@ + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +- ++#define COBJMACROS + #include "objbase.h" ++#include "initguid.h" + #include "roapi.h" + #include "roparameterizediid.h" + #include "hstring.h" + ++ + #include "wine/debug.h" + + WINE_DEFAULT_DEBUG_CHANNEL(combase); +@@ -69,3 +71,23 @@ HRESULT WINAPI RoGetParameterizedTypeInstanceIID(UINT32 name_element_count, cons + if (hiid) *hiid = INVALID_HANDLE_VALUE; + return E_NOTIMPL; } + +/*********************************************************************** @@ -49,7 +65,7 @@ index 6fd4df5..695b6fd 100644 + IActivationFactory *factory; + HRESULT hr; + -+ FIXME("(%s, %p): semi-stub\n", debugstr_hstring(classid), instance); ++ FIXME("(%p, %p): semi-stub\n", classid, instance); + + hr = RoGetActivationFactory(classid, &IID_IActivationFactory, (void **)&factory); + if (SUCCEEDED(hr)) @@ -61,5 +77,5 @@ index 6fd4df5..695b6fd 100644 + return hr; +} -- -2.6.4 +1.9.1 diff --git a/patches/combase-RoApi/0005-combase-Add-stub-for-RoGetApartmentIdentifier.patch b/patches/combase-RoApi/0005-combase-Add-stub-for-RoGetApartmentIdentifier.patch index ef22cee6..b6e9816b 100644 --- a/patches/combase-RoApi/0005-combase-Add-stub-for-RoGetApartmentIdentifier.patch +++ b/patches/combase-RoApi/0005-combase-Add-stub-for-RoGetApartmentIdentifier.patch @@ -1,7 +1,7 @@ -From 493d757c594d0eccce55e29fc6e5ef574fc7446f Mon Sep 17 00:00:00 2001 +From 15be870f14039bb8c2d276640b4b40c558ddcc32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 17 Jan 2016 01:47:08 +0100 -Subject: combase: Add stub for RoGetApartmentIdentifier. +Subject: [PATCH 3/7] combase: Add stub for RoGetApartmentIdentifier. --- .../api-ms-win-core-winrt-l1-1-0.spec | 2 +- @@ -22,7 +22,7 @@ index 978c3dc..88139fb 100644 @ stub RoRegisterActivationFactories @ stub RoRegisterForApartmentShutdown diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec -index 9b1ab30..3bf0bf2 100644 +index f42bdae..ff89232 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -250,7 +250,7 @@ @@ -33,12 +33,12 @@ index 9b1ab30..3bf0bf2 100644 +@ stdcall RoGetApartmentIdentifier(ptr) @ stub RoGetErrorReportingFlags @ stub RoGetMatchingRestrictedErrorInfo - @ stub RoGetParameterizedTypeInstanceIID + @ stdcall RoGetParameterizedTypeInstanceIID(long ptr ptr ptr ptr) diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c -index 695b6fd..cd545f1 100644 +index a272d2c..1c0b373 100644 --- a/dlls/combase/roapi.c +++ b/dlls/combase/roapi.c -@@ -204,3 +204,17 @@ HRESULT WINAPI RoActivateInstance(HSTRING classid, IInspectable **instance) +@@ -91,3 +91,17 @@ HRESULT WINAPI RoActivateInstance(HSTRING classid, IInspectable **instance) return hr; } @@ -57,5 +57,5 @@ index 695b6fd..cd545f1 100644 + return S_OK; +} -- -2.6.4 +1.9.1 diff --git a/patches/combase-RoApi/0006-include-objidl.idl-Add-IApartmentShutdown-interface.patch b/patches/combase-RoApi/0006-include-objidl.idl-Add-IApartmentShutdown-interface.patch deleted file mode 100644 index 7dddff6a..00000000 --- a/patches/combase-RoApi/0006-include-objidl.idl-Add-IApartmentShutdown-interface.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 2ad226c2f25a9bd0130f5ae8393e719b37a36afc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Sun, 17 Jan 2016 02:00:04 +0100 -Subject: include/objidl.idl: Add IApartmentShutdown interface. - ---- - include/objidl.idl | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/include/objidl.idl b/include/objidl.idl -index c18442f..4388bab 100644 ---- a/include/objidl.idl -+++ b/include/objidl.idl -@@ -2451,6 +2451,17 @@ interface IDummyHICONIncluder : IUnknown - HRESULT Dummy([in] HICON hIcon, [in] HDC hdc); - } - -+[ -+ object, -+ local, -+ pointer_default(unique), -+ uuid(a2f05a09-27a2-42b5-bc0e-ac163ef49d9b) -+] -+interface IApartmentShutdown : IUnknown -+{ -+ void OnUninitialize([in] UINT64 identifier); -+} -+ - cpp_quote("#ifdef USE_COM_CONTEXT_DEF") - - typedef DWORD CPFLAGS; --- -2.6.4 - diff --git a/patches/combase-RoApi/0007-combase-Add-stub-for-RoRegisterForApartmentShutdown.patch b/patches/combase-RoApi/0007-combase-Add-stub-for-RoRegisterForApartmentShutdown.patch index bc0400c2..33ba0fb1 100644 --- a/patches/combase-RoApi/0007-combase-Add-stub-for-RoRegisterForApartmentShutdown.patch +++ b/patches/combase-RoApi/0007-combase-Add-stub-for-RoRegisterForApartmentShutdown.patch @@ -1,7 +1,7 @@ -From c57255b7bcbe0b456e4934de9fb0efa123e369ef Mon Sep 17 00:00:00 2001 +From fe7c55c675e474efd68fcf04ce18ae4c5891d38c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 17 Jan 2016 02:01:59 +0100 -Subject: combase: Add stub for RoRegisterForApartmentShutdown. +Subject: [PATCH 4/7] combase: Add stub for RoRegisterForApartmentShutdown. --- .../api-ms-win-core-winrt-l1-1-0.spec | 2 +- @@ -23,7 +23,7 @@ index 88139fb..d27130c 100644 @ stdcall RoUninitialize() combase.RoUninitialize @ stub RoUnregisterForApartmentShutdown diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec -index 3bf0bf2..7ae1f6e 100644 +index ff89232..ec4a6cd 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -263,7 +263,7 @@ @@ -36,10 +36,10 @@ index 3bf0bf2..7ae1f6e 100644 @ stub RoReportFailedDelegate @ stub RoReportUnhandledError diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c -index cd545f1..035fa47 100644 +index 1c0b373..d56ceb1 100644 --- a/dlls/combase/roapi.c +++ b/dlls/combase/roapi.c -@@ -218,3 +218,21 @@ HRESULT WINAPI RoGetApartmentIdentifier(UINT64 *identifier) +@@ -105,3 +105,21 @@ HRESULT WINAPI RoGetApartmentIdentifier(UINT64 *identifier) *identifier = 0xdeadbeef; return S_OK; } @@ -62,5 +62,5 @@ index cd545f1..035fa47 100644 + return S_OK; +} -- -2.6.4 +1.9.1 diff --git a/patches/combase-RoApi/0008-combase-Add-stub-for-RoGetServerActivatableClasses.patch b/patches/combase-RoApi/0008-combase-Add-stub-for-RoGetServerActivatableClasses.patch index 16990020..95ea0ab5 100644 --- a/patches/combase-RoApi/0008-combase-Add-stub-for-RoGetServerActivatableClasses.patch +++ b/patches/combase-RoApi/0008-combase-Add-stub-for-RoGetServerActivatableClasses.patch @@ -1,7 +1,7 @@ -From fa4ada9e3f3797b704cd8c033fff8f1a8bb25bac Mon Sep 17 00:00:00 2001 +From e3c49d6a259d63f43103174d78e1f90316fa27a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 17 Jan 2016 02:03:47 +0100 -Subject: combase: Add stub for RoGetServerActivatableClasses. +Subject: [PATCH 5/7] combase: Add stub for RoGetServerActivatableClasses. --- .../api-ms-win-core-winrt-registration-l1-1-0.spec | 2 +- @@ -18,23 +18,23 @@ index 350ac04..20c8d9c 100644 -@ stub RoGetServerActivatableClasses +@ stdcall RoGetServerActivatableClasses(ptr ptr ptr) combase.RoGetServerActivatableClasses diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec -index 0405a0e..fca0b2c 100644 +index ec4a6cd..c721f43 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -254,7 +254,7 @@ @ stub RoGetErrorReportingFlags @ stub RoGetMatchingRestrictedErrorInfo - @ stub RoGetParameterizedTypeInstanceIID + @ stdcall RoGetParameterizedTypeInstanceIID(long ptr ptr ptr ptr) -@ stub RoGetServerActivatableClasses +@ stdcall RoGetServerActivatableClasses(ptr ptr ptr) @ stdcall RoInitialize(long) @ stub RoInspectCapturedStackBackTrace @ stub RoInspectThreadErrorInfo diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c -index 035fa47..832ec67 100644 +index d56ceb1..2a228ce 100644 --- a/dlls/combase/roapi.c +++ b/dlls/combase/roapi.c -@@ -236,3 +236,14 @@ HRESULT WINAPI RoRegisterForApartmentShutdown(IApartmentShutdown *callback, +@@ -123,3 +123,14 @@ HRESULT WINAPI RoRegisterForApartmentShutdown(IApartmentShutdown *callback, *cookie = (void *)0xcafecafe; return S_OK; } @@ -44,11 +44,11 @@ index 035fa47..832ec67 100644 + */ +HRESULT WINAPI RoGetServerActivatableClasses(HSTRING name, HSTRING **classes, DWORD *count) +{ -+ FIXME("(%s, %p, %p): stub\n", debugstr_hstring(name), classes, count); ++ FIXME("(%p, %p, %p): stub\n", name, classes, count); + + *count = 0; + return S_OK; +} -- -2.7.1 +1.9.1 diff --git a/patches/combase-RoApi/0009-combase-Add-stub-for-RoRegisterActivationFactories.patch b/patches/combase-RoApi/0009-combase-Add-stub-for-RoRegisterActivationFactories.patch index b4e62f6a..968c076e 100644 --- a/patches/combase-RoApi/0009-combase-Add-stub-for-RoRegisterActivationFactories.patch +++ b/patches/combase-RoApi/0009-combase-Add-stub-for-RoRegisterActivationFactories.patch @@ -1,13 +1,13 @@ -From b13790d7bcd47d1bf1985258cc3ea6c4edb96d1f Mon Sep 17 00:00:00 2001 +From 30ad6da4756f20339d4f52b959a128fb231dbf14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 17 Jan 2016 02:20:39 +0100 -Subject: combase: Add stub for RoRegisterActivationFactories. +Subject: [PATCH 6/7] combase: Add stub for RoRegisterActivationFactories. --- - .../api-ms-win-core-winrt-l1-1-0.spec | 2 +- - dlls/combase/combase.spec | 2 +- - dlls/combase/roapi.c | 16 ++++++++++++++++ - 3 files changed, 18 insertions(+), 2 deletions(-) + .../api-ms-win-core-winrt-l1-1-0.spec | 2 +- + dlls/combase/combase.spec | 2 +- + dlls/combase/roapi.c | 11 +++++++++++ + 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec b/dlls/api-ms-win-core-winrt-l1-1-0/api-ms-win-core-winrt-l1-1-0.spec index d27130c..32b9474 100644 @@ -23,7 +23,7 @@ index d27130c..32b9474 100644 @ stub RoRevokeActivationFactories @ stdcall RoUninitialize() combase.RoUninitialize diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec -index 3a17e4a..7a0decd 100644 +index c721f43..72a7eb5 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -262,7 +262,7 @@ @@ -36,10 +36,10 @@ index 3a17e4a..7a0decd 100644 @ stub RoReportCapabilityCheckFailure @ stub RoReportFailedDelegate diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c -index 832ec67..e8629cd 100644 +index 2a228ce..ae063a2 100644 --- a/dlls/combase/roapi.c +++ b/dlls/combase/roapi.c -@@ -247,3 +247,19 @@ HRESULT WINAPI RoGetServerActivatableClasses(HSTRING name, HSTRING **classes, DW +@@ -134,3 +134,14 @@ HRESULT WINAPI RoGetServerActivatableClasses(HSTRING name, HSTRING **classes, DW *count = 0; return S_OK; } @@ -50,15 +50,10 @@ index 832ec67..e8629cd 100644 +HRESULT WINAPI RoRegisterActivationFactories(HSTRING *classes, PFNGETACTIVATIONFACTORY *callbacks, + UINT32 count, RO_REGISTRATION_COOKIE *cookie) +{ -+ UINT32 i; -+ + FIXME("(%p, %p, %d, %p): stub\n", classes, callbacks, count, cookie); + -+ for (i = 0; i < count; i++) -+ FIXME(" %s\n", debugstr_hstring(classes[i])); -+ + return S_OK; +} -- -2.6.4 +1.9.1 diff --git a/patches/combase-RoApi/0010-combase-Add-stub-for-CleanupTlsOleState.patch b/patches/combase-RoApi/0010-combase-Add-stub-for-CleanupTlsOleState.patch index ea6f24ea..2aa8526e 100644 --- a/patches/combase-RoApi/0010-combase-Add-stub-for-CleanupTlsOleState.patch +++ b/patches/combase-RoApi/0010-combase-Add-stub-for-CleanupTlsOleState.patch @@ -1,7 +1,7 @@ -From 718d3be80d5d8d89f3a120ee6c0a5977390cc26d Mon Sep 17 00:00:00 2001 +From a336f80cc6d83ae000d676ce641d1f3844229db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 17 Jan 2016 02:21:48 +0100 -Subject: combase: Add stub for CleanupTlsOleState. +Subject: [PATCH 7/7] combase: Add stub for CleanupTlsOleState. --- dlls/combase/combase.spec | 2 +- @@ -9,7 +9,7 @@ Subject: combase: Add stub for CleanupTlsOleState. 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec -index 7a0decd..d03287b 100644 +index 72a7eb5..c8a8dee 100644 --- a/dlls/combase/combase.spec +++ b/dlls/combase/combase.spec @@ -66,7 +66,7 @@ @@ -22,10 +22,10 @@ index 7a0decd..d03287b 100644 @ stdcall CoAddRefServerProcess() ole32.CoAddRefServerProcess @ stub CoAllowUnmarshalerCLSID diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c -index e8629cd..e838412 100644 +index ae063a2..3a81fb4 100644 --- a/dlls/combase/roapi.c +++ b/dlls/combase/roapi.c -@@ -263,3 +263,11 @@ HRESULT WINAPI RoRegisterActivationFactories(HSTRING *classes, PFNGETACTIVATIONF +@@ -145,3 +145,11 @@ HRESULT WINAPI RoRegisterActivationFactories(HSTRING *classes, PFNGETACTIVATIONF return S_OK; } @@ -38,5 +38,5 @@ index e8629cd..e838412 100644 + FIXME("(%p): stub\n", unknown); +} -- -2.6.4 +1.9.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 135ea221..ad955c87 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,14 +52,14 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "53290d2ec483006656987352d53842ffc1852c91" + echo "f9181daa1ddc2c10d3b6ddd4610bc1421cfd0f42" } # Show version information version() { - echo "Wine Staging 2.21" - echo "Copyright (C) 2014-2017 the Wine Staging project authors." + echo "Wine Staging 3.1 (Unreleased)" + echo "Copyright (C) 2014-2018 the Wine Staging project authors." echo "" echo "Patchset to be applied on upstream Wine:" echo " commit $(upstream_commit)" @@ -89,7 +89,6 @@ patch_enable_all () enable_advapi_LsaLookupPrivilegeName="$1" enable_advapi32_BuildSecurityDescriptor="$1" enable_advapi32_CreateRestrictedToken="$1" - enable_advapi32_GetExplicitEntriesFromAclW="$1" enable_advapi32_LsaLookupSids="$1" enable_advapi32_Performance_Counters="$1" enable_advapi32_SetSecurityInfo="$1" @@ -547,9 +546,6 @@ patch_enable () advapi32-CreateRestrictedToken) enable_advapi32_CreateRestrictedToken="$2" ;; - advapi32-GetExplicitEntriesFromAclW) - enable_advapi32_GetExplicitEntriesFromAclW="$2" - ;; advapi32-LsaLookupSids) enable_advapi32_LsaLookupSids="$2" ;; @@ -1834,9 +1830,6 @@ patch_enable () wusa-MSU_Package_Installer) enable_wusa_MSU_Package_Installer="$2" ;; - xaudio2-get_al_format) - enable_xaudio2_get_al_format="$2" - ;; xaudio2_7-OnVoiceProcessingPassStart) enable_xaudio2_7_OnVoiceProcessingPassStart="$2" ;; @@ -2902,9 +2895,6 @@ if test "$enable_advapi32_Token_Integrity_Level" -eq 1; then if test "$enable_advapi32_CreateRestrictedToken" -gt 1; then abort "Patchset advapi32-CreateRestrictedToken disabled, but advapi32-Token_Integrity_Level depends on that." fi - if test "$enable_advapi32_GetExplicitEntriesFromAclW" -gt 1; then - abort "Patchset advapi32-GetExplicitEntriesFromAclW disabled, but advapi32-Token_Integrity_Level depends on that." - fi if test "$enable_kernel32_COMSPEC" -gt 1; then abort "Patchset kernel32-COMSPEC disabled, but advapi32-Token_Integrity_Level depends on that." fi @@ -2928,7 +2918,6 @@ if test "$enable_advapi32_Token_Integrity_Level" -eq 1; then fi enable_Staging=1 enable_advapi32_CreateRestrictedToken=1 - enable_advapi32_GetExplicitEntriesFromAclW=1 enable_kernel32_COMSPEC=1 enable_kernel32_UmsStubs=1 enable_ntdll_APC_Start_Process=1 @@ -2949,14 +2938,6 @@ if test "$enable_advapi32_LsaLookupSids" -eq 1; then enable_server_Misc_ACL=1 fi -if test "$enable_advapi32_BuildSecurityDescriptor" -eq 1; then - if test "$enable_advapi32_GetExplicitEntriesFromAclW" -gt 1; then - abort "Patchset advapi32-GetExplicitEntriesFromAclW disabled, but advapi32-BuildSecurityDescriptor depends on that." - fi - enable_advapi32_GetExplicitEntriesFromAclW=1 -fi - - # If autoupdate is enabled then create a tempfile to keep track of all patches if test "$enable_patchlist" -eq 1; then if test "$enable_Staging" -eq 1; then @@ -3088,18 +3069,6 @@ if test "$enable_advapi_LsaLookupPrivilegeName" -eq 1; then ) >> "$patchlist" fi -# Patchset advapi32-GetExplicitEntriesFromAclW -# | -# | Modified files: -# | * dlls/advapi32/security.c, dlls/advapi32/tests/security.c -# | -if test "$enable_advapi32_GetExplicitEntriesFromAclW" -eq 1; then - patch_apply advapi32-GetExplicitEntriesFromAclW/0001-advapi32-Implement-GetExplicitEntriesFromAclW.patch - ( - printf '%s\n' '+ { "Michael Müller", "advapi32: Implement GetExplicitEntriesFromAclW.", 1 },'; - ) >> "$patchlist" -fi - # Patchset advapi32-BuildSecurityDescriptor # | # | This patchset has the following (direct or indirect) dependencies: @@ -3391,23 +3360,17 @@ fi # | include/Makefile.in, include/activation.idl, include/objidl.idl, include/roapi.h # | if test "$enable_combase_RoApi" -eq 1; then - patch_apply combase-RoApi/0001-include-Add-activation.idl-with-IActivationFactory-i.patch patch_apply combase-RoApi/0002-include-roapi.h-Add-further-typedefs.patch - patch_apply combase-RoApi/0003-combase-Implement-RoGetActivationFactory.patch patch_apply combase-RoApi/0004-combase-Implement-RoActivateInstance.patch patch_apply combase-RoApi/0005-combase-Add-stub-for-RoGetApartmentIdentifier.patch - patch_apply combase-RoApi/0006-include-objidl.idl-Add-IApartmentShutdown-interface.patch patch_apply combase-RoApi/0007-combase-Add-stub-for-RoRegisterForApartmentShutdown.patch patch_apply combase-RoApi/0008-combase-Add-stub-for-RoGetServerActivatableClasses.patch patch_apply combase-RoApi/0009-combase-Add-stub-for-RoRegisterActivationFactories.patch patch_apply combase-RoApi/0010-combase-Add-stub-for-CleanupTlsOleState.patch ( - printf '%s\n' '+ { "Michael Müller", "include: Add activation.idl with IActivationFactory interface.", 1 },'; printf '%s\n' '+ { "Michael Müller", "include/roapi.h: Add further typedefs.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "combase: Implement RoGetActivationFactory.", 1 },'; printf '%s\n' '+ { "Michael Müller", "combase: Implement RoActivateInstance.", 1 },'; printf '%s\n' '+ { "Michael Müller", "combase: Add stub for RoGetApartmentIdentifier.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "include/objidl.idl: Add IApartmentShutdown interface.", 1 },'; printf '%s\n' '+ { "Michael Müller", "combase: Add stub for RoRegisterForApartmentShutdown.", 1 },'; printf '%s\n' '+ { "Michael Müller", "combase: Add stub for RoGetServerActivatableClasses.", 1 },'; printf '%s\n' '+ { "Michael Müller", "combase: Add stub for RoRegisterActivationFactories.", 1 },'; @@ -10738,21 +10701,6 @@ if test "$enable_wusa_MSU_Package_Installer" -eq 1; then ) >> "$patchlist" fi -# Patchset xaudio2-get_al_format -# | -# | This patchset fixes the following Wine bugs: -# | * [#42414] Add support for xaudio2 float formats with more than 2 channels -# | -# | Modified files: -# | * dlls/xaudio2_7/xaudio_dll.c -# | -if test "$enable_xaudio2_get_al_format" -eq 1; then - patch_apply xaudio2-get_al_format/0001-xaudio2-Add-support-for-float-formats-with-more-than.patch - ( - printf '%s\n' '+ { "Kimmo Myllyvirta", "xaudio2: Add support for float formats with more than 2 channels.", 1 },'; - ) >> "$patchlist" -fi - # Patchset xaudio2_7-OnVoiceProcessingPassStart # | # | This patchset fixes the following Wine bugs: diff --git a/patches/xaudio2-get_al_format/0001-xaudio2-Add-support-for-float-formats-with-more-than.patch b/patches/xaudio2-get_al_format/0001-xaudio2-Add-support-for-float-formats-with-more-than.patch deleted file mode 100644 index a5c28a82..00000000 --- a/patches/xaudio2-get_al_format/0001-xaudio2-Add-support-for-float-formats-with-more-than.patch +++ /dev/null @@ -1,32 +0,0 @@ -From c39abfe4849d5ff8c6eb9d60c3295d2326100b09 Mon Sep 17 00:00:00 2001 -From: Kimmo Myllyvirta -Date: Sun, 25 Jun 2017 05:14:05 +0200 -Subject: xaudio2: Add support for float formats with more than 2 channels. - -See http://openal.org/pipermail/openal/2014-December/000287.html. ---- - dlls/xaudio2_7/xaudio_dll.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c -index a09162934ef..13f591630fd 100644 ---- a/dlls/xaudio2_7/xaudio_dll.c -+++ b/dlls/xaudio2_7/xaudio_dll.c -@@ -499,6 +499,14 @@ static ALenum get_al_format(const WAVEFORMATEX *fmt) - return AL_FORMAT_MONO_FLOAT32; - case 2: - return AL_FORMAT_STEREO_FLOAT32; -+ case 4: -+ return AL_FORMAT_QUAD32; -+ case 6: -+ return AL_FORMAT_51CHN32; -+ case 7: -+ return AL_FORMAT_61CHN32; -+ case 8: -+ return AL_FORMAT_71CHN32; - } - } - } --- -2.13.1 - diff --git a/patches/xaudio2-get_al_format/definition b/patches/xaudio2-get_al_format/definition deleted file mode 100644 index 81a34a29..00000000 --- a/patches/xaudio2-get_al_format/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [42414] Add support for xaudio2 float formats with more than 2 channels diff --git a/patches/xaudio2_7-Abandon_Albufs/0001-xaudio2-Ignore-queued-AL-buffers-after-Stop.patch b/patches/xaudio2_7-Abandon_Albufs/0001-xaudio2-Ignore-queued-AL-buffers-after-Stop.patch deleted file mode 100644 index 4c654818..00000000 --- a/patches/xaudio2_7-Abandon_Albufs/0001-xaudio2-Ignore-queued-AL-buffers-after-Stop.patch +++ /dev/null @@ -1,222 +0,0 @@ -From 14d181155cd442b6f4b06c9837d6541e9d574fff Mon Sep 17 00:00:00 2001 -From: Andrew Eikum -Date: Fri, 22 Jul 2016 10:21:20 -0500 -Subject: xaudio2: Ignore queued AL buffers after Stop - -Changes by Sebastian Lackner : -* Fixed flawed logic to skip abandoned buffers. ---- - dlls/xaudio2_7/tests/xaudio2.c | 78 +++++++++++++++++++++++++++++++++++++++++ - dlls/xaudio2_7/xaudio_dll.c | 37 +++++++++++++++---- - dlls/xaudio2_7/xaudio_private.h | 2 +- - 3 files changed, 109 insertions(+), 8 deletions(-) - -diff --git a/dlls/xaudio2_7/tests/xaudio2.c b/dlls/xaudio2_7/tests/xaudio2.c -index 54176ea..ff402f8 100644 ---- a/dlls/xaudio2_7/tests/xaudio2.c -+++ b/dlls/xaudio2_7/tests/xaudio2.c -@@ -841,6 +841,82 @@ static void test_submix(IXAudio2 *xa) - IXAudio2MasteringVoice_DestroyVoice(master); - } - -+static void test_flush(IXAudio2 *xa) -+{ -+ HRESULT hr; -+ IXAudio2MasteringVoice *master; -+ IXAudio2SourceVoice *src; -+ WAVEFORMATEX fmt; -+ XAUDIO2_BUFFER buf; -+ XAUDIO2_VOICE_STATE state; -+ -+ XA2CALL_0V(StopEngine); -+ -+ if(xaudio27) -+ hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL); -+ else -+ hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects); -+ ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr); -+ -+ fmt.wFormatTag = WAVE_FORMAT_IEEE_FLOAT; -+ fmt.nChannels = 2; -+ fmt.nSamplesPerSec = 44100; -+ fmt.wBitsPerSample = 32; -+ fmt.nBlockAlign = fmt.nChannels * fmt.wBitsPerSample / 8; -+ fmt.nAvgBytesPerSec = fmt.nSamplesPerSec * fmt.nBlockAlign; -+ fmt.cbSize = 0; -+ -+ XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, NULL, NULL, NULL); -+ ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr); -+ -+ memset(&buf, 0, sizeof(buf)); -+ buf.AudioBytes = 22050 * fmt.nBlockAlign; -+ buf.pAudioData = HeapAlloc(GetProcessHeap(), 0, buf.AudioBytes); -+ fill_buf((float*)buf.pAudioData, &fmt, 440, 22050); -+ -+ hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); -+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); -+ -+ hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW); -+ ok(hr == S_OK, "Start failed: %08x\n", hr); -+ -+ XA2CALL_0(StartEngine); -+ ok(hr == S_OK, "StartEngine failed: %08x\n", hr); -+ -+ while(1){ -+ if(xaudio27) -+ IXAudio27SourceVoice_GetState((IXAudio27SourceVoice*)src, &state); -+ else -+ IXAudio2SourceVoice_GetState(src, &state, 0); -+ if(state.SamplesPlayed >= 2205) -+ break; -+ Sleep(10); -+ } -+ -+ hr = IXAudio2SourceVoice_Stop(src, 0, XAUDIO2_COMMIT_NOW); -+ ok(hr == S_OK, "Stop failed: %08x\n", hr); -+ -+ hr = IXAudio2SourceVoice_FlushSourceBuffers(src); -+ ok(hr == S_OK, "FlushSourceBuffers failed: %08x\n", hr); -+ -+ hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW); -+ ok(hr == S_OK, "Start failed: %08x\n", hr); -+ -+ Sleep(100); -+ -+ hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL); -+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr); -+ -+ if(xaudio27){ -+ IXAudio27SourceVoice_DestroyVoice((IXAudio27SourceVoice*)src); -+ }else{ -+ IXAudio2SourceVoice_DestroyVoice(src); -+ } -+ IXAudio2MasteringVoice_DestroyVoice(master); -+ -+ HeapFree(GetProcessHeap(), 0, (void*)buf.pAudioData); -+} -+ - static UINT32 test_DeviceDetails(IXAudio27 *xa) - { - HRESULT hr; -@@ -1136,6 +1212,7 @@ START_TEST(xaudio2) - test_buffer_callbacks((IXAudio2*)xa27); - test_looping((IXAudio2*)xa27); - test_submix((IXAudio2*)xa27); -+ test_flush((IXAudio2*)xa27); - }else - skip("No audio devices available\n"); - -@@ -1159,6 +1236,7 @@ START_TEST(xaudio2) - test_buffer_callbacks(xa); - test_looping(xa); - test_submix(xa); -+ test_flush(xa); - }else - skip("No audio devices available\n"); - -diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c -index b2a5e3b..8465a67 100644 ---- a/dlls/xaudio2_7/xaudio_dll.c -+++ b/dlls/xaudio2_7/xaudio_dll.c -@@ -414,6 +414,7 @@ static void WINAPI XA2SRC_DestroyVoice(IXAudio2SourceVoice *iface) - This->nbufs = 0; - This->first_buf = 0; - This->cur_buf = 0; -+ This->abandoned_albufs = 0; - - LeaveCriticalSection(&This->lock); - } -@@ -438,11 +439,17 @@ static HRESULT WINAPI XA2SRC_Stop(IXAudio2SourceVoice *iface, UINT32 Flags, - UINT32 OperationSet) - { - XA2SourceImpl *This = impl_from_IXAudio2SourceVoice(iface); -+ ALint bufs; - - TRACE("%p, 0x%x, 0x%x\n", This, Flags, OperationSet); - -+ palcSetThreadContext(This->xa2->al_ctx); -+ - EnterCriticalSection(&This->lock); - -+ alGetSourcei(This->al_src, AL_BUFFERS_QUEUED, &bufs); -+ This->abandoned_albufs = bufs; -+ - This->running = FALSE; - - LeaveCriticalSection(&This->lock); -@@ -2252,10 +2259,24 @@ static void update_source_state(XA2SourceImpl *src) - - alGetSourcei(src->al_src, AL_BUFFERS_PROCESSED, &processed); - -+ if(processed > 0 && src->abandoned_albufs > 0) -+ { -+ ALuint al_buffers[XAUDIO2_MAX_QUEUED_BUFFERS]; -+ ALint abandoned = min(processed, src->abandoned_albufs); -+ -+ alSourceUnqueueBuffers(src->al_src, abandoned, al_buffers); -+ src->abandoned_albufs -= abandoned; -+ processed -= abandoned; -+ } -+ -+ if(!src->running) -+ return; -+ - if(processed > 0){ - ALuint al_buffers[XAUDIO2_MAX_QUEUED_BUFFERS]; - - alSourceUnqueueBuffers(src->al_src, processed, al_buffers); -+ - src->first_al_buf += processed; - src->first_al_buf %= XAUDIO2_MAX_QUEUED_BUFFERS; - src->al_bufs_used -= processed; -@@ -2367,12 +2388,12 @@ static void do_engine_tick(IXAudio2Impl *This) - - EnterCriticalSection(&src->lock); - -- if(!src->in_use || !src->running){ -+ if(!src->in_use){ - LeaveCriticalSection(&src->lock); - continue; - } - -- if(src->cb){ -+ if(src->cb && This->running){ - #if XAUDIO2_VER == 0 - IXAudio20VoiceCallback_OnVoiceProcessingPassStart((IXAudio20VoiceCallback*)src->cb); - #else -@@ -2386,12 +2407,14 @@ static void do_engine_tick(IXAudio2Impl *This) - - update_source_state(src); - -- alGetSourcei(src->al_src, AL_SOURCE_STATE, &st); -- if(st != AL_PLAYING) -- alSourcePlay(src->al_src); -+ if(This->running){ -+ alGetSourcei(src->al_src, AL_SOURCE_STATE, &st); -+ if(st != AL_PLAYING) -+ alSourcePlay(src->al_src); - -- if(src->cb) -- IXAudio2VoiceCallback_OnVoiceProcessingPassEnd(src->cb); -+ if(src->cb) -+ IXAudio2VoiceCallback_OnVoiceProcessingPassEnd(src->cb); -+ } - - LeaveCriticalSection(&src->lock); - } -diff --git a/dlls/xaudio2_7/xaudio_private.h b/dlls/xaudio2_7/xaudio_private.h -index f28a0ae..1a4aa08 100644 ---- a/dlls/xaudio2_7/xaudio_private.h -+++ b/dlls/xaudio2_7/xaudio_private.h -@@ -81,7 +81,7 @@ typedef struct _XA2SourceImpl { - /* most cases will only need about 4 AL buffers, but some corner cases - * could require up to MAX_QUEUED_BUFFERS */ - ALuint al_bufs[XAUDIO2_MAX_QUEUED_BUFFERS]; -- DWORD first_al_buf, al_bufs_used; -+ DWORD first_al_buf, al_bufs_used, abandoned_albufs; - - struct list entry; - } XA2SourceImpl; --- -2.9.0 - diff --git a/patches/xaudio2_7-Abandon_Albufs/definition b/patches/xaudio2_7-Abandon_Albufs/definition deleted file mode 100644 index 830fffb7..00000000 --- a/patches/xaudio2_7-Abandon_Albufs/definition +++ /dev/null @@ -1,2 +0,0 @@ -# Fixes: [40963] Ignore queued xaudio2 AL buffers after Stop -Disabled: true