msvcr100: The msvcr100 debug channel is unused so remove it.
[wine/testsucceed.git] / dlls / shlwapi / stopwatch.c
blob7f86fded4b4523ecc8ea04619cb7793b7d6a5a0c
1 /*
2 * Stopwatch Functions
4 * Copyright 2004 Jon Griffiths
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
20 * NOTES
21 * These functions probably never need to be implemented unless we
22 * A) Rewrite explorer from scratch, and
23 * B) Want to use a substandard API to tune its performance.
26 #include "config.h"
27 #include "wine/port.h"
29 #include <stdarg.h>
30 #include <string.h>
31 #include <stdlib.h>
33 #define NONAMELESSUNION
34 #define NONAMELESSSTRUCT
35 #include "windef.h"
36 #include "winbase.h"
37 #include "winreg.h"
38 #include "winternl.h"
39 #include "wine/debug.h"
41 WINE_DEFAULT_DEBUG_CHANNEL(shell);
43 /*************************************************************************
44 * @ [SHLWAPI.241]
46 * Get the current performance monitoring mode.
48 * PARAMS
49 * None.
51 * RETURNS
52 * The current performance monitoring mode. This is zero if monitoring
53 * is disabled (the default).
55 * NOTES
56 * If this function returns 0, no further StopWatch functions should be called.
58 DWORD WINAPI StopWatchMode(void)
60 FIXME("() stub!\n");
61 return 0;
64 /*************************************************************************
65 * @ [SHLWAPI.242]
67 * Write captured performance nodes to a log file.
69 * PARAMS
70 * None.
72 * RETURNS
73 * Nothing.
75 void WINAPI StopWatchFlush(void)
77 FIXME("() stub!\n");
80 /*************************************************************************
81 * @ [SHLWAPI.244]
83 * Write a performance event to a log file
85 * PARAMS
86 * dwClass [I] Class of event
87 * lpszStr [I] Text of event to log
88 * dwUnknown [I] Unknown
89 * dwMode [I] Mode flags
90 * dwTimeStamp [I] Timestamp
92 * RETURNS
93 * Success: ERROR_SUCCESS.
94 * Failure: A standard Win32 error code indicating the failure.
96 DWORD WINAPI StopWatchW(DWORD dwClass, LPCWSTR lpszStr, DWORD dwUnknown,
97 DWORD dwMode, DWORD dwTimeStamp)
99 FIXME("(%d,%s,%d,%d,%d) stub!\n", dwClass, debugstr_w(lpszStr),
100 dwUnknown, dwMode, dwTimeStamp);
101 return ERROR_SUCCESS;
104 /*************************************************************************
105 * @ [SHLWAPI.243]
107 * See StopWatchW.
109 DWORD WINAPI StopWatchA(DWORD dwClass, LPCSTR lpszStr, DWORD dwUnknown,
110 DWORD dwMode, DWORD dwTimeStamp)
111 { DWORD retval;
112 UNICODE_STRING szStrW;
114 if(lpszStr) RtlCreateUnicodeStringFromAsciiz(&szStrW, lpszStr);
115 else szStrW.Buffer = NULL;
117 retval = StopWatchW(dwClass, szStrW.Buffer, dwUnknown, dwMode, dwTimeStamp);
119 RtlFreeUnicodeString(&szStrW);
120 return retval;
123 /*************************************************************************
124 * @ [SHLWAPI.245]
126 * Log a shell frame event.
128 * PARAMS
129 * hWnd [I] Window having the event
130 * pvUnknown1 [I] Unknown
131 * bUnknown2 [I] Unknown
132 * pClassWnd [I] Window of class to log
134 * RETURNS
135 * Nothing.
137 void WINAPI StopWatch_TimerHandler(HWND hWnd, PVOID pvUnknown1, BOOL bUnknown2, HWND *pClassWnd)
139 FIXME("(%p,%p,%d,%p) stub!\n", hWnd, pvUnknown1, bUnknown2 ,pClassWnd);
142 /* FIXME: Parameters for @246:StopWatch_CheckMsg unknown */
144 /*************************************************************************
145 * @ [SHLWAPI.247]
147 * Log the start of an applet.
149 * PARAMS
150 * lpszName [I] Name of the applet
152 * RETURNS
153 * Nothing.
155 void WINAPI StopWatch_MarkFrameStart(LPCSTR lpszName)
157 FIXME("(%s) stub!\n", debugstr_a(lpszName));
160 /* FIXME: Parameters for @248:StopWatch_MarkSameFrameStart unknown */
162 /*************************************************************************
163 * @ [SHLWAPI.249]
165 * Log a java applet stopping.
167 * PARAMS
168 * lpszEvent [I] Name of the event (applet)
169 * hWnd [I] Window running the applet
170 * dwReserved [I] Unused
172 * RETURNS
173 * Nothing.
175 void WINAPI StopWatch_MarkJavaStop(LPCWSTR lpszEvent, HWND hWnd, DWORD dwReserved)
177 FIXME("(%s,%p,0x%08x) stub!\n", debugstr_w(lpszEvent), hWnd, dwReserved);
180 /*************************************************************************
181 * @ [SHLWAPI.250]
183 * Read the performance counter.
185 * PARAMS
186 * None.
188 * RETURNS
189 * The low 32 bits of the current performance counter reading.
191 DWORD WINAPI GetPerfTime(void)
193 static LONG64 iCounterFreq = 0;
194 LARGE_INTEGER iCounter;
196 TRACE("()\n");
198 if (!iCounterFreq)
199 QueryPerformanceFrequency((LARGE_INTEGER*)&iCounterFreq);
201 QueryPerformanceCounter(&iCounter);
202 iCounter.QuadPart = iCounter.QuadPart * 1000 / iCounterFreq;
203 return iCounter.u.LowPart;
206 /* FIXME: Parameters for @251:StopWatch_DispatchTime unknown */
208 /*************************************************************************
209 * @ [SHLWAPI.252]
211 * Set an as yet unidentified performance value.
213 * PARAMS
214 * dwUnknown [I] Value to set
216 * RETURNS
217 * dwUnknown.
219 DWORD WINAPI StopWatch_SetMsgLastLocation(DWORD dwUnknown)
221 FIXME("(%d) stub!\n", dwUnknown);
223 return dwUnknown;
226 /* FIXME: Parameters for @253:StopWatchExA, 254:StopWatchExW unknown */