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.
34 #include "wine/debug.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(shell
);
38 /*************************************************************************
41 * Get the current performance monitoring mode.
47 * The current performance monitoring mode. This is zero if monitoring
48 * is disabled (the default).
51 * If this function returns 0, no further StopWatch functions should be called.
53 DWORD WINAPI
StopWatchMode(void)
59 /*************************************************************************
62 * Write captured performance nodes to a log file.
70 void WINAPI
StopWatchFlush(void)
75 /*************************************************************************
78 * Write a performance event to a log file
81 * dwClass [I] Class of event
82 * lpszStr [I] Text of event to log
83 * dwUnknown [I] Unknown
84 * dwMode [I] Mode flags
85 * dwTimeStamp [I] Timestamp
88 * Success: ERROR_SUCCESS.
89 * Failure: A standard Win32 error code indicating the failure.
91 DWORD WINAPI
StopWatchW(DWORD dwClass
, LPCWSTR lpszStr
, DWORD dwUnknown
,
92 DWORD dwMode
, DWORD dwTimeStamp
)
94 FIXME("(%ld,%s,%ld,%ld,%ld) stub!\n", dwClass
, debugstr_w(lpszStr
),
95 dwUnknown
, dwMode
, dwTimeStamp
);
99 /*************************************************************************
104 DWORD WINAPI
StopWatchA(DWORD dwClass
, LPCSTR lpszStr
, DWORD dwUnknown
,
105 DWORD dwMode
, DWORD dwTimeStamp
)
107 UNICODE_STRING szStrW
;
109 if(lpszStr
) RtlCreateUnicodeStringFromAsciiz(&szStrW
, lpszStr
);
110 else szStrW
.Buffer
= NULL
;
112 retval
= StopWatchW(dwClass
, szStrW
.Buffer
, dwUnknown
, dwMode
, dwTimeStamp
);
114 RtlFreeUnicodeString(&szStrW
);
118 /*************************************************************************
121 * Log a shell frame event.
124 * hWnd [I] Window having the event
125 * pvUnknown1 [I] Unknown
126 * bUnknown2 [I] Unknown
127 * pClassWnd [I] Window of class to log
132 void WINAPI
StopWatch_TimerHandler(HWND hWnd
, PVOID pvUnknown1
, BOOL bUnknown2
, HWND
*pClassWnd
)
134 FIXME("(%p,%p,%d,%p) stub!\n", hWnd
, pvUnknown1
, bUnknown2
,pClassWnd
);
137 /* FIXME: Parameters for @246:StopWatch_CheckMsg unknown */
139 /*************************************************************************
142 * Log the start of an applet.
145 * lpszName [I] Name of the applet
150 void WINAPI
StopWatch_MarkFrameStart(LPCSTR lpszName
)
152 FIXME("(%s) stub!\n", debugstr_a(lpszName
));
155 /* FIXME: Parameters for @248:StopWatch_MarkSameFrameStart unknown */
157 /*************************************************************************
160 * Log a java applet stopping.
163 * lpszEvent [I] Name of the event (applet)
164 * hWnd [I] Window running the applet
165 * dwReserved [I] Unused
170 void WINAPI
StopWatch_MarkJavaStop(LPCWSTR lpszEvent
, HWND hWnd
, DWORD dwReserved
)
172 FIXME("(%s,%p,0x%08lx) stub!\n", debugstr_w(lpszEvent
), hWnd
, dwReserved
);
175 /*************************************************************************
178 * Read the performance counter.
184 * The low 32 bits of the current performance counter reading.
186 DWORD WINAPI
GetPerfTime(void)
188 static LARGE_INTEGER iCounterFreq
= { {0} };
189 LARGE_INTEGER iCounter
;
193 if (!iCounterFreq
.QuadPart
)
194 QueryPerformanceFrequency(&iCounterFreq
);
196 QueryPerformanceCounter(&iCounter
);
197 iCounter
.QuadPart
= iCounter
.QuadPart
* 1000 / iCounterFreq
.QuadPart
;
198 return iCounter
.u
.LowPart
;
201 /* FIXME: Parameters for @251:StopWatch_DispatchTime unknown */
203 /*************************************************************************
206 * Set an as yet unidentified performance value.
209 * dwUnknown [I] Value to set
214 DWORD WINAPI
StopWatch_SetMsgLastLocation(DWORD dwUnknown
)
216 FIXME("(%ld) stub!\n", dwUnknown
);
221 /* FIXME: Parameters for @253:StopWatchExA, 254:StopWatchExW unknown */