[Wine-devel] Eter's patch is applied to winehq repo 03/29/17
builder-robot на etersoft.ru
builder-robot на etersoft.ru
Ср Мар 29 23:10:16 MSK 2017
New Etersoft's patches since last build time:
commit 7cbaf1f56f6d1932123e4275b5fe6f63e7083674
Author: Vitaly Lipatov <lav на etersoft.ru>
advapi32/tests: Add test prototype for RegQueryValueEx HKEY_PERFORMANCE_DATA.
commit 2884205db3a1d25d407b7c88e378520606f93578
Author: Vitaly Lipatov <lav на etersoft.ru>
include: Add PERF_DATA_BLOCK struct definition.
---
commit 7cbaf1f56f6d1932123e4275b5fe6f63e7083674
Author: Vitaly Lipatov <lav на etersoft.ru>
Date: Wed Mar 22 14:03:46 2017 +0300
advapi32/tests: Add test prototype for RegQueryValueEx HKEY_PERFORMANCE_DATA.
Signed-off-by: Vitaly Lipatov <lav на etersoft.ru>
Signed-off-by: Alexandre Julliard <julliard на winehq.org>
diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c
index eb9ab67..4ea0f68 100644
--- a/dlls/advapi32/tests/registry.c
+++ b/dlls/advapi32/tests/registry.c
@@ -27,6 +27,7 @@
#include "winbase.h"
#include "winternl.h"
#include "winreg.h"
+#include "winperf.h"
#include "winsvc.h"
#include "winerror.h"
#include "aclapi.h"
@@ -3480,6 +3481,54 @@ static void test_RegNotifyChangeKeyValue(void)
CloseHandle(event);
}
+static void test_RegQueryValueExPerformanceData(void)
+{
+ DWORD cbData, len;
+ BYTE *value;
+ DWORD dwret;
+ LONG limit = 6;
+ PERF_DATA_BLOCK *pdb;
+
+ /* Test with data == NULL */
+ dwret = RegQueryValueExA( HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, NULL, &cbData );
+ todo_wine ok( dwret == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", dwret );
+
+ /* Test ERROR_MORE_DATA, start with small buffer */
+ len = 10;
+ value = HeapAlloc(GetProcessHeap(), 0, len);
+ cbData = len;
+ dwret = RegQueryValueExA( HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, value, &cbData );
+ todo_wine ok( dwret == ERROR_MORE_DATA, "expected ERROR_MORE_DATA, got %d\n", dwret );
+ while( dwret == ERROR_MORE_DATA && limit)
+ {
+ len = len * 10;
+ value = HeapReAlloc( GetProcessHeap(), 0, value, len );
+ cbData = len;
+ dwret = RegQueryValueExA( HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, value, &cbData );
+ limit--;
+ }
+ ok(limit > 0, "too many times ERROR_MORE_DATA returned\n");
+
+ todo_wine ok(dwret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", dwret);
+
+ /* Check returned data */
+ if (dwret == ERROR_SUCCESS)
+ {
+ todo_wine ok(len >= sizeof(PERF_DATA_BLOCK), "got size %d\n", len);
+ if (len >= sizeof(PERF_DATA_BLOCK)) {
+ pdb = (PERF_DATA_BLOCK*) value;
+ ok(pdb->Signature[0] == 'P', "expected Signature[0] = 'P', got 0x%x\n", pdb->Signature[0]);
+ ok(pdb->Signature[1] == 'E', "expected Signature[1] = 'E', got 0x%x\n", pdb->Signature[1]);
+ ok(pdb->Signature[2] == 'R', "expected Signature[2] = 'R', got 0x%x\n", pdb->Signature[2]);
+ ok(pdb->Signature[3] == 'F', "expected Signature[3] = 'F', got 0x%x\n", pdb->Signature[3]);
+ /* TODO: check other field */
+ }
+ }
+
+ HeapFree(GetProcessHeap(), 0, value);
+}
+
+
START_TEST(registry)
{
/* Load pointers for functions that are not available in all Windows versions */
@@ -3515,6 +3564,7 @@ START_TEST(registry)
test_delete_key_value();
test_RegOpenCurrentUser();
test_RegNotifyChangeKeyValue();
+ test_RegQueryValueExPerformanceData();
/* cleanup */
delete_key( hkey_main );
commit 2884205db3a1d25d407b7c88e378520606f93578
Author: Vitaly Lipatov <lav на etersoft.ru>
Date: Wed Mar 22 14:03:45 2017 +0300
include: Add PERF_DATA_BLOCK struct definition.
Signed-off-by: Vitaly Lipatov <lav на etersoft.ru>
Signed-off-by: Alexandre Julliard <julliard на winehq.org>
diff --git a/include/winperf.h b/include/winperf.h
index b62f24b..dce1a6d 100644
--- a/include/winperf.h
+++ b/include/winperf.h
@@ -67,4 +67,25 @@
#define PERF_DETAIL_EXPERT 300
#define PERF_DETAIL_WIZARD 400
+/* Performance data structure header
+ * returned in answer to HKEY_PERFORMANCE_DATA request
+ */
+
+typedef struct _PERF_DATA_BLOCK {
+ WCHAR Signature[4];
+ DWORD LittleEndian;
+ DWORD Version;
+ DWORD Revision;
+ DWORD TotalByteLength;
+ DWORD HeaderLength;
+ DWORD NumObjectTypes;
+ DWORD DefaultObject;
+ SYSTEMTIME SystemTime;
+ LARGE_INTEGER PerfTime;
+ LARGE_INTEGER PerfFreq;
+ LARGE_INTEGER PerfTime100nSec;
+ DWORD SystemNameLength;
+ DWORD SystemNameOffset;
+} PERF_DATA_BLOCK, *PPERF_DATA_BLOCK, *LPPERF_DATA_BLOCK;
+
#endif /* _WINPERF_ */
Подробная информация о списке рассылки Wine-devel