blob: 85d5227fc50a2d9ea03badd256a7304ff4655da5 [file] [log] [blame]
Alexandre Julliard234bc241994-12-10 13:02:28 +00001/*
Alexandre Julliardb817f4f1996-03-14 18:08:34 +00002 * Misc. USER functions
3 *
4 * Copyright 1993 Robert J. Amstadt
Vincent Béron9a624912002-05-31 23:06:46 +00005 * 1996 Alex Korobka
Alexandre Julliard0799c1a2002-03-09 23:29:33 +00006 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Alexandre Julliardb817f4f1996-03-14 18:08:34 +000020 */
21
Alexandre Julliarde37c6e12003-09-05 23:08:26 +000022#include <stdarg.h>
Alexandre Julliard401710d1993-09-04 10:09:32 +000023#include <stdlib.h>
James Juranf4d5fef2001-01-26 20:43:40 +000024#include <string.h>
Marcus Meissner61afa331999-02-22 10:16:00 +000025#include "wine/winbase16.h"
Jeremy Whited3e22d92000-02-10 19:03:02 +000026#include "windef.h"
Alexandre Julliarde37c6e12003-09-05 23:08:26 +000027#include "winbase.h"
Jeremy Whited3e22d92000-02-10 19:03:02 +000028#include "wingdi.h"
Marcus Meissner61afa331999-02-22 10:16:00 +000029#include "winuser.h"
Alexandre Julliard9fcd89a2001-12-17 22:12:23 +000030#include "wine/winuser16.h"
Alexandre Julliardf9be2f32003-11-17 20:31:29 +000031#include "winreg.h"
32#include "winternl.h"
Alexandre Julliard401710d1993-09-04 10:09:32 +000033#include "user.h"
Alexandre Julliard7e56f681996-01-31 19:02:28 +000034#include "win.h"
Alexandre Julliard91222da2000-12-10 23:01:33 +000035#include "controls.h"
Ulrich Weigand1b938b11999-03-10 14:03:06 +000036#include "cursoricon.h"
Alexandre Julliard2c69f6d1996-09-28 18:11:01 +000037#include "message.h"
Patrik Stridvall8d8703c1999-02-04 14:05:38 +000038#include "local.h"
Alexandre Julliard0799c1a2002-03-09 23:29:33 +000039#include "wine/debug.h"
Alexandre Julliard401710d1993-09-04 10:09:32 +000040
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +000041WINE_DEFAULT_DEBUG_CHANNEL(user);
Patrik Stridvallb4b9fae1999-04-19 14:56:29 +000042
Alexandre Julliard19b6a492003-08-12 23:50:54 +000043static SYSLEVEL USER_SysLevel;
44static CRITICAL_SECTION_DEBUG critsect_debug =
45{
46 0, 0, &USER_SysLevel.crst,
47 { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
48 0, 0, { 0, (DWORD)(__FILE__ ": USER_SysLevel") }
49};
50static SYSLEVEL USER_SysLevel = { { &critsect_debug, -1, 0, 0, 0, 0 }, 2 };
Alexandre Julliard6837b9c2001-08-16 18:14:22 +000051
Alexandre Julliardc963e252003-05-15 23:11:00 +000052/* USER signal proc flags and codes */
53/* See UserSignalProc for comments */
54#define USIG_FLAGS_WIN32 0x0001
55#define USIG_FLAGS_GUI 0x0002
56#define USIG_FLAGS_FEEDBACK 0x0004
57#define USIG_FLAGS_FAULT 0x0008
58
59#define USIG_DLL_UNLOAD_WIN16 0x0001
60#define USIG_DLL_UNLOAD_WIN32 0x0002
61#define USIG_FAULT_DIALOG_PUSH 0x0003
62#define USIG_FAULT_DIALOG_POP 0x0004
63#define USIG_DLL_UNLOAD_ORPHANS 0x0005
64#define USIG_THREAD_INIT 0x0010
65#define USIG_THREAD_EXIT 0x0020
66#define USIG_PROCESS_CREATE 0x0100
67#define USIG_PROCESS_INIT 0x0200
68#define USIG_PROCESS_EXIT 0x0300
69#define USIG_PROCESS_DESTROY 0x0400
70#define USIG_PROCESS_RUNNING 0x0500
71#define USIG_PROCESS_LOADED 0x0600
72
73
Alexandre Julliarde2abbb11995-03-19 17:39:39 +000074/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +000075 * GetFreeSystemResources (USER.284)
Alexandre Julliarde2abbb11995-03-19 17:39:39 +000076 */
Alexandre Julliarda3960291999-02-26 11:11:13 +000077WORD WINAPI GetFreeSystemResources16( WORD resType )
Alexandre Julliarde2abbb11995-03-19 17:39:39 +000078{
Alexandre Julliard2a2321b2000-08-19 21:38:55 +000079 HINSTANCE16 gdi_inst;
80 WORD gdi_heap;
Alexandre Julliardcdcdede1996-04-21 14:57:41 +000081 int userPercent, gdiPercent;
Alexandre Julliarde2abbb11995-03-19 17:39:39 +000082
Alexandre Julliard2a2321b2000-08-19 21:38:55 +000083 if ((gdi_inst = LoadLibrary16( "GDI" )) < 32) return 0;
Alexandre Julliard95153362001-03-23 19:13:23 +000084 gdi_heap = gdi_inst | 7;
Alexandre Julliard2a2321b2000-08-19 21:38:55 +000085
Alexandre Julliarde2abbb11995-03-19 17:39:39 +000086 switch(resType)
87 {
88 case GFSR_USERRESOURCES:
Alexandre Julliardcdcdede1996-04-21 14:57:41 +000089 userPercent = (int)LOCAL_CountFree( USER_HeapSel ) * 100 /
90 LOCAL_HeapSize( USER_HeapSel );
91 gdiPercent = 100;
Alexandre Julliarde2abbb11995-03-19 17:39:39 +000092 break;
93
94 case GFSR_GDIRESOURCES:
Alexandre Julliard2a2321b2000-08-19 21:38:55 +000095 gdiPercent = (int)LOCAL_CountFree( gdi_inst ) * 100 /
96 LOCAL_HeapSize( gdi_inst );
Alexandre Julliardcdcdede1996-04-21 14:57:41 +000097 userPercent = 100;
Alexandre Julliarde2abbb11995-03-19 17:39:39 +000098 break;
99
100 case GFSR_SYSTEMRESOURCES:
Alexandre Julliardcdcdede1996-04-21 14:57:41 +0000101 userPercent = (int)LOCAL_CountFree( USER_HeapSel ) * 100 /
102 LOCAL_HeapSize( USER_HeapSel );
Alexandre Julliard2a2321b2000-08-19 21:38:55 +0000103 gdiPercent = (int)LOCAL_CountFree( gdi_inst ) * 100 /
104 LOCAL_HeapSize( gdi_inst );
Alexandre Julliarde2abbb11995-03-19 17:39:39 +0000105 break;
106
107 default:
Alexandre Julliard2a2321b2000-08-19 21:38:55 +0000108 userPercent = gdiPercent = 0;
109 break;
Alexandre Julliarde2abbb11995-03-19 17:39:39 +0000110 }
Alexandre Julliard2a2321b2000-08-19 21:38:55 +0000111 FreeLibrary16( gdi_inst );
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000112 TRACE("<- userPercent %d, gdiPercent %d\n", userPercent, gdiPercent);
Francois Gouget6d77d3a2000-03-25 21:44:35 +0000113 return (WORD)min( userPercent, gdiPercent );
Alexandre Julliarde2abbb11995-03-19 17:39:39 +0000114}
115
116
Alexandre Julliard401710d1993-09-04 10:09:32 +0000117/**********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000118 * InitApp (USER.5)
Alexandre Julliard401710d1993-09-04 10:09:32 +0000119 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000120INT16 WINAPI InitApp16( HINSTANCE16 hInstance )
Alexandre Julliard401710d1993-09-04 10:09:32 +0000121{
Ulrich Weigand0be24af1999-01-20 13:16:32 +0000122 /* Create task message queue */
Alexandre Julliard8afe6622001-07-26 20:12:22 +0000123 if ( !InitThreadInput16( 0, 0 ) ) return 0;
Alexandre Julliardfb9a9191994-03-01 19:48:04 +0000124
Alexandre Julliard401710d1993-09-04 10:09:32 +0000125 return 1;
126}
Alexandre Julliard2ace16a1996-04-28 15:09:19 +0000127
Alexandre Julliard6837b9c2001-08-16 18:14:22 +0000128
129/***********************************************************************
130 * USER_Lock
131 */
132void USER_Lock(void)
133{
134 _EnterSysLevel( &USER_SysLevel );
135}
136
137
138/***********************************************************************
139 * USER_Unlock
140 */
141void USER_Unlock(void)
142{
143 _LeaveSysLevel( &USER_SysLevel );
144}
145
146
147/***********************************************************************
148 * USER_CheckNotLock
149 *
150 * Make sure that we don't hold the user lock.
151 */
152void USER_CheckNotLock(void)
153{
154 _CheckNotSysLevel( &USER_SysLevel );
155}
156
157
Ulrich Weigande392a0c1999-04-01 11:44:52 +0000158/***********************************************************************
Alexandre Julliard19b6a492003-08-12 23:50:54 +0000159 * WIN_SuspendWndsLock
160 *
161 * Suspend the lock on WND structures.
162 * Returns the number of locks suspended
163 * FIXME: should be removed
164 */
165int WIN_SuspendWndsLock( void )
166{
167 int isuspendedLocks = _ConfirmSysLevel( &USER_SysLevel );
168 int count = isuspendedLocks;
169
170 while ( count-- > 0 )
171 _LeaveSysLevel( &USER_SysLevel );
172
173 return isuspendedLocks;
174}
175
176/***********************************************************************
177 * WIN_RestoreWndsLock
178 *
179 * Restore the suspended locks on WND structures
180 * FIXME: should be removed
181 */
182void WIN_RestoreWndsLock( int ipreviousLocks )
183{
184 while ( ipreviousLocks-- > 0 )
185 _EnterSysLevel( &USER_SysLevel );
186}
187
188/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000189 * FinalUserInit (USER.400)
Ulrich Weigand98c30531999-07-27 17:10:06 +0000190 */
191void WINAPI FinalUserInit16( void )
192{
193 /* FIXME: Should chain to FinalGdiInit now. */
194}
195
196/***********************************************************************
Patrik Stridvall0c610282001-01-25 22:22:21 +0000197 * SignalProc32 (USER.391)
198 * UserSignalProc (USER32.@)
Ulrich Weigande392a0c1999-04-01 11:44:52 +0000199 *
Alexandre Julliardc963e252003-05-15 23:11:00 +0000200 * The exact meaning of the USER signals is undocumented, but this
201 * should cover the basic idea:
Ulrich Weigande392a0c1999-04-01 11:44:52 +0000202 *
Alexandre Julliardc963e252003-05-15 23:11:00 +0000203 * USIG_DLL_UNLOAD_WIN16
204 * This is sent when a 16-bit module is unloaded.
205 *
206 * USIG_DLL_UNLOAD_WIN32
207 * This is sent when a 32-bit module is unloaded.
208 *
209 * USIG_DLL_UNLOAD_ORPHANS
210 * This is sent after the last Win3.1 module is unloaded,
211 * to allow removal of orphaned menus.
212 *
213 * USIG_FAULT_DIALOG_PUSH
214 * USIG_FAULT_DIALOG_POP
215 * These are called to allow USER to prepare for displaying a
216 * fault dialog, even though the fault might have happened while
217 * inside a USER critical section.
218 *
219 * USIG_THREAD_INIT
220 * This is called from the context of a new thread, as soon as it
221 * has started to run.
222 *
223 * USIG_THREAD_EXIT
224 * This is called, still in its context, just before a thread is
225 * about to terminate.
226 *
227 * USIG_PROCESS_CREATE
228 * This is called, in the parent process context, after a new process
229 * has been created.
230 *
231 * USIG_PROCESS_INIT
232 * This is called in the new process context, just after the main thread
233 * has started execution (after the main thread's USIG_THREAD_INIT has
234 * been sent).
235 *
236 * USIG_PROCESS_LOADED
237 * This is called after the executable file has been loaded into the
238 * new process context.
239 *
240 * USIG_PROCESS_RUNNING
241 * This is called immediately before the main entry point is called.
242 *
243 * USIG_PROCESS_EXIT
244 * This is called in the context of a process that is about to
245 * terminate (but before the last thread's USIG_THREAD_EXIT has
246 * been sent).
247 *
248 * USIG_PROCESS_DESTROY
249 * This is called after a process has terminated.
250 *
251 *
252 * The meaning of the dwFlags bits is as follows:
253 *
254 * USIG_FLAGS_WIN32
255 * Current process is 32-bit.
256 *
257 * USIG_FLAGS_GUI
258 * Current process is a (Win32) GUI process.
259 *
260 * USIG_FLAGS_FEEDBACK
261 * Current process needs 'feedback' (determined from the STARTUPINFO
262 * flags STARTF_FORCEONFEEDBACK / STARTF_FORCEOFFFEEDBACK).
263 *
264 * USIG_FLAGS_FAULT
265 * The signal is being sent due to a fault.
Ulrich Weigande392a0c1999-04-01 11:44:52 +0000266 */
267WORD WINAPI UserSignalProc( UINT uCode, DWORD dwThreadOrProcessID,
268 DWORD dwFlags, HMODULE16 hModule )
269{
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000270 FIXME("(%04x, %08lx, %04lx, %04x)\n",
271 uCode, dwThreadOrProcessID, dwFlags, hModule );
Ulrich Weigande392a0c1999-04-01 11:44:52 +0000272 /* FIXME: Should chain to GdiSignalProc now. */
Ulrich Weigande392a0c1999-04-01 11:44:52 +0000273 return 0;
274}
275
Ulrich Weigand937f4d31999-12-05 02:49:59 +0000276/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000277 * ExitWindows (USER.7)
Alexandre Julliard889f7421997-04-15 17:19:52 +0000278 */
Alexandre Julliard670cdc41997-08-24 16:00:30 +0000279BOOL16 WINAPI ExitWindows16( DWORD dwReturnCode, UINT16 wReserved )
Alexandre Julliard889f7421997-04-15 17:19:52 +0000280{
281 return ExitWindowsEx( EWX_LOGOFF, 0xffffffff );
282}
283
284
285/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000286 * ExitWindowsExec (USER.246)
Alexandre Julliardd37eb361997-07-20 16:23:21 +0000287 */
Alexandre Julliard670cdc41997-08-24 16:00:30 +0000288BOOL16 WINAPI ExitWindowsExec16( LPCSTR lpszExe, LPCSTR lpszParams )
Alexandre Julliardd37eb361997-07-20 16:23:21 +0000289{
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000290 TRACE("Should run the following in DOS-mode: \"%s %s\"\n",
291 lpszExe, lpszParams);
Alexandre Julliardd37eb361997-07-20 16:23:21 +0000292 return ExitWindowsEx( EWX_LOGOFF, 0xffffffff );
293}
294
295
296/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000297 * ExitWindowsEx (USER32.@)
Alexandre Julliard889f7421997-04-15 17:19:52 +0000298 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000299BOOL WINAPI ExitWindowsEx( UINT flags, DWORD reserved )
Alexandre Julliard889f7421997-04-15 17:19:52 +0000300{
301 int i;
Alexandre Julliarda3960291999-02-26 11:11:13 +0000302 BOOL result;
Alexandre Julliard4ff32c82001-08-18 18:08:26 +0000303 HWND *list, *phwnd;
304
Alexandre Julliard889f7421997-04-15 17:19:52 +0000305 /* We have to build a list of all windows first, as in EnumWindows */
306
Alexandre Julliard9d9dac02001-08-24 19:28:21 +0000307 if (!(list = WIN_ListChildren( GetDesktopWindow() ))) return FALSE;
Alexandre Julliard889f7421997-04-15 17:19:52 +0000308
309 /* Send a WM_QUERYENDSESSION message to every window */
310
Alexandre Julliard4ff32c82001-08-18 18:08:26 +0000311 for (i = 0; list[i]; i++)
Alexandre Julliard889f7421997-04-15 17:19:52 +0000312 {
313 /* Make sure that the window still exists */
Alexandre Julliard4ff32c82001-08-18 18:08:26 +0000314 if (!IsWindow( list[i] )) continue;
315 if (!SendMessageW( list[i], WM_QUERYENDSESSION, 0, 0 )) break;
Alexandre Julliard889f7421997-04-15 17:19:52 +0000316 }
Alexandre Julliard4ff32c82001-08-18 18:08:26 +0000317 result = !list[i];
Alexandre Julliard889f7421997-04-15 17:19:52 +0000318
319 /* Now notify all windows that got a WM_QUERYENDSESSION of the result */
320
Alexandre Julliard4ff32c82001-08-18 18:08:26 +0000321 for (phwnd = list; i > 0; i--, phwnd++)
Alexandre Julliard889f7421997-04-15 17:19:52 +0000322 {
Alexandre Julliard4ff32c82001-08-18 18:08:26 +0000323 if (!IsWindow( *phwnd )) continue;
324 SendMessageW( *phwnd, WM_ENDSESSION, result, 0 );
Alexandre Julliard889f7421997-04-15 17:19:52 +0000325 }
Alexandre Julliard9d9dac02001-08-24 19:28:21 +0000326 HeapFree( GetProcessHeap(), 0, list );
Alexandre Julliard889f7421997-04-15 17:19:52 +0000327
Ulrich Weigandc319c661999-05-22 16:18:36 +0000328 if (result) ExitKernel16();
Rein Klazesd6847772004-02-05 01:24:48 +0000329 return TRUE;
Alexandre Julliard889f7421997-04-15 17:19:52 +0000330}
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000331
Alexandre Julliard829fe321998-07-26 14:27:39 +0000332/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000333 * ChangeDisplaySettingsA (USER32.@)
Alexandre Julliard829fe321998-07-26 14:27:39 +0000334 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000335LONG WINAPI ChangeDisplaySettingsA( LPDEVMODEA devmode, DWORD flags )
Alexandre Julliard829fe321998-07-26 14:27:39 +0000336{
Alex Pasadyn330179f2003-04-22 00:15:48 +0000337 return ChangeDisplaySettingsExA(NULL,devmode,NULL,flags,NULL);
338}
Marcus Meissner5e2f50f1999-11-07 22:26:20 +0000339
Alex Pasadyn330179f2003-04-22 00:15:48 +0000340/***********************************************************************
341 * ChangeDisplaySettingsW (USER32.@)
342 */
343LONG WINAPI ChangeDisplaySettingsW( LPDEVMODEW devmode, DWORD flags )
344{
345 return ChangeDisplaySettingsExW(NULL,devmode,NULL,flags,NULL);
Marcus Meissner5e2f50f1999-11-07 22:26:20 +0000346}
347
348/***********************************************************************
Patrik Stridvalldf75e892001-02-12 03:49:07 +0000349 * ChangeDisplaySettings (USER.620)
Eric Pouech982e0ce2001-01-28 23:44:56 +0000350 */
351LONG WINAPI ChangeDisplaySettings16( LPDEVMODEA devmode, DWORD flags )
352{
Eric Pouech982e0ce2001-01-28 23:44:56 +0000353 return ChangeDisplaySettingsA(devmode, flags);
354}
355
356/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000357 * ChangeDisplaySettingsExA (USER32.@)
Marcus Meissner5e2f50f1999-11-07 22:26:20 +0000358 */
Vincent Béron9a624912002-05-31 23:06:46 +0000359LONG WINAPI ChangeDisplaySettingsExA(
Marcus Meissner5e2f50f1999-11-07 22:26:20 +0000360 LPCSTR devname, LPDEVMODEA devmode, HWND hwnd, DWORD flags,
Alex Pasadyn330179f2003-04-22 00:15:48 +0000361 LPVOID lparam
Marcus Meissner5e2f50f1999-11-07 22:26:20 +0000362) {
Alex Pasadyn330179f2003-04-22 00:15:48 +0000363 DEVMODEW devmodeW;
364 LONG ret;
365 UNICODE_STRING nameW;
Alexandre Julliard829fe321998-07-26 14:27:39 +0000366
Alex Pasadyn330179f2003-04-22 00:15:48 +0000367 if (devname) RtlCreateUnicodeStringFromAsciiz(&nameW, devname);
368 else nameW.Buffer = NULL;
Alexandre Julliard829fe321998-07-26 14:27:39 +0000369
Alex Pasadyn330179f2003-04-22 00:15:48 +0000370 if (devmode)
371 {
372 devmodeW.dmBitsPerPel = devmode->dmBitsPerPel;
373 devmodeW.dmPelsHeight = devmode->dmPelsHeight;
374 devmodeW.dmPelsWidth = devmode->dmPelsWidth;
375 devmodeW.dmDisplayFlags = devmode->dmDisplayFlags;
376 devmodeW.dmDisplayFrequency = devmode->dmDisplayFrequency;
377 devmodeW.dmFields = devmode->dmFields;
378 ret = ChangeDisplaySettingsExW(nameW.Buffer, &devmodeW, hwnd, flags, lparam);
379 }
380 else
381 {
382 ret = ChangeDisplaySettingsExW(nameW.Buffer, NULL, hwnd, flags, lparam);
383 }
384
385 if (devname) RtlFreeUnicodeString(&nameW);
386 return ret;
387}
388
389/***********************************************************************
390 * ChangeDisplaySettingsExW (USER32.@)
391 */
392LONG WINAPI ChangeDisplaySettingsExW( LPCWSTR devname, LPDEVMODEW devmode, HWND hwnd,
393 DWORD flags, LPVOID lparam )
394{
395 /* Pass the request on to the driver */
396 if (!USER_Driver.pChangeDisplaySettingsExW) return DISP_CHANGE_FAILED;
397 return USER_Driver.pChangeDisplaySettingsExW( devname, devmode, hwnd, flags, lparam );
Alexandre Julliard829fe321998-07-26 14:27:39 +0000398}
399
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000400/***********************************************************************
Stefan Leichter27faf022002-11-18 19:44:46 +0000401 * EnumDisplaySettingsW (USER32.@)
Marcus Meissner66cd3331998-10-27 15:41:54 +0000402 *
403 * RETURNS
Stefan Leichter27faf022002-11-18 19:44:46 +0000404 * TRUE if nth setting exists found (described in the LPDEVMODEW struct)
Marcus Meissner66cd3331998-10-27 15:41:54 +0000405 * FALSE if we do not have the nth setting
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000406 */
Stefan Leichter27faf022002-11-18 19:44:46 +0000407BOOL WINAPI EnumDisplaySettingsW(
408 LPCWSTR name, /* [in] huh? */
Marcus Meissner66cd3331998-10-27 15:41:54 +0000409 DWORD n, /* [in] nth entry in display settings list*/
Stefan Leichter27faf022002-11-18 19:44:46 +0000410 LPDEVMODEW devmode /* [out] devmode for that setting */
Marcus Meissner66cd3331998-10-27 15:41:54 +0000411) {
Alex Pasadyn330179f2003-04-22 00:15:48 +0000412 return EnumDisplaySettingsExW(name, n, devmode, 0);
Alexandre Julliarda11d7b11998-03-01 20:05:02 +0000413}
414
Juergen Schmied8e26b581998-10-23 12:51:38 +0000415/***********************************************************************
Stefan Leichter27faf022002-11-18 19:44:46 +0000416 * EnumDisplaySettingsA (USER32.@)
Juergen Schmied8e26b581998-10-23 12:51:38 +0000417 */
Stefan Leichter27faf022002-11-18 19:44:46 +0000418BOOL WINAPI EnumDisplaySettingsA(LPCSTR name,DWORD n,LPDEVMODEA devmode)
Alexandre Julliard193cf502002-01-01 00:24:30 +0000419{
Alex Pasadyn330179f2003-04-22 00:15:48 +0000420 return EnumDisplaySettingsExA(name, n, devmode, 0);
Juergen Schmied8e26b581998-10-23 12:51:38 +0000421}
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000422
423/***********************************************************************
Patrik Stridvalldf75e892001-02-12 03:49:07 +0000424 * EnumDisplaySettings (USER.621)
Eric Pouech982e0ce2001-01-28 23:44:56 +0000425 */
426BOOL16 WINAPI EnumDisplaySettings16(
427 LPCSTR name, /* [in] huh? */
428 DWORD n, /* [in] nth entry in display settings list*/
429 LPDEVMODEA devmode /* [out] devmode for that setting */
430) {
Eric Pouech982e0ce2001-01-28 23:44:56 +0000431 return (BOOL16)EnumDisplaySettingsA(name, n, devmode);
432}
433
434/***********************************************************************
Eric Pouecha862f682001-02-26 22:33:29 +0000435 * EnumDisplaySettingsExA (USER32.@)
436 */
437BOOL WINAPI EnumDisplaySettingsExA(LPCSTR lpszDeviceName, DWORD iModeNum,
Vincent Béron9a624912002-05-31 23:06:46 +0000438 LPDEVMODEA lpDevMode, DWORD dwFlags)
Eric Pouecha862f682001-02-26 22:33:29 +0000439{
Alex Pasadyn330179f2003-04-22 00:15:48 +0000440 DEVMODEW devmodeW;
441 BOOL ret;
442 UNICODE_STRING nameW;
Eric Pouecha862f682001-02-26 22:33:29 +0000443
Alex Pasadyn330179f2003-04-22 00:15:48 +0000444 if (lpszDeviceName) RtlCreateUnicodeStringFromAsciiz(&nameW, lpszDeviceName);
445 else nameW.Buffer = NULL;
446
447 ret = EnumDisplaySettingsExW(nameW.Buffer,iModeNum,&devmodeW,dwFlags);
448 if (ret)
449 {
450 lpDevMode->dmBitsPerPel = devmodeW.dmBitsPerPel;
451 lpDevMode->dmPelsHeight = devmodeW.dmPelsHeight;
452 lpDevMode->dmPelsWidth = devmodeW.dmPelsWidth;
453 lpDevMode->dmDisplayFlags = devmodeW.dmDisplayFlags;
454 lpDevMode->dmDisplayFrequency = devmodeW.dmDisplayFrequency;
455 lpDevMode->dmFields = devmodeW.dmFields;
456 }
457 if (lpszDeviceName) RtlFreeUnicodeString(&nameW);
458 return ret;
Eric Pouecha862f682001-02-26 22:33:29 +0000459}
460
461/***********************************************************************
462 * EnumDisplaySettingsExW (USER32.@)
463 */
464BOOL WINAPI EnumDisplaySettingsExW(LPCWSTR lpszDeviceName, DWORD iModeNum,
Vincent Béron9a624912002-05-31 23:06:46 +0000465 LPDEVMODEW lpDevMode, DWORD dwFlags)
Eric Pouecha862f682001-02-26 22:33:29 +0000466{
Alex Pasadyn330179f2003-04-22 00:15:48 +0000467 /* Pass the request on to the driver */
468 if (!USER_Driver.pEnumDisplaySettingsExW) return FALSE;
469 return USER_Driver.pEnumDisplaySettingsExW(lpszDeviceName, iModeNum, lpDevMode, dwFlags);
Eric Pouecha862f682001-02-26 22:33:29 +0000470}
471
472/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000473 * EnumDisplayDevicesA (USER32.@)
Marcus Meissner8388f671999-09-19 12:09:23 +0000474 */
475BOOL WINAPI EnumDisplayDevicesA(
476 LPVOID unused,DWORD i,LPDISPLAY_DEVICEA lpDisplayDevice,DWORD dwFlags
477) {
478 if (i)
479 return FALSE;
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000480 FIXME("(%p,%ld,%p,0x%08lx), stub!\n",unused,i,lpDisplayDevice,dwFlags);
Marcus Meissner8388f671999-09-19 12:09:23 +0000481 strcpy(lpDisplayDevice->DeviceName,"X11");
482 strcpy(lpDisplayDevice->DeviceString,"X 11 Windowing System");
483 lpDisplayDevice->StateFlags =
484 DISPLAY_DEVICE_ATTACHED_TO_DESKTOP |
485 DISPLAY_DEVICE_PRIMARY_DEVICE |
486 DISPLAY_DEVICE_VGA_COMPATIBLE;
487 return TRUE;
488}
489
490/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000491 * EnumDisplayDevicesW (USER32.@)
Marcus Meissner8388f671999-09-19 12:09:23 +0000492 */
493BOOL WINAPI EnumDisplayDevicesW(
494 LPVOID unused,DWORD i,LPDISPLAY_DEVICEW lpDisplayDevice,DWORD dwFlags
495) {
496 if (i)
497 return FALSE;
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000498 FIXME("(%p,%ld,%p,0x%08lx), stub!\n",unused,i,lpDisplayDevice,dwFlags);
Alexandre Julliard24a62ab2000-11-28 22:40:56 +0000499 MultiByteToWideChar( CP_ACP, 0, "X11", -1, lpDisplayDevice->DeviceName,
500 sizeof(lpDisplayDevice->DeviceName)/sizeof(WCHAR) );
501 MultiByteToWideChar( CP_ACP, 0, "X11 Windowing System", -1, lpDisplayDevice->DeviceString,
502 sizeof(lpDisplayDevice->DeviceString)/sizeof(WCHAR) );
Marcus Meissner8388f671999-09-19 12:09:23 +0000503 lpDisplayDevice->StateFlags =
504 DISPLAY_DEVICE_ATTACHED_TO_DESKTOP |
505 DISPLAY_DEVICE_PRIMARY_DEVICE |
506 DISPLAY_DEVICE_VGA_COMPATIBLE;
507 return TRUE;
508}
509
510/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000511 * SetEventHook (USER.321)
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000512 *
513 * Used by Turbo Debugger for Windows
514 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000515FARPROC16 WINAPI SetEventHook16(FARPROC16 lpfnEventHook)
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000516{
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000517 FIXME("(lpfnEventHook=%08x): stub\n", (UINT)lpfnEventHook);
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000518 return NULL;
519}
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000520
521/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000522 * UserSeeUserDo (USER.216)
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000523 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000524DWORD WINAPI UserSeeUserDo16(WORD wReqType, WORD wParam1, WORD wParam2, WORD wParam3)
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000525{
526 switch (wReqType)
527 {
528 case USUD_LOCALALLOC:
529 return LOCAL_Alloc(USER_HeapSel, wParam1, wParam3);
530 case USUD_LOCALFREE:
531 return LOCAL_Free(USER_HeapSel, wParam1);
532 case USUD_LOCALCOMPACT:
533 return LOCAL_Compact(USER_HeapSel, wParam3, 0);
534 case USUD_LOCALHEAP:
535 return USER_HeapSel;
536 case USUD_FIRSTCLASS:
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000537 FIXME("return a pointer to the first window class.\n");
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000538 return (DWORD)-1;
539 default:
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000540 WARN("wReqType %04x (unknown)\n", wReqType);
Alexandre Julliarda69b88b1998-03-15 20:29:56 +0000541 return (DWORD)-1;
542 }
543}
544
Marcus Meissner9cfe2d51998-11-01 14:02:57 +0000545/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000546 * GetSystemDebugState (USER.231)
Alexandre Julliard4220b291999-07-11 17:20:01 +0000547 */
548WORD WINAPI GetSystemDebugState16(void)
549{
550 return 0; /* FIXME */
551}
552
553/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000554 * RegisterLogonProcess (USER32.@)
Marcus Meissner9cfe2d51998-11-01 14:02:57 +0000555 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000556DWORD WINAPI RegisterLogonProcess(HANDLE hprocess,BOOL x) {
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000557 FIXME("(%p,%d),stub!\n",hprocess,x);
Marcus Meissner8143acc1998-10-31 12:19:56 +0000558 return 1;
559}
560
Marcus Meissner9cfe2d51998-11-01 14:02:57 +0000561/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000562 * CreateWindowStationW (USER32.@)
Marcus Meissner9cfe2d51998-11-01 14:02:57 +0000563 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000564HWINSTA WINAPI CreateWindowStationW(
Marcus Meissner8143acc1998-10-31 12:19:56 +0000565 LPWSTR winstation,DWORD res1,DWORD desiredaccess,
566 LPSECURITY_ATTRIBUTES lpsa
567) {
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000568 FIXME("(%s,0x%08lx,0x%08lx,%p),stub!\n",debugstr_w(winstation),
Marcus Meissner8143acc1998-10-31 12:19:56 +0000569 res1,desiredaccess,lpsa
570 );
François Gouget54300e52001-01-09 20:56:06 +0000571 return (HWINSTA)0xdeadcafe;
Marcus Meissner8143acc1998-10-31 12:19:56 +0000572}
573
Marcus Meissner9cfe2d51998-11-01 14:02:57 +0000574/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000575 * SetProcessWindowStation (USER32.@)
Marcus Meissner9cfe2d51998-11-01 14:02:57 +0000576 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000577BOOL WINAPI SetProcessWindowStation(HWINSTA hWinSta) {
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000578 FIXME("(%p),stub!\n",hWinSta);
Marcus Meissner8143acc1998-10-31 12:19:56 +0000579 return TRUE;
580}
581
Marcus Meissner9cfe2d51998-11-01 14:02:57 +0000582/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000583 * SetUserObjectSecurity (USER32.@)
Marcus Meissner9cfe2d51998-11-01 14:02:57 +0000584 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000585BOOL WINAPI SetUserObjectSecurity(
586 HANDLE hObj,
Francois Gouget326e2ba2000-06-18 17:26:44 +0000587 PSECURITY_INFORMATION pSIRequested,
Juergen Schmied1ed51af1999-02-12 17:47:07 +0000588 PSECURITY_DESCRIPTOR pSID
Marcus Meissner8143acc1998-10-31 12:19:56 +0000589) {
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000590 FIXME("(%p,%p,%p),stub!\n",hObj,pSIRequested,pSID);
Marcus Meissner8143acc1998-10-31 12:19:56 +0000591 return TRUE;
592}
593
Marcus Meissner9cfe2d51998-11-01 14:02:57 +0000594/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000595 * CreateDesktopA (USER32.@)
Peter Gantenae3716d2000-07-15 15:13:56 +0000596 */
597HDESK WINAPI CreateDesktopA(
598 LPSTR lpszDesktop,LPSTR lpszDevice,LPDEVMODEA pDevmode,
599 DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa
600) {
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000601 FIXME("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n",
Peter Gantenae3716d2000-07-15 15:13:56 +0000602 lpszDesktop,lpszDevice,pDevmode,
603 dwFlags,dwDesiredAccess,lpsa
604 );
François Gougetd6515df2001-01-03 21:39:33 +0000605 return (HDESK)0xcafedead;
Peter Gantenae3716d2000-07-15 15:13:56 +0000606}
607
608/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000609 * CreateDesktopW (USER32.@)
Marcus Meissner9cfe2d51998-11-01 14:02:57 +0000610 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000611HDESK WINAPI CreateDesktopW(
612 LPWSTR lpszDesktop,LPWSTR lpszDevice,LPDEVMODEW pDevmode,
Marcus Meissner8143acc1998-10-31 12:19:56 +0000613 DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa
614) {
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000615 FIXME("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n",
Marcus Meissner8143acc1998-10-31 12:19:56 +0000616 debugstr_w(lpszDesktop),debugstr_w(lpszDevice),pDevmode,
617 dwFlags,dwDesiredAccess,lpsa
618 );
François Gougetd6515df2001-01-03 21:39:33 +0000619 return (HDESK)0xcafedead;
Marcus Meissner8143acc1998-10-31 12:19:56 +0000620}
621
Patrik Stridvall2d6457c2000-03-28 20:22:59 +0000622/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000623 * EnumDesktopWindows (USER32.@)
Peter Gantenae3716d2000-07-15 15:13:56 +0000624 */
625BOOL WINAPI EnumDesktopWindows( HDESK hDesktop, WNDENUMPROC lpfn, LPARAM lParam ) {
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000626 FIXME("(%p, %p, 0x%08lx), stub!\n", hDesktop, lpfn, lParam );
Peter Gantenae3716d2000-07-15 15:13:56 +0000627 return TRUE;
628}
629
630
631/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000632 * CloseWindowStation (USER32.@)
Patrik Stridvall2d6457c2000-03-28 20:22:59 +0000633 */
Sergey Turchanov2f5a1521999-04-10 16:48:46 +0000634BOOL WINAPI CloseWindowStation(HWINSTA hWinSta)
635{
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000636 FIXME("(%p)\n", hWinSta);
Sergey Turchanov2f5a1521999-04-10 16:48:46 +0000637 return TRUE;
638}
Patrik Stridvall2d6457c2000-03-28 20:22:59 +0000639
640/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000641 * CloseDesktop (USER32.@)
Patrik Stridvall2d6457c2000-03-28 20:22:59 +0000642 */
Sergey Turchanov2f5a1521999-04-10 16:48:46 +0000643BOOL WINAPI CloseDesktop(HDESK hDesk)
644{
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000645 FIXME("(%p)\n", hDesk);
Sergey Turchanov2f5a1521999-04-10 16:48:46 +0000646 return TRUE;
647}
648
Marcus Meissner9cfe2d51998-11-01 14:02:57 +0000649/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000650 * SetWindowStationUser (USER32.@)
Marcus Meissner9cfe2d51998-11-01 14:02:57 +0000651 */
Marcus Meissner8143acc1998-10-31 12:19:56 +0000652DWORD WINAPI SetWindowStationUser(DWORD x1,DWORD x2) {
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000653 FIXME("(0x%08lx,0x%08lx),stub!\n",x1,x2);
Marcus Meissner8143acc1998-10-31 12:19:56 +0000654 return 1;
655}
Marcus Meissner9cfe2d51998-11-01 14:02:57 +0000656
657/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000658 * SetLogonNotifyWindow (USER32.@)
Marcus Meissner9cfe2d51998-11-01 14:02:57 +0000659 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000660DWORD WINAPI SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd) {
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000661 FIXME("(%p,%p),stub!\n",hwinsta,hwnd);
Marcus Meissner9cfe2d51998-11-01 14:02:57 +0000662 return 1;
663}
664
665/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000666 * LoadLocalFonts (USER32.@)
Marcus Meissner9cfe2d51998-11-01 14:02:57 +0000667 */
668VOID WINAPI LoadLocalFonts(VOID) {
669 /* are loaded. */
670 return;
671}
Juergen Schmied80907841998-11-24 20:26:02 +0000672/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000673 * GetUserObjectInformationA (USER32.@)
Juergen Schmied80907841998-11-24 20:26:02 +0000674 */
Patrik Stridvall8276f691999-09-23 11:48:02 +0000675BOOL WINAPI GetUserObjectInformationA( HANDLE hObj, INT nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen )
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000676{ FIXME("(%p %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen );
Juergen Schmied80907841998-11-24 20:26:02 +0000677 return TRUE;
678}
679/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000680 * GetUserObjectInformationW (USER32.@)
Juergen Schmied80907841998-11-24 20:26:02 +0000681 */
Patrik Stridvall8276f691999-09-23 11:48:02 +0000682BOOL WINAPI GetUserObjectInformationW( HANDLE hObj, INT nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen )
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000683{ FIXME("(%p %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen );
Juergen Schmied80907841998-11-24 20:26:02 +0000684 return TRUE;
685}
Juergen Schmied535f32f1999-01-31 09:20:36 +0000686/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000687 * GetUserObjectSecurity (USER32.@)
Juergen Schmied535f32f1999-01-31 09:20:36 +0000688 */
Francois Gouget326e2ba2000-06-18 17:26:44 +0000689BOOL WINAPI GetUserObjectSecurity(HANDLE hObj, PSECURITY_INFORMATION pSIRequested,
Juergen Schmied535f32f1999-01-31 09:20:36 +0000690 PSECURITY_DESCRIPTOR pSID, DWORD nLength, LPDWORD lpnLengthNeeded)
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000691{ FIXME("(%p %p %p len=%ld %p),stub!\n", hObj, pSIRequested, pSID, nLength, lpnLengthNeeded);
Juergen Schmied535f32f1999-01-31 09:20:36 +0000692 return TRUE;
693}
Lionel Ulmer5f5b5761999-03-28 13:42:12 +0000694
695/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000696 * SetSystemCursor (USER32.@)
Lionel Ulmer5f5b5761999-03-28 13:42:12 +0000697 */
698BOOL WINAPI SetSystemCursor(HCURSOR hcur, DWORD id)
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000699{ FIXME("(%p,%08lx),stub!\n", hcur, id);
Lionel Ulmer5f5b5761999-03-28 13:42:12 +0000700 return TRUE;
701}
Bertho Stultiensaf504741999-04-11 12:04:33 +0000702
703/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000704 * RegisterSystemThread (USER32.@)
Bertho Stultiensaf504741999-04-11 12:04:33 +0000705 */
Marcus Meissnerf203ab61999-04-15 15:12:40 +0000706void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved)
Bertho Stultiensaf504741999-04-11 12:04:33 +0000707{
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000708 FIXME("(%08lx, %08lx)\n", flags, reserved);
Bertho Stultiensaf504741999-04-11 12:04:33 +0000709}
Marcus Meissner521c0e42000-07-10 10:58:16 +0000710
711/***********************************************************************
Patrik Stridvall2ece70e2000-12-22 01:38:01 +0000712 * RegisterDeviceNotificationA (USER32.@)
Robert Shearmane2b12222004-03-05 20:44:15 +0000713 *
714 * See RegisterDeviceNotificationW.
Marcus Meissner521c0e42000-07-10 10:58:16 +0000715 */
Dimitrie O. Paun475cdcb2004-02-26 05:30:54 +0000716HDEVNOTIFY WINAPI RegisterDeviceNotificationA(HANDLE hnd, LPVOID notifyfilter, DWORD flags)
717{
718 FIXME("(hwnd=%p, filter=%p,flags=0x%08lx), STUB!\n", hnd,notifyfilter,flags );
Alexandre Julliardaff7dda2002-11-22 21:22:14 +0000719 return 0;
Marcus Meissner521c0e42000-07-10 10:58:16 +0000720}
Robert Shearmane2b12222004-03-05 20:44:15 +0000721
722/***********************************************************************
723 * RegisterDeviceNotificationW (USER32.@)
724 *
725 * Registers a window with the system so that it will receive
726 * notifications about a device.
727 *
728 * PARAMS
729 * hRecepient [I] Window or service status handle that
730 * will receive notifications.
731 * pNotificationFilter [I] DEV_BROADCAST_HDR followed by some
732 * type-specific data.
733 * dwFlags [I] See notes
734 *
735 * RETURNS
736 *
737 * A handle to the device notification.
738 *
739 * NOTES
740 *
741 * The dwFlags parameter can be one of two values:
742 *| DEVICE_NOTIFY_WINDOW_HANDLE - hRecepient is a window handle
743 *| DEVICE_NOTIFY_SERVICE_HANDLE - hRecepient is a service status handle
744 */
745HDEVNOTIFY WINAPI RegisterDeviceNotificationW(HANDLE hRecepient, LPVOID pNotificationFilter, DWORD dwFlags)
746{
747 FIXME("(hwnd=%p, filter=%p,flags=0x%08lx), STUB!\n", hRecepient,pNotificationFilter,dwFlags );
748 return 0;
749}