advapi32: Add initial Perf* stubs.

Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Austin English 2017-11-17 17:40:06 -06:00 committed by Alexandre Julliard
parent a6a477dd58
commit adc8d95e02
6 changed files with 145 additions and 14 deletions

View File

@ -16,6 +16,7 @@ C_SRCS = \
crypt_sha.c \
eventlog.c \
lsa.c \
perf.c \
registry.c \
security.c \
service.c \

View File

@ -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)

71
dlls/advapi32/perf.c Normal file
View File

@ -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;
}

View File

@ -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

View File

@ -568,6 +568,7 @@ HEADER_SRCS = \
patchapi.h \
pdh.h \
pdhmsg.h \
perflib.h \
physicalmonitorenumerationapi.h \
pktdef.h \
poppack.h \

58
include/perflib.h Normal file
View File

@ -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_ */