Removed patches for SLGetWindowsInformationDWORD (accepted upstream).

This commit is contained in:
Sebastian Lackner 2015-03-13 15:09:40 +01:00
parent 5b7dc79ea0
commit 3c7f5898c0
7 changed files with 4 additions and 316 deletions

View File

@ -212,7 +212,7 @@ Included bug fixes and improvements
* Support for PulseAudio backend for audio ([Wine Bug #10495](https://bugs.winehq.org/show_bug.cgi?id=10495))
* Support for RtlDecompressBuffer ([Wine Bug #37449](https://bugs.winehq.org/show_bug.cgi?id=37449))
* Support for SHCreateSessionKey ([Wine Bug #35630](https://bugs.winehq.org/show_bug.cgi?id=35630))
* Support for SLGetWindowsInformationDWORD ([Wine Bug #36709](https://bugs.winehq.org/show_bug.cgi?id=36709))
* ~~Support for SLGetWindowsInformationDWORD~~ ([Wine Bug #36709](https://bugs.winehq.org/show_bug.cgi?id=36709))
* Support for TOOLTIPS_GetTipText edge cases ([Wine Bug #30648](https://bugs.winehq.org/show_bug.cgi?id=30648))
* Support for TransmitFile ([Wine Bug #5048](https://bugs.winehq.org/show_bug.cgi?id=5048))
* Support for WTSEnumerateProcessesW ([Wine Bug #29903](https://bugs.winehq.org/show_bug.cgi?id=29903))

1
debian/changelog vendored
View File

@ -5,6 +5,7 @@ wine-staging (1.7.39) UNRELEASED; urgency=low
* Added patch to implement proper locking of keystate and synchronization with desktop thread.
* Added patch to implement better stub function for NtQueryInformationJobObject.
* Removed patch to avoid hardcoded values for sizeof(GUID) (accepted upstream).
* Removed patches for SLGetWindowsInformationDWORD (accepted upstream).
-- Sebastian Lackner <sebastian@fds-team.de> Mon, 09 Mar 2015 16:52:35 +0100
wine-staging (1.7.38) unstable; urgency=low

View File

@ -180,7 +180,6 @@ patch_enable_all ()
enable_shell32_SHCreateSessionKey="$1"
enable_shell32_SHFileOperation="$1"
enable_shlwapi_UrlCombine="$1"
enable_slc_SLGetWindowsInformation="$1"
enable_urlmon_CoInternetSetFeatureEnabled="$1"
enable_user32_Dialog_Paint_Event="$1"
enable_user32_DrawTextExW="$1"
@ -583,9 +582,6 @@ patch_enable ()
shlwapi-UrlCombine)
enable_shlwapi_UrlCombine="$2"
;;
slc-SLGetWindowsInformation)
enable_slc_SLGetWindowsInformation="$2"
;;
urlmon-CoInternetSetFeatureEnabled)
enable_urlmon_CoInternetSetFeatureEnabled="$2"
;;
@ -3731,24 +3727,6 @@ if test "$enable_shlwapi_UrlCombine" -eq 1; then
) >> "$patchlist"
fi
# Patchset slc-SLGetWindowsInformation
# |
# | This patchset fixes the following Wine bugs:
# | * [#36709] Support for SLGetWindowsInformationDWORD
# |
# | Modified files:
# | * dlls/ntdll/ntdll.spec, dlls/ntdll/reg.c, dlls/ntdll/tests/reg.c, dlls/slc/slc.c, dlls/slc/tests/slc.c,
# | include/winternl.h, loader/wine.inf.in
# |
if test "$enable_slc_SLGetWindowsInformation" -eq 1; then
patch_apply slc-SLGetWindowsInformation/0001-ntdll-Implement-Nt-Zw-QueryLicenseValue.patch
patch_apply slc-SLGetWindowsInformation/0002-slc-Implement-SLGetWindowsInformationDWORD.patch
(
echo '+ { "Sebastian Lackner", "ntdll: Implement [Nt|Zw]QueryLicenseValue.", 1 },';
echo '+ { "Sebastian Lackner", "slc: Implement SLGetWindowsInformationDWORD.", 1 },';
) >> "$patchlist"
fi
# Patchset urlmon-CoInternetSetFeatureEnabled
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,195 +0,0 @@
From 93534274eab90da6059cdc56d1e58912d2071101 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 22 Dec 2014 20:01:29 +0100
Subject: ntdll: Implement [Nt|Zw]QueryLicenseValue.
---
dlls/ntdll/ntdll.spec | 2 ++
dlls/ntdll/reg.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++
dlls/ntdll/tests/reg.c | 2 +-
include/winternl.h | 1 +
loader/wine.inf.in | 26 ++++++++++++++++----
5 files changed, 90 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 51de6e7..da43cf0 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -255,6 +255,7 @@
@ stub NtQueryIntervalProfile
@ stdcall NtQueryIoCompletion(long long ptr long ptr)
@ stdcall NtQueryKey (long long ptr long ptr)
+@ stdcall NtQueryLicenseValue(ptr ptr ptr long ptr)
@ stdcall NtQueryMultipleValueKey(long ptr long ptr long ptr)
@ stdcall NtQueryMutant(long long ptr long ptr)
@ stdcall NtQueryObject(long long long long long)
@@ -1134,6 +1135,7 @@
@ stub ZwQueryIntervalProfile
@ stdcall ZwQueryIoCompletion(long long ptr long ptr) NtQueryIoCompletion
@ stdcall ZwQueryKey(long long ptr long ptr) NtQueryKey
+@ stdcall ZwQueryLicenseValue(ptr ptr ptr long ptr) NtQueryLicenseValue
@ stdcall ZwQueryMultipleValueKey(long ptr long ptr long ptr) NtQueryMultipleValueKey
@ stdcall ZwQueryMutant(long long ptr long ptr) NtQueryMutant
@ stdcall ZwQueryObject(long long long long long) NtQueryObject
diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c
index cdca88a..a104c2e 100644
--- a/dlls/ntdll/reg.c
+++ b/dlls/ntdll/reg.c
@@ -1401,3 +1401,67 @@ NTSTATUS WINAPI RtlWriteRegistryValue( ULONG RelativeTo, PCWSTR path, PCWSTR nam
return status;
}
+
+/*************************************************************************
+ * NtQueryLicenseValue [NTDLL.@]
+ *
+ * NOTES
+ * On Windows all license properties are stored in a single key, but
+ * unless there is some app which explicitly depends on that, there is
+ * no good reason to reproduce that.
+ */
+NTSTATUS WINAPI NtQueryLicenseValue( const UNICODE_STRING *name, ULONG *result_type,
+ PVOID data, ULONG length, ULONG *result_len )
+{
+ static const WCHAR LicenseInformationW[] = {'M','a','c','h','i','n','e','\\',
+ 'S','o','f','t','w','a','r','e','\\',
+ 'W','i','n','e','\\','L','i','c','e','n','s','e',
+ 'I','n','f','o','r','m','a','t','i','o','n',0};
+ KEY_VALUE_PARTIAL_INFORMATION *info;
+ NTSTATUS status = STATUS_OBJECT_NAME_NOT_FOUND;
+ DWORD info_length, count;
+ OBJECT_ATTRIBUTES attr;
+ UNICODE_STRING keyW;
+ HANDLE hkey;
+
+ if (!name || !name->Buffer || !name->Length || !result_len)
+ return STATUS_INVALID_PARAMETER;
+
+ info_length = FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data) + length;
+ info = RtlAllocateHeap( GetProcessHeap(), 0, info_length );
+ if (!info) return STATUS_NO_MEMORY;
+
+ attr.Length = sizeof(attr);
+ attr.RootDirectory = 0;
+ attr.ObjectName = &keyW;
+ attr.Attributes = 0;
+ attr.SecurityDescriptor = NULL;
+ attr.SecurityQualityOfService = NULL;
+ RtlInitUnicodeString( &keyW, LicenseInformationW );
+
+ /* @@ Wine registry key: HKLM\Software\Wine\LicenseInformation */
+ if (!NtOpenKey( &hkey, KEY_READ, &attr ))
+ {
+ status = NtQueryValueKey( hkey, name, KeyValuePartialInformation,
+ info, info_length, &count );
+ if (!status || status == STATUS_BUFFER_OVERFLOW)
+ {
+ if (result_type)
+ *result_type = info->Type;
+
+ *result_len = info->DataLength;
+
+ if (status == STATUS_BUFFER_OVERFLOW)
+ status = STATUS_BUFFER_TOO_SMALL;
+ else
+ memcpy( data, info->Data, info->DataLength );
+ }
+ NtClose( hkey );
+ }
+
+ if (status == STATUS_OBJECT_NAME_NOT_FOUND)
+ FIXME( "License key %s not found\n", debugstr_w(name->Buffer) );
+
+ RtlFreeHeap( GetProcessHeap(), 0, info );
+ return status;
+}
diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c
index 968c291..e7596b8 100644
--- a/dlls/ntdll/tests/reg.c
+++ b/dlls/ntdll/tests/reg.c
@@ -661,7 +661,7 @@ static void test_NtQueryLicenseKey(void)
if (!pNtQueryLicenseValue)
{
- skip("NtQueryLicenseValue not found, skipping tests\n");
+ win_skip("NtQueryLicenseValue not found, skipping tests\n");
return;
}
diff --git a/include/winternl.h b/include/winternl.h
index 1a694da..c448760 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2184,6 +2184,7 @@ NTSYSAPI NTSTATUS WINAPI NtQuerySystemTime(PLARGE_INTEGER);
NTSYSAPI NTSTATUS WINAPI NtQueryTimer(HANDLE,TIMER_INFORMATION_CLASS,PVOID,ULONG,PULONG);
NTSYSAPI NTSTATUS WINAPI NtQueryTimerResolution(PULONG,PULONG,PULONG);
NTSYSAPI NTSTATUS WINAPI NtQueryValueKey(HANDLE,const UNICODE_STRING *,KEY_VALUE_INFORMATION_CLASS,void *,DWORD,DWORD *);
+NTSYSAPI NTSTATUS WINAPI NtQueryLicenseValue(const UNICODE_STRING *,ULONG *,PVOID,ULONG,ULONG *);
NTSYSAPI NTSTATUS WINAPI NtQueryVirtualMemory(HANDLE,LPCVOID,MEMORY_INFORMATION_CLASS,PVOID,SIZE_T,SIZE_T*);
NTSYSAPI NTSTATUS WINAPI NtQueryVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS);
NTSYSAPI NTSTATUS WINAPI NtRaiseException(PEXCEPTION_RECORD,PCONTEXT,BOOL);
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index a4548f2..3c401b1 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -47,7 +47,8 @@ AddReg=\
Services, \
SessionMgr,\
Tapi,\
- Timezones
+ Timezones,\
+ LicenseInformation
[DefaultInstall.NT]
RegisterDlls=RegisterDllsSection
@@ -71,7 +72,8 @@ AddReg=\
SessionMgr,\
Tapi,\
Timezones,\
- VersionInfo
+ VersionInfo,\
+ LicenseInformation
[DefaultInstall.ntamd64]
RegisterDlls=RegisterDllsSection
@@ -97,7 +99,8 @@ AddReg=\
SessionMgr,\
Tapi,\
Timezones,\
- VersionInfo.ntamd64
+ VersionInfo.ntamd64,\
+ LicenseInformation
[Wow64Install]
RegisterDlls=RegisterDllsSection
@@ -111,7 +114,8 @@ AddReg=\
MCI,\
Misc,\
Tapi,\
- VersionInfo.ntamd64
+ VersionInfo.ntamd64,\
+ LicenseInformation
[DefaultInstall.Services]
AddService=BITS,0,BITSService
@@ -3140,3 +3144,17 @@ HKLM,Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Time Zones,"Symbol
HKLM,Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Time Zones,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\Time Zones"
HKLM,Software\Wow6432Node\Policies,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Policies"
HKLM,Software\Wow6432Node\Registered Applications,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Registered Applications"
+
+[LicenseInformation]
+; based on information from http://www.geoffchappell.com/notes/windows/license/install.htm
+HKLM,Software\Wine\LicenseInformation,"Kernel-MUI-Language-Allowed",,"EMPTY"
+HKLM,Software\Wine\LicenseInformation,"Kernel-MUI-Language-Disallowed",,"EMPTY"
+HKLM,Software\Wine\LicenseInformation,"Kernel-MUI-Number-Allowed",0x10001,1000
+HKLM,Software\Wine\LicenseInformation,"Shell-InBoxGames-FreeCell-EnableGame",0x10001,0x00000001
+HKLM,Software\Wine\LicenseInformation,"Shell-InBoxGames-Hearts-EnableGame",0x10001,0x00000001
+HKLM,Software\Wine\LicenseInformation,"Shell-InBoxGames-Minesweeper-EnableGame",0x10001,0x00000001
+HKLM,Software\Wine\LicenseInformation,"Shell-InBoxGames-PurblePlace-EnableGame",0x10001,0x00000001
+HKLM,Software\Wine\LicenseInformation,"Shell-InBoxGames-Shanghai-EnableGame",0x10001,0x00000001
+HKLM,Software\Wine\LicenseInformation,"Shell-InBoxGames-Solitaire-EnableGame",0x10001,0x00000001
+HKLM,Software\Wine\LicenseInformation,"Shell-InBoxGames-SpiderSolitaire-EnableGame",0x10001,0x00000001
+HKLM,Software\Wine\LicenseInformation,"Shell-PremiumInBoxGames-Chess-EnableGame",0x10001,0x00000001
--
2.2.1

View File

@ -1,95 +0,0 @@
From 03c03be0348f069e83b0817a525e3fcf69b31024 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 22 Dec 2014 20:27:07 +0100
Subject: slc: Implement SLGetWindowsInformationDWORD.
---
dlls/slc/slc.c | 24 ++++++++++++++++++++++--
dlls/slc/tests/slc.c | 6 ------
2 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/dlls/slc/slc.c b/dlls/slc/slc.c
index 1b02c9b..26190f4 100644
--- a/dlls/slc/slc.c
+++ b/dlls/slc/slc.c
@@ -19,8 +19,11 @@
#include <stdarg.h>
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
+#include "winternl.h"
#include "wine/debug.h"
#include "slpublic.h"
@@ -37,9 +40,26 @@ HRESULT WINAPI SLGetWindowsInformation(LPCWSTR name, SLDATATYPE *type, UINT *val
HRESULT WINAPI SLGetWindowsInformationDWORD(LPCWSTR lpszValueName, LPDWORD pdwValue)
{
- FIXME("(%s) stub\n", debugstr_w(lpszValueName) );
+ UNICODE_STRING nameW;
+ NTSTATUS status;
+ ULONG type, len;
- return SL_E_RIGHT_NOT_GRANTED;
+ TRACE("(%s)\n", debugstr_w(lpszValueName) );
+
+ if (!lpszValueName || !pdwValue)
+ return E_INVALIDARG;
+ if (!lpszValueName[0])
+ return SL_E_RIGHT_NOT_GRANTED;
+
+ RtlInitUnicodeString( &nameW, lpszValueName );
+ status = NtQueryLicenseValue( &nameW, &type, pdwValue, sizeof(DWORD), &len );
+
+ if ((!status || status == STATUS_BUFFER_TOO_SMALL) && (type != REG_DWORD))
+ return SL_E_DATATYPE_MISMATCHED;
+ if (status == STATUS_OBJECT_NAME_NOT_FOUND)
+ return SL_E_VALUE_NOT_FOUND;
+
+ return status ? E_FAIL : S_OK;
}
/***********************************************************************
diff --git a/dlls/slc/tests/slc.c b/dlls/slc/tests/slc.c
index 723cd4c..b9296b2 100644
--- a/dlls/slc/tests/slc.c
+++ b/dlls/slc/tests/slc.c
@@ -40,16 +40,13 @@ static void test_SLGetWindowsInformationDWORD(void)
HRESULT res;
res = SLGetWindowsInformationDWORD(NonexistentLicenseValueW, NULL);
- todo_wine
ok(res == E_INVALIDARG, "expected E_INVALIDARG, got %08x\n", res);
res = SLGetWindowsInformationDWORD(NULL, &value);
- todo_wine
ok(res == E_INVALIDARG, "expected E_INVALIDARG, got %08x\n", res);
value = 0xdeadbeef;
res = SLGetWindowsInformationDWORD(NonexistentLicenseValueW, &value);
- todo_wine
ok(res == SL_E_VALUE_NOT_FOUND, "expected SL_E_VALUE_NOT_FOUND, got %08x\n", res);
ok(value == 0xdeadbeef, "expected value = 0xdeadbeef, got %u\n", value);
@@ -61,15 +58,12 @@ static void test_SLGetWindowsInformationDWORD(void)
value = 0xdeadbeef;
res = SLGetWindowsInformationDWORD(KernelMUILanguageAllowedW, &value);
- todo_wine
ok(res == SL_E_DATATYPE_MISMATCHED, "expected SL_E_DATATYPE_MISMATCHED, got %08x\n", res);
ok(value == 0xdeadbeef, "expected value = 0xdeadbeef, got %u\n", value);
value = 0xdeadbeef;
res = SLGetWindowsInformationDWORD(KernelMUINumberAllowedW, &value);
- todo_wine
ok(res == S_OK, "expected S_OK, got %u\n", res);
- todo_wine
ok(value != 0xdeadbeef, "expected value != 0xdeadbeef\n");
}
--
2.2.1

View File

@ -1 +0,0 @@
Fixes: [36709] Support for SLGetWindowsInformationDWORD

View File

@ -473,7 +473,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c
--- a/dlls/d3d8/tests/visual.c
+++ b/dlls/d3d8/tests/visual.c
@@ -5033,7 +5033,11 @@
@@ -5034,7 +5034,11 @@
fill_surface(surface_managed, 0x0000ff00, D3DLOCK_NO_DIRTY_UPDATE);
add_dirty_rect_test_draw(device);
color = getPixelColor(device, 320, 240);
@ -1678,7 +1678,7 @@ diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -16368,7 +16368,11 @@
@@ -16365,7 +16365,11 @@
fill_surface(surface_managed, 0x0000ff00, D3DLOCK_NO_DIRTY_UPDATE);
add_dirty_rect_test_draw(device);
color = getPixelColor(device, 320, 240);