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.
28 /*************************************************************************
31 * Get the current performance monitoring mode.
37 * The current performance monitoring mode. This is zero if monitoring
38 * is disabled (the default).
41 * If this function returns 0, no further StopWatch functions should be called.
43 DWORD WINAPI
StopWatchMode(void)
49 /*************************************************************************
52 * Write captured performance nodes to a log file.
60 void WINAPI
StopWatchFlush(void)
65 /*************************************************************************
68 * Write a performance event to a log file
71 * dwClass [I] Class of event
72 * lpszStr [I] Text of event to log
73 * dwUnknown [I] Unknown
74 * dwMode [I] Mode flags
75 * dwTimeStamp [I] Timestamp
78 * Success: ERROR_SUCCESS.
79 * Failure: A standard Win32 error code indicating the failure.
81 DWORD WINAPI
StopWatchW(DWORD dwClass
, LPCWSTR lpszStr
, DWORD dwUnknown
,
82 DWORD dwMode
, DWORD dwTimeStamp
)
84 FIXME("(%d,%s,%d,%d,%d) stub!\n", dwClass
, debugstr_w(lpszStr
),
85 dwUnknown
, dwMode
, dwTimeStamp
);
89 /*************************************************************************
94 DWORD WINAPI
StopWatchA(DWORD dwClass
, LPCSTR lpszStr
, DWORD dwUnknown
,
95 DWORD dwMode
, DWORD dwTimeStamp
)
97 UNICODE_STRING szStrW
;
99 if(lpszStr
) RtlCreateUnicodeStringFromAsciiz(&szStrW
, lpszStr
);
100 else szStrW
.Buffer
= NULL
;
102 retval
= StopWatchW(dwClass
, szStrW
.Buffer
, dwUnknown
, dwMode
, dwTimeStamp
);
104 RtlFreeUnicodeString(&szStrW
);
108 /*************************************************************************
111 * Log a shell frame event.
114 * hWnd [I] Window having the event
115 * pvUnknown1 [I] Unknown
116 * bUnknown2 [I] Unknown
117 * pClassWnd [I] Window of class to log
122 void WINAPI
StopWatch_TimerHandler(HWND hWnd
, PVOID pvUnknown1
, BOOL bUnknown2
, HWND
*pClassWnd
)
124 FIXME("(%p,%p,%d,%p) stub!\n", hWnd
, pvUnknown1
, bUnknown2
,pClassWnd
);
127 /* FIXME: Parameters for @246:StopWatch_CheckMsg unknown */
129 /*************************************************************************
132 * Log the start of an applet.
135 * lpszName [I] Name of the applet
140 void WINAPI
StopWatch_MarkFrameStart(LPCSTR lpszName
)
142 FIXME("(%s) stub!\n", debugstr_a(lpszName
));
145 /* FIXME: Parameters for @248:StopWatch_MarkSameFrameStart unknown */
147 /*************************************************************************
150 * Log a java applet stopping.
153 * lpszEvent [I] Name of the event (applet)
154 * hWnd [I] Window running the applet
155 * dwReserved [I] Unused
160 void WINAPI
StopWatch_MarkJavaStop(LPCWSTR lpszEvent
, HWND hWnd
, DWORD dwReserved
)
162 FIXME("(%s,%p,0x%08x) stub!\n", debugstr_w(lpszEvent
), hWnd
, dwReserved
);
165 /*************************************************************************
168 * Read the performance counter.
174 * The low 32 bits of the current performance counter reading.
176 DWORD WINAPI
GetPerfTime(void)
178 static LONG64 iCounterFreq
= 0;
179 LARGE_INTEGER iCounter
;
184 QueryPerformanceFrequency((LARGE_INTEGER
*)&iCounterFreq
);
186 QueryPerformanceCounter(&iCounter
);
187 iCounter
.QuadPart
= iCounter
.QuadPart
* 1000 / iCounterFreq
;
188 return iCounter
.u
.LowPart
;
191 /* FIXME: Parameters for @251:StopWatch_DispatchTime unknown */
193 /*************************************************************************
196 * Set an as yet unidentified performance value.
199 * dwUnknown [I] Value to set
204 DWORD WINAPI
StopWatch_SetMsgLastLocation(DWORD dwUnknown
)
206 FIXME("(%d) stub!\n", dwUnknown
);
211 /* FIXME: Parameters for @253:StopWatchExA, 254:StopWatchExW unknown */