[pkg-wine-party] [wine] 80/122: advapi32: Add initial Perf* stubs.

Michael Gilbert mgilbert at moszumanska.debian.org
Sun Nov 26 23:48:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

mgilbert pushed a commit to branch master
in repository wine.

commit adc8d95e02e00dcdb48da209219989ad4b70e059
Author: Austin English <austinenglish at gmail.com>
Date:   Fri Nov 17 17:40:06 2017 -0600

    advapi32: Add initial Perf* stubs.
    
    Signed-off-by: Austin English <austinenglish at gmail.com>
    Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
 dlls/advapi32/Makefile.in       |  1 +
 dlls/advapi32/advapi32.spec     | 14 ++++----
 dlls/advapi32/perf.c            | 71 +++++++++++++++++++++++++++++++++++++++++
 dlls/kernelbase/kernelbase.spec | 14 ++++----
 include/Makefile.in             |  1 +
 include/perflib.h               | 58 +++++++++++++++++++++++++++++++++
 6 files changed, 145 insertions(+), 14 deletions(-)

diff --git a/dlls/advapi32/Makefile.in b/dlls/advapi32/Makefile.in
index ff6452a..224286f 100644
--- a/dlls/advapi32/Makefile.in
+++ b/dlls/advapi32/Makefile.in
@@ -16,6 +16,7 @@ C_SRCS = \
 	crypt_sha.c \
 	eventlog.c \
 	lsa.c \
+	perf.c \
 	registry.c \
 	security.c \
 	service.c \
diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
index 359efc9..4645f3c 100644
--- a/dlls/advapi32/advapi32.spec
+++ b/dlls/advapi32/advapi32.spec
@@ -553,11 +553,11 @@
 # @ stub OperationStart
 # @ stub PerfAddCounters
 # @ stub PerfCloseQueryHandle
-# @ stub PerfCreateInstance
+@ stdcall PerfCreateInstance(long ptr wstr long)
 # @ stub PerfDecrementULongCounterValue
 # @ stub PerfDecrementULongLongCounterValue
 # @ stub PerfDeleteCounters
-# @ stub PerfDeleteInstance
+@ stdcall PerfDeleteInstance(long ptr)
 # @ stub PerfEnumerateCounterSet
 # @ stub PerfEnumerateCounterSetInstances
 # @ stub PerfIncrementULongCounterValue
@@ -573,13 +573,13 @@
 # @ stub PerfRegQueryInfoKey
 # @ stub PerfRegQueryValue
 # @ stub PerfRegSetValue
-# @ stub PerfSetCounterRefValue
-# @ stub PerfSetCounterSetInfo
+@ stdcall PerfSetCounterRefValue(long ptr long ptr)
+@ stdcall PerfSetCounterSetInfo(long ptr long)
 # @ stub PerfSetULongCounterValue
 # @ stub PerfSetULongLongCounterValue
-# @ stub PerfStartProvider
-# @ stub PerfStartProviderEx
-# @ stub PerfStopProvider
+@ stdcall PerfStartProvider(ptr ptr ptr)
+@ stdcall PerfStartProviderEx(ptr ptr ptr)
+@ stdcall PerfStopProvider(long)
 @ stdcall PrivilegeCheck(ptr ptr ptr)
 @ stdcall PrivilegedServiceAuditAlarmA(str str long ptr long)
 @ stdcall PrivilegedServiceAuditAlarmW(wstr wstr long ptr long)
