Andrey Turkin : loadperf: Add UnloadPerfCounterTextStrings stubs.
Alexandre Julliard
julliard at winehq.org
Wed Jan 7 10:57:14 CST 2009
Module: wine
Branch: master
Commit: 0eebcf57c32688a15a0195453cf9831df5123b08
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0eebcf57c32688a15a0195453cf9831df5123b08
Author: Andrey Turkin <andrey.turkin at gmail.com>
Date: Wed Jan 7 13:34:45 2009 +0300
loadperf: Add UnloadPerfCounterTextStrings stubs.
---
dlls/loadperf/loadperf.spec | 4 +-
dlls/loadperf/loadperf_main.c | 45 +++++++++++++++++++++++++++++++++++++++++
include/Makefile.in | 1 +
include/loadperf.h | 34 +++++++++++++++++++++++++++++++
4 files changed, 82 insertions(+), 2 deletions(-)
diff --git a/dlls/loadperf/loadperf.spec b/dlls/loadperf/loadperf.spec
index 9b64cf4..2ea2680 100644
--- a/dlls/loadperf/loadperf.spec
+++ b/dlls/loadperf/loadperf.spec
@@ -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
diff --git a/dlls/loadperf/loadperf_main.c b/dlls/loadperf/loadperf_main.c
index 74ba24e..8dbfab7 100644
--- a/dlls/loadperf/loadperf_main.c
+++ b/dlls/loadperf/loadperf_main.c
@@ -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;
+}
diff --git a/include/Makefile.in b/include/Makefile.in
index 8f004f2..8604b8f 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -259,6 +259,7 @@ SRCDIR_INCLUDES = \
lmuse.h \
lmuseflg.h \
lmwksta.h \
+ loadperf.h \
lzexpand.h \
mapi.h \
mapicode.h \
diff --git a/include/loadperf.h b/include/loadperf.h
new file mode 100644
index 0000000..74472c7
--- /dev/null
+++ b/include/loadperf.h
@@ -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 */
More information about the wine-cvs
mailing list