2 * Implementation of loadperf.dll
4 * Copyright 2009 Andrey Turkin
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(loadperf);
35 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
37 TRACE("(0x%p, %d, %p)\n",hinstDLL,fdwReason,lpvReserved);
41 case DLL_WINE_PREATTACH:
42 return FALSE; /* prefer native version */
43 case DLL_PROCESS_ATTACH:
44 DisableThreadLibraryCalls(hinstDLL);
46 case DLL_PROCESS_DETACH:
53 /*************************************************************
54 * UnloadPerfCounterTextStringsA (loadperf.@)
57 * See UnloadPerfCounterTextStringsW
59 DWORD WINAPI UnloadPerfCounterTextStringsA(LPCSTR cmdline, BOOL verbose)
62 LPWSTR cmdlineW = NULL;
66 INT len = MultiByteToWideChar(CP_ACP, 0, cmdline, -1, NULL, 0);
67 cmdlineW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
68 if (!cmdlineW) return ERROR_NOT_ENOUGH_MEMORY;
69 MultiByteToWideChar(CP_ACP, 0, cmdline, -1, cmdlineW, len);
72 ret = UnloadPerfCounterTextStringsW(cmdlineW, verbose);
74 HeapFree(GetProcessHeap(), 0, cmdlineW);
79 /*************************************************************
80 * UnloadPerfCounterTextStringsW (loadperf.@)
83 * cmdline [in] Last argument in command line - application counters to be removed
84 * verbose [in] TRUE - the function may write to stdout
87 DWORD WINAPI UnloadPerfCounterTextStringsW(LPCWSTR cmdline, BOOL verbose)
89 FIXME("(%s, %d): stub\n", debugstr_w(cmdline), verbose);