mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against 6158405ffdb027fab10456087ee0846c36000a56.
This commit is contained in:
parent
45dd21a99b
commit
8b741cb8ba
@ -19,7 +19,6 @@ Fixes: Add ext-ms-win-kernel32-package-current-l1-1-0 dll
|
||||
Fixes: Add kernelbase dll
|
||||
Fixes: Add iertutil dll
|
||||
Fixes: Add shcore dll
|
||||
Depends: ole32-CoGetApartmentType
|
||||
Depends: kernel32-GetFinalPathNameByHandle
|
||||
Depends: kernel32-FreeUserPhysicalPages
|
||||
Depends: kernel32-GetCurrentPackageFamilyName
|
||||
|
@ -1,223 +0,0 @@
|
||||
From e08b17148b842fb7399c149d510f7ccafd043b66 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 15 Jan 2016 12:16:32 +0100
|
||||
Subject: ole32: Implement CoGetApartmentType.
|
||||
|
||||
---
|
||||
.../api-ms-win-core-com-l1-1-0.spec | 2 +-
|
||||
.../api-ms-win-core-com-l1-1-1.spec | 2 +-
|
||||
.../api-ms-win-downlevel-ole32-l1-1-0.spec | 2 +-
|
||||
dlls/combase/combase.spec | 2 +-
|
||||
dlls/ole32/compobj.c | 29 +++++++++++++
|
||||
dlls/ole32/ole32.spec | 1 +
|
||||
dlls/ole32/tests/compobj.c | 50 ++++++++++++++++++++++
|
||||
include/objidl.idl | 9 ++++
|
||||
8 files changed, 93 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/api-ms-win-core-com-l1-1-0/api-ms-win-core-com-l1-1-0.spec b/dlls/api-ms-win-core-com-l1-1-0/api-ms-win-core-com-l1-1-0.spec
|
||||
index f8026db..f645c9d 100644
|
||||
--- a/dlls/api-ms-win-core-com-l1-1-0/api-ms-win-core-com-l1-1-0.spec
|
||||
+++ b/dlls/api-ms-win-core-com-l1-1-0/api-ms-win-core-com-l1-1-0.spec
|
||||
@@ -17,7 +17,7 @@
|
||||
@ stub CoEnableCallCancellation
|
||||
@ stdcall CoFreeUnusedLibraries() ole32.CoFreeUnusedLibraries
|
||||
@ stdcall CoFreeUnusedLibrariesEx(long long) ole32.CoFreeUnusedLibrariesEx
|
||||
-@ stub CoGetApartmentType
|
||||
+@ stdcall CoGetApartmentType(ptr ptr) ole32.CoGetApartmentType
|
||||
@ stdcall CoGetCallContext(ptr ptr) ole32.CoGetCallContext
|
||||
@ stdcall CoGetCallerTID(ptr) ole32.CoGetCallerTID
|
||||
@ stub CoGetCancelObject
|
||||
diff --git a/dlls/api-ms-win-core-com-l1-1-1/api-ms-win-core-com-l1-1-1.spec b/dlls/api-ms-win-core-com-l1-1-1/api-ms-win-core-com-l1-1-1.spec
|
||||
index 56aaf36..d2914f0 100644
|
||||
--- a/dlls/api-ms-win-core-com-l1-1-1/api-ms-win-core-com-l1-1-1.spec
|
||||
+++ b/dlls/api-ms-win-core-com-l1-1-1/api-ms-win-core-com-l1-1-1.spec
|
||||
@@ -17,7 +17,7 @@
|
||||
@ stub CoEnableCallCancellation
|
||||
@ stdcall CoFreeUnusedLibraries() ole32.CoFreeUnusedLibraries
|
||||
@ stdcall CoFreeUnusedLibrariesEx(long long) ole32.CoFreeUnusedLibrariesEx
|
||||
-@ stub CoGetApartmentType
|
||||
+@ stdcall CoGetApartmentType(ptr ptr) ole32.CoGetApartmentType
|
||||
@ stdcall CoGetCallContext(ptr ptr) ole32.CoGetCallContext
|
||||
@ stdcall CoGetCallerTID(ptr) ole32.CoGetCallerTID
|
||||
@ stub CoGetCancelObject
|
||||
diff --git a/dlls/api-ms-win-downlevel-ole32-l1-1-0/api-ms-win-downlevel-ole32-l1-1-0.spec b/dlls/api-ms-win-downlevel-ole32-l1-1-0/api-ms-win-downlevel-ole32-l1-1-0.spec
|
||||
index a0eabe9..82ff0f1 100644
|
||||
--- a/dlls/api-ms-win-downlevel-ole32-l1-1-0/api-ms-win-downlevel-ole32-l1-1-0.spec
|
||||
+++ b/dlls/api-ms-win-downlevel-ole32-l1-1-0/api-ms-win-downlevel-ole32-l1-1-0.spec
|
||||
@@ -8,7 +8,7 @@
|
||||
@ stdcall CoDisconnectObject(ptr long) ole32.CoDisconnectObject
|
||||
@ stdcall CoFreeUnusedLibraries() ole32.CoFreeUnusedLibraries
|
||||
@ stdcall CoFreeUnusedLibrariesEx(long long) ole32.CoFreeUnusedLibrariesEx
|
||||
-@ stub CoGetApartmentType
|
||||
+@ stdcall CoGetApartmentType(ptr ptr) ole32.CoGetApartmentType
|
||||
@ stdcall CoGetClassObject(ptr long ptr ptr ptr) ole32.CoGetClassObject
|
||||
@ stdcall CoGetCurrentLogicalThreadId(ptr) ole32.CoGetCurrentLogicalThreadId
|
||||
@ stdcall CoGetInterfaceAndReleaseStream(ptr ptr ptr) ole32.CoGetInterfaceAndReleaseStream
|
||||
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec
|
||||
index 4bda470..b612bef 100644
|
||||
--- a/dlls/combase/combase.spec
|
||||
+++ b/dlls/combase/combase.spec
|
||||
@@ -90,7 +90,7 @@
|
||||
@ stdcall CoFreeUnusedLibrariesEx(long long) ole32.CoFreeUnusedLibrariesEx
|
||||
@ stdcall CoGetActivationState(int128 long ptr) ole32.CoGetActivationState
|
||||
@ stub CoGetApartmentID
|
||||
-@ stub CoGetApartmentType
|
||||
+@ stdcall CoGetApartmentType(ptr ptr) ole32.CoGetApartmentType
|
||||
@ stdcall CoGetCallContext(ptr ptr) ole32.CoGetCallContext
|
||||
@ stdcall CoGetCallState(long ptr) ole32.CoGetCallState
|
||||
@ stdcall CoGetCallerTID(ptr) ole32.CoGetCallerTID
|
||||
diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c
|
||||
index 080940e..d639a3e 100644
|
||||
--- a/dlls/ole32/compobj.c
|
||||
+++ b/dlls/ole32/compobj.c
|
||||
@@ -5029,6 +5029,35 @@ HRESULT Handler_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
+ * CoGetApartmentType [OLE32.@]
|
||||
+ */
|
||||
+HRESULT WINAPI CoGetApartmentType(APTTYPE *type, APTTYPEQUALIFIER *qualifier)
|
||||
+{
|
||||
+ struct oletls *info = COM_CurrentInfo();
|
||||
+
|
||||
+ FIXME("(%p %p): semi-stub\n", type, qualifier);
|
||||
+
|
||||
+ if (!type || !qualifier)
|
||||
+ return E_INVALIDARG;
|
||||
+
|
||||
+ if (!info)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ if (!info->apt)
|
||||
+ *type = APTTYPE_CURRENT;
|
||||
+ else if (info->apt->multi_threaded)
|
||||
+ *type = APTTYPE_MTA;
|
||||
+ else if (info->apt->main)
|
||||
+ *type = APTTYPE_MAINSTA;
|
||||
+ else
|
||||
+ *type = APTTYPE_STA;
|
||||
+
|
||||
+ *qualifier = APTTYPEQUALIFIER_NONE;
|
||||
+
|
||||
+ return info->apt ? ERROR_SUCCESS : CO_E_NOTINITIALIZED;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
* DllMain (OLE32.@)
|
||||
*/
|
||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID reserved)
|
||||
diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec
|
||||
index 04c9f1e..c836176 100644
|
||||
--- a/dlls/ole32/ole32.spec
|
||||
+++ b/dlls/ole32/ole32.spec
|
||||
@@ -23,6 +23,7 @@
|
||||
@ stdcall CoFreeUnusedLibraries()
|
||||
@ stdcall CoFreeUnusedLibrariesEx(long long)
|
||||
@ stdcall CoGetActivationState(int128 long ptr)
|
||||
+@ stdcall CoGetApartmentType(ptr ptr)
|
||||
@ stdcall CoGetCallContext(ptr ptr)
|
||||
@ stdcall CoGetCallState(long ptr)
|
||||
@ stdcall CoGetCallerTID(ptr)
|
||||
diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c
|
||||
index 6fa6dfc..f67928e 100644
|
||||
--- a/dlls/ole32/tests/compobj.c
|
||||
+++ b/dlls/ole32/tests/compobj.c
|
||||
@@ -70,6 +70,7 @@ static HRESULT (WINAPI * pCoSwitchCallContext)(IUnknown *pObject, IUnknown **ppO
|
||||
static HRESULT (WINAPI * pCoGetTreatAsClass)(REFCLSID clsidOld, LPCLSID pClsidNew);
|
||||
static HRESULT (WINAPI * pCoTreatAsClass)(REFCLSID clsidOld, REFCLSID pClsidNew);
|
||||
static HRESULT (WINAPI * pCoGetContextToken)(ULONG_PTR *token);
|
||||
+static HRESULT (WINAPI * pCoGetApartmentType)(APTTYPE *type, APTTYPEQUALIFIER *qualifier);
|
||||
static LONG (WINAPI * pRegDeleteKeyExA)(HKEY, LPCSTR, REGSAM, DWORD);
|
||||
static LONG (WINAPI * pRegOverridePredefKey)(HKEY key, HKEY override);
|
||||
|
||||
@@ -2879,6 +2880,53 @@ if (0) /* crashes on native */
|
||||
IMalloc_Release(imalloc);
|
||||
}
|
||||
|
||||
+static void test_CoGetApartmentType(void)
|
||||
+{
|
||||
+ APTTYPEQUALIFIER qualifier;
|
||||
+ APTTYPE type;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ if (!pCoGetApartmentType)
|
||||
+ {
|
||||
+ win_skip("CoGetApartmentType not present\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ hr = pCoGetApartmentType(NULL, NULL);
|
||||
+ ok(hr == E_INVALIDARG, "CoGetApartmentType succeeded, error: 0x%0x\n", hr);
|
||||
+
|
||||
+ hr = pCoGetApartmentType(&type, NULL);
|
||||
+ ok(hr == E_INVALIDARG, "CoGetApartmentType succeeded, error: 0x%0x\n", hr);
|
||||
+
|
||||
+ hr = pCoGetApartmentType(NULL, &qualifier);
|
||||
+ ok(hr == E_INVALIDARG, "CoGetApartmentType succeeded, error: 0x%0x\n", hr);
|
||||
+
|
||||
+ hr = pCoGetApartmentType(&type, &qualifier);
|
||||
+ ok(hr == CO_E_NOTINITIALIZED, "CoGetApartmentType succeeded, error: 0x%0x\n", hr);
|
||||
+ ok(type == APTTYPE_CURRENT, "Expected APTTYPE_CURRENT, got %u\n", type);
|
||||
+ ok(qualifier == APTTYPEQUALIFIER_NONE, "Expected APTTYPEQUALIFIER_NONE, got %u\n", qualifier);
|
||||
+
|
||||
+ hr = pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
|
||||
+ ok(!hr, "CoInitializeEx failed, error: 0x%08x\n", hr);
|
||||
+
|
||||
+ hr = pCoGetApartmentType(&type, &qualifier);
|
||||
+ ok(!hr, "CoGetApartmentType failed, error: 0x%08x\n", hr);
|
||||
+ ok(type == APTTYPE_MAINSTA, "Expected APTTYPE_MAINSTA, got %u\n", type);
|
||||
+ ok(qualifier == APTTYPEQUALIFIER_NONE, "Expected APTTYPEQUALIFIER_NONE, got %u\n", qualifier);
|
||||
+
|
||||
+ CoUninitialize();
|
||||
+
|
||||
+ hr = pCoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
+ ok(!hr, "CoInitializeEx failed, error: 0x%08x\n", hr);
|
||||
+
|
||||
+ hr = pCoGetApartmentType(&type, &qualifier);
|
||||
+ ok(!hr, "CoGetApartmentType failed, error: 0x%08x\n", hr);
|
||||
+ ok(type == APTTYPE_MTA, "Expected APTTYPE_MTA, got %u\n", type);
|
||||
+ ok(qualifier == APTTYPEQUALIFIER_NONE, "Expected APTTYPEQUALIFIER_NONE, got %u\n", qualifier);
|
||||
+
|
||||
+ CoUninitialize();
|
||||
+}
|
||||
+
|
||||
static void init_funcs(void)
|
||||
{
|
||||
HMODULE hOle32 = GetModuleHandleA("ole32");
|
||||
@@ -2890,6 +2938,7 @@ static void init_funcs(void)
|
||||
pCoGetTreatAsClass = (void*)GetProcAddress(hOle32,"CoGetTreatAsClass");
|
||||
pCoTreatAsClass = (void*)GetProcAddress(hOle32,"CoTreatAsClass");
|
||||
pCoGetContextToken = (void*)GetProcAddress(hOle32, "CoGetContextToken");
|
||||
+ pCoGetApartmentType = (void*)GetProcAddress(hOle32, "CoGetApartmentType");
|
||||
pRegDeleteKeyExA = (void*)GetProcAddress(hAdvapi32, "RegDeleteKeyExA");
|
||||
pRegOverridePredefKey = (void*)GetProcAddress(hAdvapi32, "RegOverridePredefKey");
|
||||
pCoInitializeEx = (void*)GetProcAddress(hOle32, "CoInitializeEx");
|
||||
@@ -2944,4 +2993,5 @@ START_TEST(compobj)
|
||||
test_CoWaitForMultipleHandles();
|
||||
test_CoGetMalloc();
|
||||
test_OleRegGetUserType();
|
||||
+ test_CoGetApartmentType();
|
||||
}
|
||||
diff --git a/include/objidl.idl b/include/objidl.idl
|
||||
index 335282d..d60f016 100644
|
||||
--- a/include/objidl.idl
|
||||
+++ b/include/objidl.idl
|
||||
@@ -2327,6 +2327,15 @@ typedef enum _APTTYPE {
|
||||
APTTYPE_MAINSTA = 3
|
||||
} APTTYPE;
|
||||
|
||||
+typedef enum _APTTYPEQUALIFIER {
|
||||
+ APTTYPEQUALIFIER_NONE = 0,
|
||||
+ APTTYPEQUALIFIER_IMPLICIT_MTA = 1,
|
||||
+ APTTYPEQUALIFIER_NA_ON_MTA = 2,
|
||||
+ APTTYPEQUALIFIER_NA_ON_STA = 3,
|
||||
+ APTTYPEQUALIFIER_NA_ON_IMPLICIT_MTA = 4,
|
||||
+ APTTYPEQUALIFIER_NA_ON_MAINSTA = 5
|
||||
+} APTTYPEQUALIFIER;
|
||||
+
|
||||
typedef enum _THDTYPE {
|
||||
THDTYPE_BLOCKMESSAGES = 0,
|
||||
THDTYPE_PROCESSMESSAGES = 1
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: Add implementation for ole32.CoGetApartmentType
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "0d06ebf5fb515e19cd9ec951dd9e49f6e678b35c"
|
||||
echo "6158405ffdb027fab10456087ee0846c36000a56"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -248,7 +248,6 @@ patch_enable_all ()
|
||||
enable_nvcuda_CUDA_Support="$1"
|
||||
enable_nvcuvid_CUDA_Video_Support="$1"
|
||||
enable_nvencodeapi_Video_Encoder="$1"
|
||||
enable_ole32_CoGetApartmentType="$1"
|
||||
enable_ole32_HGLOBALStream="$1"
|
||||
enable_oleaut32_CreateTypeLib="$1"
|
||||
enable_oleaut32_TKIND_COCLASS="$1"
|
||||
@ -903,9 +902,6 @@ patch_enable ()
|
||||
nvencodeapi-Video_Encoder)
|
||||
enable_nvencodeapi_Video_Encoder="$2"
|
||||
;;
|
||||
ole32-CoGetApartmentType)
|
||||
enable_ole32_CoGetApartmentType="$2"
|
||||
;;
|
||||
ole32-HGLOBALStream)
|
||||
enable_ole32_HGLOBALStream="$2"
|
||||
;;
|
||||
@ -2272,14 +2268,10 @@ if test "$enable_api_ms_win_Stub_DLLs" -eq 1; then
|
||||
if test "$enable_kernel32_GetFinalPathNameByHandle" -gt 1; then
|
||||
abort "Patchset kernel32-GetFinalPathNameByHandle disabled, but api-ms-win-Stub_DLLs depends on that."
|
||||
fi
|
||||
if test "$enable_ole32_CoGetApartmentType" -gt 1; then
|
||||
abort "Patchset ole32-CoGetApartmentType disabled, but api-ms-win-Stub_DLLs depends on that."
|
||||
fi
|
||||
enable_combase_RoApi=1
|
||||
enable_kernel32_FreeUserPhysicalPages=1
|
||||
enable_kernel32_GetCurrentPackageFamilyName=1
|
||||
enable_kernel32_GetFinalPathNameByHandle=1
|
||||
enable_ole32_CoGetApartmentType=1
|
||||
fi
|
||||
|
||||
if test "$enable_advapi32_LsaLookupSids" -eq 1; then
|
||||
@ -2622,25 +2614,10 @@ if test "$enable_kernel32_GetFinalPathNameByHandle" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ole32-CoGetApartmentType
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/api-ms-win-core-com-l1-1-0/api-ms-win-core-com-l1-1-0.spec, dlls/api-ms-win-core-com-l1-1-1/api-ms-win-core-
|
||||
# | com-l1-1-1.spec, dlls/api-ms-win-downlevel-ole32-l1-1-0/api-ms-win-downlevel-ole32-l1-1-0.spec,
|
||||
# | dlls/combase/combase.spec, dlls/ole32/compobj.c, dlls/ole32/ole32.spec, dlls/ole32/tests/compobj.c, include/objidl.idl
|
||||
# |
|
||||
if test "$enable_ole32_CoGetApartmentType" -eq 1; then
|
||||
patch_apply ole32-CoGetApartmentType/0001-ole32-Implement-CoGetApartmentType.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "ole32: Implement CoGetApartmentType.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset api-ms-win-Stub_DLLs
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * combase-RoApi, kernel32-FreeUserPhysicalPages, kernel32-GetCurrentPackageFamilyName, kernel32-GetFinalPathNameByHandle,
|
||||
# | ole32-CoGetApartmentType
|
||||
# | * combase-RoApi, kernel32-FreeUserPhysicalPages, kernel32-GetCurrentPackageFamilyName, kernel32-GetFinalPathNameByHandle
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * configure.ac, dlls/api-ms-win-appmodel-runtime-l1-1-1/Makefile.in, dlls/api-ms-win-appmodel-runtime-l1-1-1/api-ms-win-
|
||||
|
Loading…
Reference in New Issue
Block a user