loadperf: Add UnloadPerfCounterTextStrings stubs.
[wine] / dlls / loadperf / loadperf_main.c
1 /*
2  * Implementation of loadperf.dll
3  *
4  * Copyright 2009 Andrey Turkin
5  *
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.
10  *
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.
15  *
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
19  */
20
21 #include "config.h"
22
23 #include <stdarg.h>
24
25 #include "windef.h"
26 #include "winbase.h"
27 #include "winerror.h"
28 #include "winnls.h"
29 #include "wine/debug.h"
30
31 #include "loadperf.h"
32
33 WINE_DEFAULT_DEBUG_CHANNEL(loadperf);
34
35 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
36 {
37     TRACE("(0x%p, %d, %p)\n",hinstDLL,fdwReason,lpvReserved);
38
39     switch(fdwReason)
40     {
41     case DLL_WINE_PREATTACH:
42         return FALSE; /* prefer native version */
43     case DLL_PROCESS_ATTACH:
44         DisableThreadLibraryCalls(hinstDLL);
45         break;
46     case DLL_PROCESS_DETACH:
47         break;
48     }
49
50     return TRUE;
51 }
52
53 /*************************************************************
54  *     UnloadPerfCounterTextStringsA (loadperf.@)
55  *
56  * NOTES
57  *   See UnloadPerfCounterTextStringsW
58  */
59 DWORD WINAPI UnloadPerfCounterTextStringsA(LPCSTR cmdline, BOOL verbose)
60 {
61     DWORD ret;
62     LPWSTR cmdlineW = NULL;
63
64     if (cmdline)
65     {
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);
70     }
71
72     ret = UnloadPerfCounterTextStringsW(cmdlineW, verbose);
73
74     HeapFree(GetProcessHeap(), 0, cmdlineW);
75
76     return ret;
77 }
78
79 /*************************************************************
80  *     UnloadPerfCounterTextStringsW (loadperf.@)
81  *
82  * PARAMS
83  *   cmdline [in] Last argument in command line - application counters to be removed
84  *   verbose [in] TRUE - the function may write to stdout
85  *
86  */
87 DWORD WINAPI UnloadPerfCounterTextStringsW(LPCWSTR cmdline, BOOL verbose)
88 {
89     FIXME("(%s, %d): stub\n", debugstr_w(cmdline), verbose);
90
91     return ERROR_SUCCESS;
92 }