Rebase against 90ed96a766b4b627a5dd18d601b41257c4f8e390.

This commit is contained in:
Sebastian Lackner 2015-05-22 15:22:57 +02:00
parent ca8ffcd619
commit baa05e4719
8 changed files with 25 additions and 467 deletions

View File

@ -83,7 +83,7 @@ for more details.*
* Add support for CopyFileEx progress callback ([Wine Bug #22692](https://bugs.winehq.org/show_bug.cgi?id=22692))
* Add support for GetPropValue to PulseAudio backend
* Add support for process specific debug channels
* Add support for wbemprox Win32_SystemEnclosure table ([Wine Bug #34517](https://bugs.winehq.org/show_bug.cgi?id=34517))
* ~~Add support for wbemprox Win32_SystemEnclosure table~~ ([Wine Bug #34517](https://bugs.winehq.org/show_bug.cgi?id=34517))
* Adobe Reader needs ITextSelection_fnGetDuplicate implementation
* ~~Allocate fake hWnd for wineconsole curses backend~~ ([Wine Bug #34930](https://bugs.winehq.org/show_bug.cgi?id=34930))
* Allow selection of audio device for PulseAudio backend

3
debian/changelog vendored
View File

@ -19,6 +19,9 @@ wine-staging (1.7.44) UNRELEASED; urgency=low
upstream).
* Removed various patches containing tests (accepted upstream).
* Removed patches for advapi32.ImpersonateAnonymousToken (accepted upstream).
* Removed patches for Win32_SystemEnclosure support (accepted upstream).
* Removed patch with tests for CoWaitForMultipleHandles and WM_QUIT (accepted
upstream).
* Removed patches for \Device\Null driver (fixed upstream with alternative
solution).
* Partially removed patches for ITextFont/ITextPara implementation (fixed

View File

@ -1,198 +0,0 @@
From d8669776edc7806f4d70adff79b86c1125e23086 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 12 Dec 2014 01:23:06 +0100
Subject: ole32/tests: Add additional tests for CoWaitForMultipleHandles and
WM_QUIT.
---
dlls/ole32/tests/compobj.c | 153 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 152 insertions(+), 1 deletion(-)
diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c
index eed5ac8..187ea3d 100644
--- a/dlls/ole32/tests/compobj.c
+++ b/dlls/ole32/tests/compobj.c
@@ -2103,6 +2103,22 @@ static DWORD CALLBACK release_semaphore_thread( LPVOID arg )
return 0;
}
+static DWORD CALLBACK send_message_thread(LPVOID arg)
+{
+ HWND hWnd = arg;
+ Sleep(50);
+ SendMessageA(hWnd, WM_DDE_FIRST, 0, 0);
+ return 0;
+}
+
+static DWORD CALLBACK post_message_thread(LPVOID arg)
+{
+ HWND hWnd = arg;
+ Sleep(50);
+ PostMessageA(hWnd, WM_DDE_FIRST, 0, 0);
+ return 0;
+}
+
static void test_CoWaitForMultipleHandles(void)
{
static const char cls_name[] = "cowait_test_class";
@@ -2183,6 +2199,32 @@ static void test_CoWaitForMultipleHandles(void)
success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE);
ok(!success, "CoWaitForMultipleHandles didn't pump any messages\n");
+ /* test PostMessageA/SendMessageA from a different thread */
+
+ index = 0xdeadbeef;
+ thread = CreateThread(NULL, 0, post_message_thread, hWnd, 0, &tid);
+ ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError());
+ hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index);
+ ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr);
+ ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index);
+ success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE);
+ ok(!success, "CoWaitForMultipleHandles didn't pump any messages\n");
+ index = WaitForSingleObject(thread, 200);
+ ok(index == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
+ CloseHandle(thread);
+
+ index = 0xdeadbeef;
+ thread = CreateThread(NULL, 0, send_message_thread, hWnd, 0, &tid);
+ ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError());
+ hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index);
+ ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr);
+ ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index);
+ success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE);
+ ok(!success, "CoWaitForMultipleHandles didn't pump any messages\n");
+ index = WaitForSingleObject(thread, 200);
+ ok(index == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
+ CloseHandle(thread);
+
ReleaseSemaphore(handles[0], 1, NULL);
ReleaseSemaphore(handles[1], 1, NULL);
@@ -2264,7 +2306,7 @@ static void test_CoWaitForMultipleHandles(void)
hr = CoWaitForMultipleHandles(COWAIT_INPUTAVAILABLE, 50, 2, handles, &index);
ok(hr == RPC_S_CALLPENDING || broken(hr == E_INVALIDARG) || broken(hr == S_OK) /* Win 8 */,
"expected RPC_S_CALLPENDING, got 0x%08x\n", hr);
- ReleaseSemaphore(handles[1], 1, NULL);
+ if (hr != S_OK) ReleaseSemaphore(handles[1], 1, NULL);
ok(index == 0 || broken(index == 1) /* Win 8 */, "expected index 0, got %u\n", index);
success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE);
ok(!success || broken(success && hr == E_INVALIDARG),
@@ -2273,6 +2315,115 @@ static void test_CoWaitForMultipleHandles(void)
ok(index == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
CloseHandle(thread);
+ /* test behaviour of WM_QUIT (semaphores are still locked) */
+
+ PostMessageA(hWnd, WM_QUIT, 40, 0);
+ memset(&msg, 0, sizeof(msg));
+ success = PeekMessageA(&msg, hWnd, WM_QUIT, WM_QUIT, PM_REMOVE);
+ ok(success, "PeekMessageA failed, error %u\n", GetLastError());
+ ok(msg.message == WM_QUIT, "expected msg.message = WM_QUIT, got %u\n", msg.message);
+ ok(msg.wParam == 40, "expected msg.wParam = 40, got %lu\n", msg.wParam);
+ success = PeekMessageA(&msg, hWnd, WM_QUIT, WM_QUIT, PM_REMOVE);
+ ok(!success, "PeekMessageA succeeded\n");
+
+ index = 0xdeadbeef;
+ PostMessageA(hWnd, WM_DDE_FIRST, 0, 0);
+ PostMessageA(hWnd, WM_QUIT, 41, 0);
+ thread = CreateThread(NULL, 0, post_message_thread, hWnd, 0, &tid);
+ ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError());
+ hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index);
+ ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr);
+ ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index);
+ success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE);
+ todo_wine
+ ok(success || broken(!success) /* Win 2000/XP/8 */, "PeekMessageA failed, error %u\n", GetLastError());
+ success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE);
+ ok(!success, "PeekMessageA succeeded\n");
+ memset(&msg, 0, sizeof(msg));
+ success = PeekMessageA(&msg, hWnd, WM_QUIT, WM_QUIT, PM_REMOVE);
+ todo_wine
+ ok(!success || broken(success) /* Win 2000/XP/8 */, "PeekMessageA succeeded\n");
+ if (success)
+ {
+ ok(msg.message == WM_QUIT, "expected msg.message = WM_QUIT, got %u\n", msg.message);
+ ok(msg.wParam == 41, "expected msg.wParam = 41, got %lu\n", msg.wParam);
+ }
+ index = WaitForSingleObject(thread, 200);
+ ok(index == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
+ CloseHandle(thread);
+
+ index = 0xdeadbeef;
+ PostMessageA(hWnd, WM_DDE_FIRST, 0, 0);
+ PostMessageA(hWnd, WM_QUIT, 42, 0);
+ thread = CreateThread(NULL, 0, send_message_thread, hWnd, 0, &tid);
+ ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError());
+ hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index);
+ ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr);
+ ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index);
+ success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE);
+ ok(!success, "CoWaitForMultipleHandles didn't pump all WM_DDE_FIRST messages\n");
+ memset(&msg, 0, sizeof(msg));
+ success = PeekMessageA(&msg, hWnd, WM_QUIT, WM_QUIT, PM_REMOVE);
+ ok(success, "PeekMessageA failed, error %u\n", GetLastError());
+ ok(msg.message == WM_QUIT, "expected msg.message = WM_QUIT, got %u\n", msg.message);
+ ok(msg.wParam == 42, "expected msg.wParam = 42, got %lu\n", msg.wParam);
+ index = WaitForSingleObject(thread, 200);
+ ok(index == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
+ CloseHandle(thread);
+
+ PostQuitMessage(43);
+ memset(&msg, 0, sizeof(msg));
+ success = PeekMessageA(&msg, hWnd, WM_QUIT, WM_QUIT, PM_REMOVE);
+ ok(success || broken(!success) /* Win 8 */, "PeekMessageA failed, error %u\n", GetLastError());
+ if (!success)
+ win_skip("PostQuitMessage didn't queue a WM_QUIT message, skipping tests\n");
+ else
+ {
+ ok(msg.message == WM_QUIT, "expected msg.message = WM_QUIT, got %u\n", msg.message);
+ ok(msg.wParam == 43, "expected msg.wParam = 43, got %lu\n", msg.wParam);
+ success = PeekMessageA(&msg, hWnd, WM_QUIT, WM_QUIT, PM_REMOVE);
+ ok(!success, "PeekMessageA succeeded\n");
+
+ index = 0xdeadbeef;
+ PostMessageA(hWnd, WM_DDE_FIRST, 0, 0);
+ PostQuitMessage(44);
+ thread = CreateThread(NULL, 0, post_message_thread, hWnd, 0, &tid);
+ ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError());
+ hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index);
+ ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr);
+ ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index);
+ success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE);
+ ok(success, "PeekMessageA failed, error %u\n", GetLastError());
+ success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE);
+ todo_wine
+ ok(!success, "PeekMessageA succeeded\n");
+ success = PeekMessageA(&msg, hWnd, WM_QUIT, WM_QUIT, PM_REMOVE);
+ todo_wine
+ ok(!success, "CoWaitForMultipleHandles didn't remove WM_QUIT messages\n");
+ index = WaitForSingleObject(thread, 200);
+ ok(index == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
+ CloseHandle(thread);
+
+ index = 0xdeadbeef;
+ PostMessageA(hWnd, WM_DDE_FIRST, 0, 0);
+ PostQuitMessage(45);
+ thread = CreateThread(NULL, 0, send_message_thread, hWnd, 0, &tid);
+ ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError());
+ hr = CoWaitForMultipleHandles(0, 100, 2, handles, &index);
+ ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr);
+ ok(index == 0 || broken(index == 0xdeadbeef) /* Win 8 */, "expected index 0, got %u\n", index);
+ success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE);
+ ok(success, "PeekMessageA failed, error %u\n", GetLastError());
+ success = PeekMessageA(&msg, hWnd, WM_DDE_FIRST, WM_DDE_FIRST, PM_REMOVE);
+ todo_wine
+ ok(!success, "PeekMessageA succeeded\n");
+ success = PeekMessageA(&msg, hWnd, WM_QUIT, WM_QUIT, PM_REMOVE);
+ ok(!success, "CoWaitForMultipleHandles didn't remove WM_QUIT messages\n");
+ index = WaitForSingleObject(thread, 200);
+ ok(index == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
+ CloseHandle(thread);
+ }
+
CloseHandle(handles[0]);
CloseHandle(handles[1]);
DestroyWindow(hWnd);
--
2.1.3

