From: Austin English Subject: [PATCH] advapi32: add initial Perf* stubs Message-Id: <20171116214444.21048-1-austinenglish@gmail.com> Date: Thu, 16 Nov 2017 15:44:44 -0600 Signed-off-by: Austin English --- dlls/advapi32/Makefile.in | 1 + dlls/advapi32/advapi32.spec | 14 ++++----- dlls/advapi32/perf.c | 71 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 7 deletions(-) create mode 100644 dlls/advapi32/perf.c diff --git a/dlls/advapi32/Makefile.in b/dlls/advapi32/Makefile.in index ff6452a91b..224286f28c 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 359efc9ad1..4645f3c573 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 0000000000..0f23c92fdd --- /dev/null +++ b/dlls/advapi32/perf.c @@ -0,0 +1,71 @@ +/* + * win32 advapi 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 + +#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; +} -- 2.13.6