winex11.drv: Map coordinates before calling send_mouse_input.
[wine/zf.git] / dlls / loadperf / loadperf_main.c
blobc58f46f4204ebae8f6ba258f7c6f021715de25ad
1 /*
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
22 #include <stdarg.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winerror.h"
27 #include "winnls.h"
28 #include "wine/debug.h"
30 #include "loadperf.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(loadperf);
34 static WCHAR *strdupAW(const char *str)
36 WCHAR *ret = NULL;
37 if (str)
39 INT len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
40 if (!(ret = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) return NULL;
41 MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
43 return ret;
46 /*************************************************************
47 * InstallPerfDllA (loadperf.@)
49 DWORD WINAPI InstallPerfDllA(LPCSTR computer, LPCSTR ini, ULONG_PTR flags)
51 DWORD ret;
52 LPWSTR computerW = NULL, iniW = NULL;
54 if (computer && !(computerW = strdupAW(computer))) return ERROR_OUTOFMEMORY;
55 if (ini && !(iniW = strdupAW(ini)))
57 HeapFree(GetProcessHeap(), 0, computerW);
58 return ERROR_OUTOFMEMORY;
61 ret = InstallPerfDllW(computerW, iniW, flags);
63 HeapFree(GetProcessHeap(), 0, computerW);
64 HeapFree(GetProcessHeap(), 0, iniW);
66 return ret;
69 /*************************************************************
70 * InstallPerfDllW (loadperf.@)
72 DWORD WINAPI InstallPerfDllW(LPCWSTR computer, LPCWSTR ini, ULONG_PTR flags)
74 FIXME("(%s, %s, %lx)\n", debugstr_w(computer), debugstr_w(ini), flags);
75 return ERROR_SUCCESS;
78 /*************************************************************
79 * LoadPerfCounterTextStringsA (loadperf.@)
81 * NOTES
82 * See LoadPerfCounterTextStringsW
84 DWORD WINAPI LoadPerfCounterTextStringsA(LPCSTR cmdline, BOOL quiet)
86 DWORD ret;
87 LPWSTR cmdlineW = NULL;
89 if (cmdline && !(cmdlineW = strdupAW(cmdline))) return ERROR_OUTOFMEMORY;
91 ret = LoadPerfCounterTextStringsW(cmdlineW, quiet);
93 HeapFree(GetProcessHeap(), 0, cmdlineW);
95 return ret;
98 /*************************************************************
99 * LoadPerfCounterTextStringsW (loadperf.@)
101 * PARAMS
102 * cmdline [in] Last argument in command line - ini file to be used
103 * quiet [in] FALSE - the function may write to stdout
106 DWORD WINAPI LoadPerfCounterTextStringsW(LPCWSTR cmdline, BOOL quiet)
108 FIXME("(%s, %d): stub\n", debugstr_w(cmdline), quiet);
110 return ERROR_SUCCESS;
113 /*************************************************************
114 * UnloadPerfCounterTextStringsA (loadperf.@)
116 * NOTES
117 * See UnloadPerfCounterTextStringsW
119 DWORD WINAPI UnloadPerfCounterTextStringsA(LPCSTR cmdline, BOOL quiet)
121 DWORD ret;
122 LPWSTR cmdlineW = NULL;
124 if (cmdline && !(cmdlineW = strdupAW(cmdline))) return ERROR_OUTOFMEMORY;
126 ret = UnloadPerfCounterTextStringsW(cmdlineW, quiet);
128 HeapFree(GetProcessHeap(), 0, cmdlineW);
130 return ret;
133 /*************************************************************
134 * UnloadPerfCounterTextStringsW (loadperf.@)
136 * PARAMS
137 * cmdline [in] Last argument in command line - application counters to be removed
138 * quiet [in] FALSE - the function may write to stdout
141 DWORD WINAPI UnloadPerfCounterTextStringsW(LPCWSTR cmdline, BOOL quiet)
143 FIXME("(%s, %d): stub\n", debugstr_w(cmdline), quiet);
145 return ERROR_SUCCESS;