View File

@ -55,7 +55,7 @@ version()
echo "Copyright (C) 2014-2015 the Wine Staging project authors."
echo ""
echo "Patchset to be applied on upstream Wine:"
echo " commit 9586d3b2567e6b4a2270caeacf39796c168351c0"
echo " commit 90ed96a766b4b627a5dd18d601b41257c4f8e390"
echo ""
}
@ -188,7 +188,6 @@ patch_enable_all ()
enable_nvcuda_CUDA_Support="$1"
enable_nvcuvid_CUDA_Video_Support="$1"
enable_nvencodeapi_Video_Encoder="$1"
enable_ole32_CoWaitForMultipleHandles="$1"
enable_opengl32_Revert_Disable_Ext="$1"
enable_quartz_MediaSeeking_Positions="$1"
enable_riched20_IText_Interface="$1"
@ -237,7 +236,6 @@ patch_enable_all ()
enable_vcomp_Stub_Functions="$1"
enable_version_VerQueryValue="$1"
enable_version_VersionInfoEx="$1"
enable_wbemprox_Win32_SystemEnclosure="$1"
enable_wiaservc_IEnumWIA_DEV_INFO="$1"
enable_windowscodecs_GIF_Decoder="$1"
enable_windowscodecs_TIFF_Decoder="$1"
@ -624,9 +622,6 @@ patch_enable ()
nvencodeapi-Video_Encoder)
enable_nvencodeapi_Video_Encoder="$2"
;;
ole32-CoWaitForMultipleHandles)
enable_ole32_CoWaitForMultipleHandles="$2"
;;
opengl32-Revert_Disable_Ext)
enable_opengl32_Revert_Disable_Ext="$2"
;;
@ -771,9 +766,6 @@ patch_enable ()
version-VersionInfoEx)
enable_version_VersionInfoEx="$2"
;;
wbemprox-Win32_SystemEnclosure)
enable_wbemprox_Win32_SystemEnclosure="$2"
;;
wiaservc-IEnumWIA_DEV_INFO)
enable_wiaservc_IEnumWIA_DEV_INFO="$2"
;;
@ -1451,9 +1443,6 @@ if test "$enable_category_stable" -eq 1; then
if test "$enable_version_VersionInfoEx" -gt 1; then
abort "Patchset version-VersionInfoEx disabled, but category-stable depends on that."
fi
if test "$enable_wbemprox_Win32_SystemEnclosure" -gt 1; then
abort "Patchset wbemprox-Win32_SystemEnclosure disabled, but category-stable depends on that."
fi
if test "$enable_windowscodecs_GIF_Decoder" -gt 1; then
abort "Patchset windowscodecs-GIF_Decoder disabled, but category-stable depends on that."
fi
@ -1591,7 +1580,6 @@ if test "$enable_category_stable" -eq 1; then
enable_user32_GetRawInputDeviceList=1
enable_user32_WndProc=1
enable_version_VersionInfoEx=1
enable_wbemprox_Win32_SystemEnclosure=1
enable_windowscodecs_GIF_Decoder=1
enable_wine_inf_Performance=1
enable_wine_inf_ProfileList_UserSID=1
@ -2654,18 +2642,6 @@ if test "$enable_dxgi_GetDesc" -eq 1; then
) >> "$patchlist"
fi
# Patchset makedep-PARENTSPEC
# |
# | Modified files:
# | * tools/makedep.c
# |
if test "$enable_makedep_PARENTSPEC" -eq 1; then
patch_apply makedep-PARENTSPEC/0001-makedep-Add-support-for-PARENTSPEC-Makefile-variable.patch
(
echo '+ { "Sebastian Lackner", "makedep: Add support for PARENTSPEC Makefile variable.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-DllRedirects
# |
# | Modified files:
@ -2686,6 +2662,18 @@ if test "$enable_ntdll_DllRedirects" -eq 1; then
) >> "$patchlist"
fi
# Patchset makedep-PARENTSPEC
# |
# | Modified files:
# | * tools/makedep.c
# |
if test "$enable_makedep_PARENTSPEC" -eq 1; then
patch_apply makedep-PARENTSPEC/0001-makedep-Add-support-for-PARENTSPEC-Makefile-variable.patch
(
echo '+ { "Sebastian Lackner", "makedep: Add support for PARENTSPEC Makefile variable.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-CSMT_Helper
# |
# | Modified files:
@ -4424,18 +4412,6 @@ if test "$enable_nvencodeapi_Video_Encoder" -eq 1; then
) >> "$patchlist"
fi
# Patchset ole32-CoWaitForMultipleHandles
# |
# | Modified files:
# | * dlls/ole32/tests/compobj.c
# |
if test "$enable_ole32_CoWaitForMultipleHandles" -eq 1; then
patch_apply ole32-CoWaitForMultipleHandles/0001-ole32-tests-Add-additional-tests-for-CoWaitForMultip.patch
(
echo '+ { "Sebastian Lackner", "ole32/tests: Add additional tests for CoWaitForMultipleHandles and WM_QUIT.", 1 },';
) >> "$patchlist"
fi
# Patchset opengl32-Revert_Disable_Ext
# |
# | This patchset fixes the following Wine bugs:
@ -5173,23 +5149,6 @@ if test "$enable_version_VersionInfoEx" -eq 1; then
) >> "$patchlist"
fi
# Patchset wbemprox-Win32_SystemEnclosure
# |
# | This patchset fixes the following Wine bugs:
# | * [#34517] Add support for wbemprox Win32_SystemEnclosure table
# |
# | Modified files:
# | * dlls/wbemprox/builtin.c, dlls/wbemprox/table.c
# |
if test "$enable_wbemprox_Win32_SystemEnclosure" -eq 1; then
patch_apply wbemprox-Win32_SystemEnclosure/0001-wbemprox-Fix-handling-of-arrays-as-query-results.patch
patch_apply wbemprox-Win32_SystemEnclosure/0002-wbemprox-Add-support-for-Win32_SystemEnclosure.patch
(
echo '+ { "Sebastian Lackner", "wbemprox: Fix handling of arrays as query results.", 1 },';
echo '+ { "Michael Müller", "wbemprox: Add support for Win32_SystemEnclosure.", 1 },';
) >> "$patchlist"
fi
# Patchset wiaservc-IEnumWIA_DEV_INFO
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,4 +1,4 @@
From 815bce1478d691786f20e5f1e432e492e866464f Mon Sep 17 00:00:00 2001
From 0d277bcbe13729530afaa53db2a5d0a55320011f Mon Sep 17 00:00:00 2001
From: Jactry Zeng <wine@jactry.com>
Date: Mon, 11 Aug 2014 13:51:55 +0800
Subject: riched20: Stub for ITextFont interface and implement
@ -10,7 +10,7 @@ Subject: riched20: Stub for ITextFont interface and implement
2 files changed, 300 insertions(+)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index f93f086..b304fb3 100644
index 3706411..8d78df1 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -1761,9 +1761,21 @@ static ULONG WINAPI TextFont_Release(ITextFont *iface)
@ -109,7 +109,7 @@ index f93f086..b304fb3 100644
@@ -1822,6 +1861,10 @@ static HRESULT WINAPI TextFont_IsEqual(ITextFont *iface, ITextFont *font, LONG *
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p)->(%p): stub\n", This, ret);
FIXME("(%p)->(%p %p): stub\n", This, font, ret);
+
+ if (!font_get_reole(This))
+ return CO_E_RELEASED;
@ -120,7 +120,7 @@ index f93f086..b304fb3 100644
@@ -1829,6 +1872,10 @@ static HRESULT WINAPI TextFont_Reset(ITextFont *iface, LONG value)
{
ITextFontImpl *This = impl_from_ITextFont(iface);
FIXME("(%p): stub\n", This);
FIXME("(%p)->(%d): stub\n", This, value);
+
+ if (!font_get_reole(This))
+ return CO_E_RELEASED;
@ -569,10 +569,10 @@ index f93f086..b304fb3 100644
}
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index e654653..6bd3790 100644
index 0d0bb41..26f97d1 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -1701,6 +1701,97 @@ static void test_ITextSelection_SetEnd(void)
@@ -1704,6 +1704,97 @@ static void test_ITextSelection_SetEnd(void)
release_interfaces(&w, &reOle, &txtDoc, &txtSel);
}
@ -670,7 +670,7 @@ index e654653..6bd3790 100644
START_TEST(richole)
{
/* Must explicitly LoadLibrary(). The test has no references to functions in
@@ -1716,6 +1807,7 @@ START_TEST(richole)
@@ -1719,6 +1810,7 @@ START_TEST(richole)
test_ITextSelection_SetStart();
test_ITextSelection_SetEnd();
test_ITextSelection_Collapse();
@ -678,7 +678,7 @@ index e654653..6bd3790 100644
test_ITextDocument_Range();
test_ITextRange_GetChar();
test_ITextRange_GetStart_GetEnd();
@@ -1723,6 +1815,7 @@ START_TEST(richole)
@@ -1726,6 +1818,7 @@ START_TEST(richole)
test_ITextRange_Collapse();
test_ITextRange_SetStart();
test_ITextRange_SetEnd();

View File

@ -1,75 +0,0 @@
From 97f87fdced630139111ed66af70a0ce01b7a28d8 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 17 Apr 2015 09:38:15 +0200
Subject: wbemprox: Fix handling of arrays as query results.
---
dlls/wbemprox/builtin.c | 22 ++++++++++++++++------
dlls/wbemprox/table.c | 7 ++++++-
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index 8ba2642..f1f51c5 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -938,7 +938,7 @@ struct record_service
struct record_sid
{
const WCHAR *accountname;
- const UINT8 *binaryrepresentation;
+ const struct array *binaryrepresentation;
const WCHAR *referenceddomainname;
const WCHAR *sid;
UINT32 sidlength;
@@ -2614,12 +2614,22 @@ static WCHAR *get_accountname( LSA_TRANSLATED_NAME *name )
if (!name || !name->Name.Buffer) return NULL;
return heap_strdupW( name->Name.Buffer );
}
-static UINT8 *get_binaryrepresentation( PSID sid, UINT len )
+static struct array *get_binaryrepresentation( PSID sid, UINT len )
{
- UINT8 *ret = heap_alloc( len );
- if (!ret) return NULL;
- memcpy( ret, sid, len );
- return ret;
+ struct array *array = heap_alloc( sizeof(struct array) );
+ if (array)
+ {
+ UINT8 *ret = heap_alloc( len );
+ if (ret)
+ {
+ memcpy( ret, sid, len );
+ array->count = len;
+ array->ptr = ret;
+ return array;
+ }
+ heap_free( array );
+ }
+ return NULL;
}
static WCHAR *get_referenceddomainname( LSA_REFERENCED_DOMAIN_LIST *domain )
{
diff --git a/dlls/wbemprox/table.c b/dlls/wbemprox/table.c
index 0c57f26..273b8cb 100644
--- a/dlls/wbemprox/table.c
+++ b/dlls/wbemprox/table.c
@@ -288,10 +288,15 @@ void free_row_values( const struct table *table, UINT row )
if (!(table->columns[i].type & COL_FLAG_DYNAMIC)) continue;
type = table->columns[i].type & COL_TYPE_MASK;
- if (type == CIM_STRING || type == CIM_DATETIME || (type & CIM_FLAG_ARRAY))
+ if (type == CIM_STRING || type == CIM_DATETIME)
{
if (get_value( table, row, i, &val ) == S_OK) heap_free( (void *)(INT_PTR)val );
}
+ else if (type & CIM_FLAG_ARRAY)
+ {
+ if (get_value( table, row, i, &val ) == S_OK)
+ destroy_array( (void *)(INT_PTR)val, type & CIM_TYPE_MASK );
+ }
}
}
--
2.3.5

View File

@ -1,129 +0,0 @@
From 7a6e4a5a97cf2dc1c2ffbbee5a4acbea9c762977 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 16 Apr 2015 21:46:13 +0200
Subject: wbemprox: Add support for Win32_SystemEnclosure.
---
dlls/wbemprox/builtin.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index f1f51c5..21d0030 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -98,6 +98,8 @@ static const WCHAR class_sidW[] =
{'W','i','n','3','2','_','S','I','D',0};
static const WCHAR class_sounddeviceW[] =
{'W','i','n','3','2','_','S','o','u','n','d','D','e','v','i','c','e',0};
+static const WCHAR class_systemenclosureW[] =
+ {'W','i','n','3','2','_','S','y','s','t','e','m','E','n','c','l','o','s','u','r','e',0};
static const WCHAR class_videocontrollerW[] =
{'W','i','n','3','2','_','V','i','d','e','o','C','o','n','t','r','o','l','l','e','r',0};
@@ -133,6 +135,8 @@ static const WCHAR prop_capacityW[] =
{'C','a','p','a','c','i','t','y',0};
static const WCHAR prop_captionW[] =
{'C','a','p','t','i','o','n',0};
+static const WCHAR prop_chassistypesW[] =
+ {'C','h','a','s','s','i','s','T','y','p','e','s',0};
static const WCHAR prop_classW[] =
{'C','l','a','s','s',0};
static const WCHAR prop_codesetW[] =
@@ -225,6 +229,8 @@ static const WCHAR prop_localdatetimeW[] =
{'L','o','c','a','l','D','a','t','e','T','i','m','e',0};
static const WCHAR prop_localeW[] =
{'L','o','c','a','l','e',0};
+static const WCHAR prop_lockpresentW[] =
+ {'L','o','c','k','P','r','e','s','e','n','t',0};
static const WCHAR prop_macaddressW[] =
{'M','A','C','A','d','d','r','e','s','s',0};
static const WCHAR prop_manufacturerW[] =
@@ -590,6 +596,16 @@ static const struct column col_stdregprov[] =
{ method_enumvaluesW, CIM_FLAG_ARRAY|COL_FLAG_METHOD },
{ method_getstringvalueW, CIM_FLAG_ARRAY|COL_FLAG_METHOD }
};
+static const struct column col_systemenclosure[] =
+{
+ { prop_captionW, CIM_STRING },
+ { prop_chassistypesW, CIM_UINT16|CIM_FLAG_ARRAY },
+ { prop_descriptionW, CIM_STRING },
+ { prop_lockpresentW, CIM_BOOLEAN },
+ { prop_manufacturerW, CIM_STRING },
+ { prop_nameW, CIM_STRING },
+ { prop_tagW, CIM_STRING },
+};
static const struct column col_systemsecurity[] =
{
{ method_getsdW, CIM_FLAG_ARRAY|COL_FLAG_METHOD },
@@ -702,6 +718,12 @@ static const WCHAR physicalmedia_tagW[] =
{'\\','\\','.','\\','P','H','Y','S','I','C','A','L','D','R','I','V','E','0',0};
static const WCHAR sounddevice_productnameW[] =
{'W','i','n','e',' ','A','u','d','i','o',' ','D','e','v','i','c','e',0};
+static const WCHAR systemenclosure_systemenclosureW[] =
+ {'S','y','s','t','e','m',' ','E','n','c','l','o','s','u','r','e',0};
+static const WCHAR systemenclosure_tagW[] =
+ {'S','y','s','t','e','m',' ','E','n','c','l','o','s','u','r','e',' ','0',0};
+static const WCHAR systemenclosure_ManufacturerW[] =
+ {'W','i','n','e',0};
static const WCHAR videocontroller_dactypeW[] =
{'I','n','t','e','g','r','a','t','e','d',' ','R','A','M','D','A','C',0};
static const WCHAR videocontroller_deviceidW[] =
@@ -960,6 +982,16 @@ struct record_systemsecurity
class_method *getsd;
class_method *setsd;
};
+struct record_systemenclosure
+{
+ const WCHAR *caption;
+ const struct array *chassistypes;
+ const WCHAR *description;
+ int lockpresent;
+ const WCHAR *manufacturer;
+ const WCHAR *name;
+ const WCHAR *tag;
+};
struct record_videocontroller
{
const WCHAR *adapter_dactype;
@@ -1044,6 +1076,30 @@ static const struct record_stdregprov data_stdregprov[] =
{
{ reg_enum_key, reg_enum_values, reg_get_stringvalue }
};
+
+static UINT16 chassistypes[] =
+{
+ 1,
+};
+
+static const struct array chassistypes_array =
+{
+ sizeof(chassistypes)/sizeof(chassistypes[0]),
+ &chassistypes
+};
+
+static const struct record_systemenclosure data_systemenclosure[] =
+{
+ {
+ systemenclosure_systemenclosureW,
+ &chassistypes_array,
+ systemenclosure_systemenclosureW,
+ FALSE,
+ systemenclosure_ManufacturerW,
+ systemenclosure_systemenclosureW,
+ systemenclosure_tagW,
+ }
+};
static const struct record_systemsecurity data_systemsecurity[] =
{
{ security_get_sd, security_set_sd }
@@ -2817,6 +2873,7 @@ static struct table builtin_classes[] =
{ class_sounddeviceW, SIZEOF(col_sounddevice), col_sounddevice, SIZEOF(data_sounddevice), 0, (BYTE *)data_sounddevice },
{ class_stdregprovW, SIZEOF(col_stdregprov), col_stdregprov, SIZEOF(data_stdregprov), 0, (BYTE *)data_stdregprov },
{ class_systemsecurityW, SIZEOF(col_systemsecurity), col_systemsecurity, SIZEOF(data_systemsecurity), 0, (BYTE *)data_systemsecurity },
+ { class_systemenclosureW, SIZEOF(col_systemenclosure), col_systemenclosure, SIZEOF(data_systemenclosure), 0, (BYTE *)data_systemenclosure },
{ class_videocontrollerW, SIZEOF(col_videocontroller), col_videocontroller, 0, 0, NULL, fill_videocontroller }
};
--
2.3.5

View File

@ -1,2 +0,0 @@
Fixes: [34517] Add support for wbemprox Win32_SystemEnclosure table
Category: stable