wine.inf-Performance: Add 'Counters' to the perflib key as an alias for 'Counter'.

This commit is contained in:
Sebastian Lackner 2017-05-29 02:45:00 +02:00
parent 6e372d0550
commit 5cc0023094
3 changed files with 94 additions and 1 deletions

View File

@ -8633,12 +8633,16 @@ fi
# | * [#33661] Add performance library registry keys needed by MS SQL Server Management Studio Express 2008 R2
# |
# | Modified files:
# | * loader/wine.inf.in
# | * dlls/advapi32/tests/registry.c, loader/wine.inf.in
# |
if test "$enable_wine_inf_Performance" -eq 1; then
patch_apply wine.inf-Performance/0001-wine.inf-Add-registry-keys-for-Windows-Performance-L.patch
patch_apply wine.inf-Performance/0002-wine.inf-Add-Counters-to-the-perflib-key-as-an-alias.patch
patch_apply wine.inf-Performance/0003-advapi32-tests-Add-test-for-perflib-registry-key.patch
(
printf '%s\n' '+ { "Daniel Jelinski", "wine.inf: Add registry keys for Windows Performance Library.", 1 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "wine.inf: Add '\''Counters'\'' to the perflib key as an alias for '\''Counter'\''.", 1 },';
printf '%s\n' '+ { "Michael Müller", "advapi32/tests: Add test for perflib registry key.", 1 },';
) >> "$patchlist"
fi

View File

@ -0,0 +1,26 @@
From 9a3d921b80c5c602bbb130457f0f67c79da44660 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 23 May 2017 14:59:15 +0800
Subject: wine.inf: Add 'Counters' to the perflib key as an alias for
'Counter'.
Visual Studio 6.0 setup depends on this.
---
loader/wine.inf.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index 6f6ae55b0f7..7fa93a62630 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -522,6 +522,7 @@ HKLM,%CurrentVersionNT%\Perflib,,16
HKLM,%CurrentVersionNT%\Perflib,Last Counter,0x10003,1846
HKLM,%CurrentVersionNT%\Perflib,Last Help,0x10003,1847
HKLM,%CurrentVersionNT%\Perflib\009,Counter,0x10002,1,1847,1846,End Marker
+HKLM,%CurrentVersionNT%\Perflib\009,Counters,0x10002,1,1847,1846,End Marker
HKLM,%CurrentVersionNT%\Perflib\009,Help,0x10002,1847,End Marker
HKLM,%CurrentVersionNT%\Ports,,16
HKLM,%CurrentVersionNT%\Print,,16
--
2.12.2

View File

@ -0,0 +1,63 @@
From 5a0796af64d474437f7c26620efe6560f8961b55 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 29 May 2017 01:59:36 +0200
Subject: advapi32/tests: Add test for perflib registry key.
---
dlls/advapi32/tests/registry.c | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index ddde9059222..f6b7736c83c 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -3293,6 +3293,38 @@ static void test_classesroot_mask(void)
RegCloseKey( hkey );
}
+static void test_perflib_key(void)
+{
+ DWORD size;
+ LONG ret;
+ HKEY key;
+
+ ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Perflib\\009", &key);
+ ok(ret == ERROR_SUCCESS, "RegOpenKeyA failed with error %u\n", ret);
+
+ ret = RegQueryValueExA(key, "Counter", NULL, NULL, NULL, &size);
+ if (ret != ERROR_SUCCESS)
+ {
+ skip("Perflib\\009\\Counter does not exist, skipping perflib test\n");
+ goto done;
+ }
+ ok(ret == ERROR_SUCCESS, "RegQueryValueExA failed with error %u\n", ret);
+
+ /* Windows only compares the first few characters of the value name.
+ * On Windows XP / 2003, it is sufficient to use "Cou", newer versions
+ * require a longer substring. */
+
+ ret = RegQueryValueExA(key, "Counters", NULL, NULL, NULL, &size);
+ ok(ret == ERROR_SUCCESS, "RegQueryValueExA failed with error %u\n", ret);
+ ret = RegQueryValueExA(key, "Counter2", NULL, NULL, NULL, &size);
+ todo_wine ok(ret == ERROR_SUCCESS, "RegQueryValueExA failed with error %u\n", ret);
+ ret = RegQueryValueExA(key, "CounterWine", NULL, NULL, NULL, &size);
+ todo_wine ok(ret == ERROR_SUCCESS, "RegQueryValueExA failed with error %u\n", ret);
+
+done:
+ RegCloseKey(key);
+}
+
static void test_deleted_key(void)
{
HKEY hkey, hkey2;
@@ -3741,6 +3773,7 @@ START_TEST(registry)
test_classesroot();
test_classesroot_enum();
test_classesroot_mask();
+ test_perflib_key();
test_reg_save_key();
test_reg_load_key();
test_reg_unload_key();
--
2.12.2