loadperf: Add UnloadPerfCounterTextStrings stubs.

This commit is contained in:
Andrey Turkin 2009-01-07 13:34:45 +03:00 committed by Alexandre Julliard
parent faa7366c70
commit 0eebcf57c3
4 changed files with 82 additions and 2 deletions

View File

@ -8,7 +8,7 @@
@ stub RestorePerfRegistryFromFileW
@ stub SetServiceAsTrustedA
@ stub SetServiceAsTrustedW
@ stub UnloadPerfCounterTextStringsA
@ stub UnloadPerfCounterTextStringsW
@ stdcall UnloadPerfCounterTextStringsA(str long)
@ stdcall UnloadPerfCounterTextStringsW(wstr long)
@ stub UpdatePerfNameFilesA
@ stub UpdatePerfNameFilesW

View File

@ -24,8 +24,12 @@
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "winnls.h"
#include "wine/debug.h"
#include "loadperf.h"
WINE_DEFAULT_DEBUG_CHANNEL(loadperf);
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
@ -45,3 +49,44 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return TRUE;
}
/*************************************************************
* UnloadPerfCounterTextStringsA (loadperf.@)
*
* NOTES
* See UnloadPerfCounterTextStringsW
*/
DWORD WINAPI UnloadPerfCounterTextStringsA(LPCSTR cmdline, BOOL verbose)
{
DWORD ret;
LPWSTR cmdlineW = NULL;
if (cmdline)
{
INT len = MultiByteToWideChar(CP_ACP, 0, cmdline, -1, NULL, 0);
cmdlineW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (!cmdlineW) return ERROR_NOT_ENOUGH_MEMORY;
MultiByteToWideChar(CP_ACP, 0, cmdline, -1, cmdlineW, len);
}
ret = UnloadPerfCounterTextStringsW(cmdlineW, verbose);
HeapFree(GetProcessHeap(), 0, cmdlineW);
return ret;
}
/*************************************************************
* UnloadPerfCounterTextStringsW (loadperf.@)
*
* PARAMS
* cmdline [in] Last argument in command line - application counters to be removed
* verbose [in] TRUE - the function may write to stdout
*
*/
DWORD WINAPI UnloadPerfCounterTextStringsW(LPCWSTR cmdline, BOOL verbose)
{
FIXME("(%s, %d): stub\n", debugstr_w(cmdline), verbose);
return ERROR_SUCCESS;
}

View File

@ -259,6 +259,7 @@ SRCDIR_INCLUDES = \
lmuse.h \
lmuseflg.h \
lmwksta.h \
loadperf.h \
lzexpand.h \
mapi.h \
mapicode.h \

34
include/loadperf.h Normal file
View File

@ -0,0 +1,34 @@
/*
* Copyright (C) 2009 Andrey Turkin
*
* 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 __WINE_LOADPERF_H
#define __WINE_LOADPERF_H
#ifdef __cplusplus
extern "C" {
#endif
DWORD WINAPI UnloadPerfCounterTextStringsA(LPCSTR, BOOL);
DWORD WINAPI UnloadPerfCounterTextStringsW(LPCWSTR, BOOL);
#define UnloadPerfCounterTextStrings WINELIB_NAME_AW(UnloadPerfCounterTextStrings)
#ifdef __cplusplus
}
#endif
#endif /* __WINE_LOADPERF_H */