From 86635b3c48742bb0a4fb4850733c0cb882733228 Mon Sep 17 00:00:00 2001 From: Andrey Turkin Date: Mon, 12 Jan 2009 03:35:01 +0300 Subject: [PATCH] loadperf: Add LoadPerfCounterTextStrings stubs. --- dlls/loadperf/loadperf.spec | 4 ++-- dlls/loadperf/loadperf_main.c | 41 +++++++++++++++++++++++++++++++++++ include/loadperf.h | 4 ++++ 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/dlls/loadperf/loadperf.spec b/dlls/loadperf/loadperf.spec index 2ea2680f55b..b46fe29f084 100644 --- a/dlls/loadperf/loadperf.spec +++ b/dlls/loadperf/loadperf.spec @@ -3,8 +3,8 @@ @ stub InstallPerfDllW @ stub LoadMofFromInstalledServiceA @ stub LoadMofFromInstalledServiceW -@ stub LoadPerfCounterTextStringsA -@ stub LoadPerfCounterTextStringsW +@ stdcall LoadPerfCounterTextStringsA(str long) +@ stdcall LoadPerfCounterTextStringsW(wstr long) @ stub RestorePerfRegistryFromFileW @ stub SetServiceAsTrustedA @ stub SetServiceAsTrustedW diff --git a/dlls/loadperf/loadperf_main.c b/dlls/loadperf/loadperf_main.c index 8dbfab7c394..89a9c4f7880 100644 --- a/dlls/loadperf/loadperf_main.c +++ b/dlls/loadperf/loadperf_main.c @@ -50,6 +50,47 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE; } +/************************************************************* + * LoadPerfCounterTextStringsA (loadperf.@) + * + * NOTES + * See LoadPerfCounterTextStringsW + */ +DWORD WINAPI LoadPerfCounterTextStringsA(LPCSTR cmdline, BOOL quiet) +{ + 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 = LoadPerfCounterTextStringsW(cmdlineW, quiet); + + HeapFree(GetProcessHeap(), 0, cmdlineW); + + return ret; +} + +/************************************************************* + * LoadPerfCounterTextStringsW (loadperf.@) + * + * PARAMS + * cmdline [in] Last argument in command line - ini file to be used + * quiet [in] FALSE - the function may write to stdout + * + */ +DWORD WINAPI LoadPerfCounterTextStringsW(LPCWSTR cmdline, BOOL quiet) +{ + FIXME("(%s, %d): stub\n", debugstr_w(cmdline), quiet); + + return ERROR_SUCCESS; +} + /************************************************************* * UnloadPerfCounterTextStringsA (loadperf.@) * diff --git a/include/loadperf.h b/include/loadperf.h index 74472c73d43..45679a26d01 100644 --- a/include/loadperf.h +++ b/include/loadperf.h @@ -23,6 +23,10 @@ extern "C" { #endif +DWORD WINAPI LoadPerfCounterTextStringsA(LPCSTR, BOOL); +DWORD WINAPI LoadPerfCounterTextStringsW(LPCWSTR, BOOL); +#define LoadPerfCounterTextStrings WINELIB_NAME_AW(LoadPerfCounterTextStrings) + DWORD WINAPI UnloadPerfCounterTextStringsA(LPCSTR, BOOL); DWORD WINAPI UnloadPerfCounterTextStringsW(LPCWSTR, BOOL); #define UnloadPerfCounterTextStrings WINELIB_NAME_AW(UnloadPerfCounterTextStrings)