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
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.
27 #include "wine/port.h"
33 #define NONAMELESSUNION
34 #define NONAMELESSSTRUCT
39 #include "wine/debug.h"
41 WINE_DEFAULT_DEBUG_CHANNEL(shell);
43 /*************************************************************************
46 * Get the current performance monitoring mode.
52 * The current performance monitoring mode. This is zero if monitoring
53 * is disabled (the default).
56 * If this function returns 0, no further StopWatch functions should be called.
58 DWORD WINAPI StopWatchMode(void)
64 /*************************************************************************
67 * Write captured performance nodes to a log file.
75 void WINAPI StopWatchFlush(void)
80 /*************************************************************************
83 * Write a performance event to a log file
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
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 /*************************************************************************
109 DWORD WINAPI StopWatchA(DWORD dwClass, LPCSTR lpszStr, DWORD dwUnknown,
110 DWORD dwMode, DWORD dwTimeStamp)
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);
123 /*************************************************************************
126 * Log a shell frame event.
129 * hWnd [I] Window having the event
130 * pvUnknown1 [I] Unknown
131 * bUnknown2 [I] Unknown
132 * pClassWnd [I] Window of class to log
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 /*************************************************************************
147 * Log the start of an applet.
150 * lpszName [I] Name of the applet
155 void WINAPI StopWatch_MarkFrameStart(LPCSTR lpszName)
157 FIXME("(%s) stub!\n", debugstr_a(lpszName));
160 /* FIXME: Parameters for @248:StopWatch_MarkSameFrameStart unknown */
162 /*************************************************************************
165 * Log a java applet stopping.
168 * lpszEvent [I] Name of the event (applet)
169 * hWnd [I] Window running the applet
170 * dwReserved [I] Unused
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 /*************************************************************************
183 * Read the performance counter.
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;
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 /*************************************************************************
211 * Set an as yet unidentified performance value.
214 * dwUnknown [I] Value to set
219 DWORD WINAPI StopWatch_SetMsgLastLocation(DWORD dwUnknown)
221 FIXME("(%d) stub!\n", dwUnknown);
226 /* FIXME: Parameters for @253:StopWatchExA, 254:StopWatchExW unknown */