diff --git a/dlls/advapi32/perf.c b/dlls/advapi32/perf.c
new file mode 100644
index 0000000..754af2a
--- /dev/null
+++ b/dlls/advapi32/perf.c
@@ -0,0 +1,71 @@
+/*
+ * advapi32 perf functions
+ *
+ * Copyright 2017 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdio.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "perflib.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(advapi);
+
+PPERF_COUNTERSET_INSTANCE WINAPI PerfCreateInstance(HANDLE handle, LPCGUID guid, const WCHAR *name, ULONG id)
+{
+    FIXME("%p %s %s %u: stub\n", handle, debugstr_guid(guid), debugstr_w(name), id);
+    return NULL;
+}
+
+ULONG WINAPI PerfDeleteInstance(HANDLE provider, PPERF_COUNTERSET_INSTANCE block)
+{
+    FIXME("%p %p: stub\n", provider, block);
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+ULONG WINAPI PerfSetCounterSetInfo(HANDLE handle, PPERF_COUNTERSET_INFO template, ULONG size)
+{
+    FIXME("%p %p %u: stub\n", handle, template, size);
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+ULONG WINAPI PerfSetCounterRefValue(HANDLE provider, PPERF_COUNTERSET_INSTANCE instance, ULONG counterid, void *address)
+{
+    FIXME("%p %p %u %p: stub\n", provider, instance, counterid, address);
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+ULONG WINAPI PerfStartProvider(GUID *guid, PERFLIBREQUEST callback, HANDLE *provider)
+{
+    FIXME("%s %p %p: stub\n", debugstr_guid(guid), callback, provider);
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+ULONG WINAPI PerfStartProviderEx(GUID *guid, PPERF_PROVIDER_CONTEXT context, HANDLE *provider)
+{
+    FIXME("%s %p %p: stub\n", debugstr_guid(guid), context, provider);
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+ULONG WINAPI PerfStopProvider(HANDLE handle)
+{
+    FIXME("%p: stub\n", handle);
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
index 395b658..1e57fe8 100644
--- a/dlls/kernelbase/kernelbase.spec
+++ b/dlls/kernelbase/kernelbase.spec
@@ -1144,20 +1144,20 @@
 @ stdcall PeekConsoleInputA(ptr ptr long ptr) kernel32.PeekConsoleInputA
 @ stdcall PeekConsoleInputW(ptr ptr long ptr) kernel32.PeekConsoleInputW
 @ stdcall PeekNamedPipe(long ptr long ptr ptr ptr) kernel32.PeekNamedPipe
-# @ stub PerfCreateInstance
+@ stdcall PerfCreateInstance(long ptr wstr long) advapi32.PerfCreateInstance
 # @ stub PerfDecrementULongCounterValue
 # @ stub PerfDecrementULongLongCounterValue
-# @ stub PerfDeleteInstance
+@ stdcall PerfDeleteInstance(long ptr) advapi32.PerfDeleteInstance
 # @ stub PerfIncrementULongCounterValue
 # @ stub PerfIncrementULongLongCounterValue
 # @ stub PerfQueryInstance
-# @ stub PerfSetCounterRefValue
-# @ stub PerfSetCounterSetInfo
+@ stdcall PerfSetCounterRefValue(long ptr long ptr) advapi32.PerfSetCounterRefValue
+@ stdcall PerfSetCounterSetInfo(long ptr long) advapi32.PerfSetCounterSetInfo
 # @ stub PerfSetULongCounterValue
 # @ stub PerfSetULongLongCounterValue
-# @ stub PerfStartProvider
-# @ stub PerfStartProviderEx
-# @ stub PerfStopProvider
+@ stdcall PerfStartProvider(ptr ptr ptr) advapi32.PerfStartProvider
+@ stdcall PerfStartProviderEx(ptr ptr ptr) advapi32.PerfStartProviderEx
+@ stdcall PerfStopProvider(long) advapi32.PerfStopProvider
 # @ stub PoolPerAppKeyStateInternal
 @ stdcall PostQueuedCompletionStatus(long long ptr ptr) kernel32.PostQueuedCompletionStatus
 # @ stub PrefetchVirtualMemory
diff --git a/include/Makefile.in b/include/Makefile.in
index d453dc8..fa1e427 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -568,6 +568,7 @@ HEADER_SRCS = \
 	patchapi.h \
 	pdh.h \
 	pdhmsg.h \
+	perflib.h \
 	physicalmonitorenumerationapi.h \
 	pktdef.h \
 	poppack.h \
diff --git a/include/perflib.h b/include/perflib.h
new file mode 100644
index 0000000..2d3f6ef
--- /dev/null
+++ b/include/perflib.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2017 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef _PERFLIB_H_
+#define _PERFLIB_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef LPVOID (CDECL * PERF_MEM_ALLOC)(SIZE_T,LPVOID);
+typedef void (CDECL * PERF_MEM_FREE)(LPVOID,LPVOID);
+typedef ULONG (WINAPI * PERFLIBREQUEST)(ULONG,PVOID,ULONG);
+
+typedef struct _PERF_COUNTERSET_INFO {
+    GUID CounterSetGuid;
+    GUID ProviderGuid;
+    ULONG NumCounters;
+    ULONG InstanceType;
+} PERF_COUNTERSET_INFO, * PPERF_COUNTERSET_INFO;
+
+typedef struct _PERF_COUNTERSET_INSTANCE {
+    GUID CounterSetGuid;
+    ULONG dwSize;
+    ULONG InstanceId;
+    ULONG InstanceNameOffset;
+    ULONG InstanceNameSize;
+} PERF_COUNTERSET_INSTANCE, * PPERF_COUNTERSET_INSTANCE;
+
+typedef struct _PROVIDER_CONTEXT {
+    DWORD ContextSize;
+    DWORD Reserved;
+    PERFLIBREQUEST ControlCallback;
+    PERF_MEM_ALLOC MemAllocRoutine;
+    PERF_MEM_FREE MemFreeRoutine;
+    LPVOID pMemContext;
+} PERF_PROVIDER_CONTEXT, * PPERF_PROVIDER_CONTEXT;
+
+#ifdef __cplusplus
+}       /* extern "C" */
+#endif
+
+#endif /* _PERFLIB_H_ */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wine/wine.git



More information about the pkg-wine-party mailing list