In INT21_GetFreeDiskSpace adjust the sectors-per-cluster value to make
[wine/multimedia.git] / dlls / shlwapi / stopwatch.c
blob8d8121544acbab2afc695f799ccd2fdf5eff508c
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 "wine/unicode.h"
36 #include "windef.h"
37 #include "winbase.h"
38 #include "wingdi.h"
39 #include "winuser.h"
40 #include "winreg.h"
41 #include "winternl.h"
42 #define NO_SHLWAPI_STREAM
43 #include "shlwapi.h"
44 #include "wine/debug.h"
46 WINE_DEFAULT_DEBUG_CHANNEL(shell);
48 /*************************************************************************
49 * @ [SHLWAPI.241]
51 * Get the current performance monitoring mode.
53 * PARAMS
54 * None.
56 * RETURNS
57 * The current performance monitoring mode. This is zero if monitoring
58 * is disabled (the default).
60 * NOTES
61 * If this function returns 0, no further StopWatch functions should be called.
63 DWORD WINAPI StopWatchMode()
65 FIXME("() stub!\n");
66 return 0;
69 /*************************************************************************
70 * @ [SHLWAPI.242]
72 * Write captured performance nodes to a log file.
74 * PARAMS
75 * None.
77 * RETURNS
78 * Nothing.
80 void WINAPI StopWatchFlush()
82 FIXME("() stub!\n");
85 /*************************************************************************
86 * @ [SHLWAPI.244]
88 * Write a performance event to a log file
90 * PARAMS
91 * dwClass [I] Class of event
92 * lpszStr [I] Text of event to log
93 * dwUnknown [I] Unknown
94 * dwMode [I] Mode flags
95 * dwTimeStamp [I] Timestamp
97 * RETURNS
98 * Success: ERROR_SUCCESS.
99 * Failure: A standard Win32 error code indicating the failure.
101 DWORD WINAPI StopWatchW(DWORD dwClass, LPCWSTR lpszStr, DWORD dwUnknown,
102 DWORD dwMode, DWORD dwTimeStamp)
104 FIXME("(%ld,%s,%ld,%ld,%ld) stub!\n", dwClass, debugstr_w(lpszStr),
105 dwUnknown, dwMode, dwTimeStamp);
106 return ERROR_SUCCESS;
109 /*************************************************************************
110 * @ [SHLWAPI.243]
112 * See StopWatchW.
114 DWORD WINAPI StopWatchA(DWORD dwClass, LPCSTR lpszStr, DWORD dwUnknown,
115 DWORD dwMode, DWORD dwTimeStamp)
116 { DWORD retval;
117 UNICODE_STRING szStrW;
119 if(lpszStr) RtlCreateUnicodeStringFromAsciiz(&szStrW, lpszStr);
120 else szStrW.Buffer = NULL;
122 retval = StopWatchW(dwClass, szStrW.Buffer, dwUnknown, dwMode, dwTimeStamp);
124 RtlFreeUnicodeString(&szStrW);
125 return retval;
128 /*************************************************************************
129 * @ [SHLWAPI.245]
131 * Log a shell frame event.
133 * PARAMS
134 * hWnd [I] Window having the event
135 * pvUnknown1 [I] Unknown
136 * bUnknown2 [I] Unknown
137 * pClassWnd [I] Window of class to log
139 * RETURNS
140 * Nothing.
142 void WINAPI StopWatch_TimerHandler(HWND hWnd, PVOID pvUnknown1, BOOL bUnknown2, HWND *pClassWnd)
144 FIXME("(%p,%p,%d,%p) stub!\n", hWnd, pvUnknown1, bUnknown2 ,pClassWnd);
147 /* FIXME: Parameters for @246:StopWatch_CheckMsg unknown */
149 /*************************************************************************
150 * @ [SHLWAPI.247]
152 * Log the start of an applet.
154 * PARAMS
155 * lpszName [I] Name of the applet
157 * RETURNS
158 * Nothing.
160 void WINAPI StopWatch_MarkFrameStart(LPCSTR lpszName)
162 FIXME("(%s) stub!\n", debugstr_a(lpszName));
165 /* FIXME: Parameters for @248:StopWatch_MarkSameFrameStart unknown */
167 /*************************************************************************
168 * @ [SHLWAPI.249]
170 * Log a java applet stopping.
172 * PARAMS
173 * lpszEvent [I] Name of the event (applet)
174 * hWnd [I] Window running the applet
175 * dwReserved [I] Unused
177 * RETURNS
178 * Nothing.
180 void WINAPI StopWatch_MarkJavaStop(LPCWSTR lpszEvent, HWND hWnd, DWORD dwReserved)
182 FIXME("(%s,%p,0x%08lx) stub!\n", debugstr_w(lpszEvent), hWnd, dwReserved);
185 /*************************************************************************
186 * @ [SHLWAPI.250]
188 * Read the performance counter.
190 * PARAMS
191 * None.
193 * RETURNS
194 * The low 32 bits of the current performance counter reading.
196 DWORD WINAPI GetPerfTime()
198 static LONG64 iCounterFreq = 0;
199 LARGE_INTEGER iCounter;
201 TRACE("()\n");
203 if (!iCounterFreq)
204 QueryPerformanceFrequency((LARGE_INTEGER*)&iCounterFreq);
206 QueryPerformanceCounter(&iCounter);
207 iCounter.QuadPart = iCounter.QuadPart * 1000 / iCounterFreq;
208 return iCounter.u.LowPart;
211 /* FIXME: Parameters for @251:StopWatch_DispatchTime unknown */
213 /*************************************************************************
214 * @ [SHLWAPI.252]
216 * Set an as yet unidentified performance value.
218 * PARAMS
219 * dwUnknown [I] Value to set
221 * RETURNS
222 * dwUnknown.
224 DWORD WINAPI StopWatch_SetMsgLastLocation(DWORD dwUnknown)
226 FIXME("(%ld) stub!\n", dwUnknown);
228 return dwUnknown;
231 /* FIXME: Parameters for @253:StopWatchExA, 254:StopWatchExW unknown */