Alexandre Julliard | 234bc24 | 1994-12-10 13:02:28 +0000 | [diff] [blame] | 1 | /* |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 2 | * Misc. USER functions |
| 3 | * |
| 4 | * Copyright 1993 Robert J. Amstadt |
Alexandre Julliard | 2ace16a | 1996-04-28 15:09:19 +0000 | [diff] [blame] | 5 | * 1996 Alex Korobka |
Alexandre Julliard | b817f4f | 1996-03-14 18:08:34 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 8 | #include <stdlib.h> |
Marcus Meissner | 61afa33 | 1999-02-22 10:16:00 +0000 | [diff] [blame] | 9 | #include "wine/winbase16.h" |
Jeremy White | d3e22d9 | 2000-02-10 19:03:02 +0000 | [diff] [blame] | 10 | #include "windef.h" |
| 11 | #include "wingdi.h" |
Marcus Meissner | 61afa33 | 1999-02-22 10:16:00 +0000 | [diff] [blame] | 12 | #include "winuser.h" |
Alexandre Julliard | 889f742 | 1997-04-15 17:19:52 +0000 | [diff] [blame] | 13 | #include "heap.h" |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 14 | #include "user.h" |
Alexandre Julliard | 2ace16a | 1996-04-28 15:09:19 +0000 | [diff] [blame] | 15 | #include "task.h" |
| 16 | #include "queue.h" |
Alexandre Julliard | 7e56f68 | 1996-01-31 19:02:28 +0000 | [diff] [blame] | 17 | #include "win.h" |
Alexandre Julliard | 91222da | 2000-12-10 23:01:33 +0000 | [diff] [blame] | 18 | #include "controls.h" |
Ulrich Weigand | 1b938b1 | 1999-03-10 14:03:06 +0000 | [diff] [blame] | 19 | #include "cursoricon.h" |
Alexandre Julliard | 2ace16a | 1996-04-28 15:09:19 +0000 | [diff] [blame] | 20 | #include "hook.h" |
Alexandre Julliard | e2abbb1 | 1995-03-19 17:39:39 +0000 | [diff] [blame] | 21 | #include "toolhelp.h" |
Alexandre Julliard | 2c69f6d | 1996-09-28 18:11:01 +0000 | [diff] [blame] | 22 | #include "message.h" |
Alexandre Julliard | c7c217b | 1998-04-13 12:21:30 +0000 | [diff] [blame] | 23 | #include "miscemu.h" |
Alexandre Julliard | 646c562 | 2000-07-31 23:32:47 +0000 | [diff] [blame] | 24 | #include "sysmetrics.h" |
Alexandre Julliard | ebfc0fe | 1998-06-28 18:40:26 +0000 | [diff] [blame] | 25 | #include "callback.h" |
Patrik Stridvall | 8d8703c | 1999-02-04 14:05:38 +0000 | [diff] [blame] | 26 | #include "local.h" |
Alexandre Julliard | becb9a3 | 2000-12-11 03:48:15 +0000 | [diff] [blame] | 27 | #include "module.h" |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 28 | #include "debugtools.h" |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 29 | |
Alexandre Julliard | 646c562 | 2000-07-31 23:32:47 +0000 | [diff] [blame] | 30 | DECLARE_DEBUG_CHANNEL(hook); |
| 31 | DECLARE_DEBUG_CHANNEL(local); |
| 32 | DECLARE_DEBUG_CHANNEL(system); |
| 33 | DECLARE_DEBUG_CHANNEL(win); |
| 34 | DECLARE_DEBUG_CHANNEL(win32); |
Patrik Stridvall | b4b9fae | 1999-04-19 14:56:29 +0000 | [diff] [blame] | 35 | |
Alexandre Julliard | e2abbb1 | 1995-03-19 17:39:39 +0000 | [diff] [blame] | 36 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 37 | * GetFreeSystemResources (USER.284) |
Alexandre Julliard | e2abbb1 | 1995-03-19 17:39:39 +0000 | [diff] [blame] | 38 | */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 39 | WORD WINAPI GetFreeSystemResources16( WORD resType ) |
Alexandre Julliard | e2abbb1 | 1995-03-19 17:39:39 +0000 | [diff] [blame] | 40 | { |
Alexandre Julliard | 2a2321b | 2000-08-19 21:38:55 +0000 | [diff] [blame] | 41 | HINSTANCE16 gdi_inst; |
| 42 | WORD gdi_heap; |
Alexandre Julliard | cdcdede | 1996-04-21 14:57:41 +0000 | [diff] [blame] | 43 | int userPercent, gdiPercent; |
Alexandre Julliard | e2abbb1 | 1995-03-19 17:39:39 +0000 | [diff] [blame] | 44 | |
Alexandre Julliard | 2a2321b | 2000-08-19 21:38:55 +0000 | [diff] [blame] | 45 | if ((gdi_inst = LoadLibrary16( "GDI" )) < 32) return 0; |
| 46 | gdi_heap = GlobalHandleToSel16( gdi_inst ); |
| 47 | |
Alexandre Julliard | e2abbb1 | 1995-03-19 17:39:39 +0000 | [diff] [blame] | 48 | switch(resType) |
| 49 | { |
| 50 | case GFSR_USERRESOURCES: |
Alexandre Julliard | cdcdede | 1996-04-21 14:57:41 +0000 | [diff] [blame] | 51 | userPercent = (int)LOCAL_CountFree( USER_HeapSel ) * 100 / |
| 52 | LOCAL_HeapSize( USER_HeapSel ); |
| 53 | gdiPercent = 100; |
Alexandre Julliard | e2abbb1 | 1995-03-19 17:39:39 +0000 | [diff] [blame] | 54 | break; |
| 55 | |
| 56 | case GFSR_GDIRESOURCES: |
Alexandre Julliard | 2a2321b | 2000-08-19 21:38:55 +0000 | [diff] [blame] | 57 | gdiPercent = (int)LOCAL_CountFree( gdi_inst ) * 100 / |
| 58 | LOCAL_HeapSize( gdi_inst ); |
Alexandre Julliard | cdcdede | 1996-04-21 14:57:41 +0000 | [diff] [blame] | 59 | userPercent = 100; |
Alexandre Julliard | e2abbb1 | 1995-03-19 17:39:39 +0000 | [diff] [blame] | 60 | break; |
| 61 | |
| 62 | case GFSR_SYSTEMRESOURCES: |
Alexandre Julliard | cdcdede | 1996-04-21 14:57:41 +0000 | [diff] [blame] | 63 | userPercent = (int)LOCAL_CountFree( USER_HeapSel ) * 100 / |
| 64 | LOCAL_HeapSize( USER_HeapSel ); |
Alexandre Julliard | 2a2321b | 2000-08-19 21:38:55 +0000 | [diff] [blame] | 65 | gdiPercent = (int)LOCAL_CountFree( gdi_inst ) * 100 / |
| 66 | LOCAL_HeapSize( gdi_inst ); |
Alexandre Julliard | e2abbb1 | 1995-03-19 17:39:39 +0000 | [diff] [blame] | 67 | break; |
| 68 | |
| 69 | default: |
Alexandre Julliard | 2a2321b | 2000-08-19 21:38:55 +0000 | [diff] [blame] | 70 | userPercent = gdiPercent = 0; |
| 71 | break; |
Alexandre Julliard | e2abbb1 | 1995-03-19 17:39:39 +0000 | [diff] [blame] | 72 | } |
Alexandre Julliard | 2a2321b | 2000-08-19 21:38:55 +0000 | [diff] [blame] | 73 | FreeLibrary16( gdi_inst ); |
Francois Gouget | 6d77d3a | 2000-03-25 21:44:35 +0000 | [diff] [blame] | 74 | return (WORD)min( userPercent, gdiPercent ); |
Alexandre Julliard | e2abbb1 | 1995-03-19 17:39:39 +0000 | [diff] [blame] | 75 | } |
| 76 | |
| 77 | |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 78 | /********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 79 | * InitApp (USER.5) |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 80 | */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 81 | INT16 WINAPI InitApp16( HINSTANCE16 hInstance ) |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 82 | { |
Alexandre Julliard | c7c217b | 1998-04-13 12:21:30 +0000 | [diff] [blame] | 83 | /* Hack: restore the divide-by-zero handler */ |
| 84 | /* FIXME: should set a USER-specific handler that displays a msg box */ |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 85 | INT_SetPMHandler( 0, INT_GetPMHandler( 0xff ) ); |
Alexandre Julliard | c7c217b | 1998-04-13 12:21:30 +0000 | [diff] [blame] | 86 | |
Ulrich Weigand | 0be24af | 1999-01-20 13:16:32 +0000 | [diff] [blame] | 87 | /* Create task message queue */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 88 | if ( !GetFastQueue16() ) return 0; |
Alexandre Julliard | fb9a919 | 1994-03-01 19:48:04 +0000 | [diff] [blame] | 89 | |
Alexandre Julliard | 401710d | 1993-09-04 10:09:32 +0000 | [diff] [blame] | 90 | return 1; |
| 91 | } |
Alexandre Julliard | 2ace16a | 1996-04-28 15:09:19 +0000 | [diff] [blame] | 92 | |
| 93 | /********************************************************************** |
Alexandre Julliard | 77b9918 | 1997-09-14 17:17:23 +0000 | [diff] [blame] | 94 | * USER_ModuleUnload |
| 95 | */ |
| 96 | static void USER_ModuleUnload( HMODULE16 hModule ) |
| 97 | { |
| 98 | HOOK_FreeModuleHooks( hModule ); |
| 99 | CLASS_FreeModuleClasses( hModule ); |
Ulrich Weigand | 1b938b1 | 1999-03-10 14:03:06 +0000 | [diff] [blame] | 100 | CURSORICON_FreeModuleIcons( hModule ); |
Alexandre Julliard | 77b9918 | 1997-09-14 17:17:23 +0000 | [diff] [blame] | 101 | } |
| 102 | |
| 103 | /********************************************************************** |
Stephane Lussier | 91bb1f9 | 1999-02-09 14:07:07 +0000 | [diff] [blame] | 104 | * USER_QueueCleanup |
Alexandre Julliard | 2ace16a | 1996-04-28 15:09:19 +0000 | [diff] [blame] | 105 | */ |
Ulrich Weigand | e392a0c | 1999-04-01 11:44:52 +0000 | [diff] [blame] | 106 | static void USER_QueueCleanup( HQUEUE16 hQueue ) |
Alexandre Julliard | 2ace16a | 1996-04-28 15:09:19 +0000 | [diff] [blame] | 107 | { |
Ulrich Weigand | 0be24af | 1999-01-20 13:16:32 +0000 | [diff] [blame] | 108 | if ( hQueue ) |
| 109 | { |
Ulrich Weigand | 0be24af | 1999-01-20 13:16:32 +0000 | [diff] [blame] | 110 | WND* desktop = WIN_GetDesktop(); |
Alexandre Julliard | 2ace16a | 1996-04-28 15:09:19 +0000 | [diff] [blame] | 111 | |
Ulrich Weigand | e392a0c | 1999-04-01 11:44:52 +0000 | [diff] [blame] | 112 | /* Patch desktop window */ |
| 113 | if ( desktop->hmemTaskQ == hQueue ) |
| 114 | { |
| 115 | HTASK16 nextTask = TASK_GetNextTask( GetCurrentTask() ); |
| 116 | desktop->hmemTaskQ = GetTaskQueue16( nextTask ); |
| 117 | } |
| 118 | |
Ulrich Weigand | 0be24af | 1999-01-20 13:16:32 +0000 | [diff] [blame] | 119 | /* Patch resident popup menu window */ |
| 120 | MENU_PatchResidentPopup( hQueue, NULL ); |
Alexandre Julliard | 2c69f6d | 1996-09-28 18:11:01 +0000 | [diff] [blame] | 121 | |
Ulrich Weigand | 0be24af | 1999-01-20 13:16:32 +0000 | [diff] [blame] | 122 | TIMER_RemoveQueueTimers( hQueue ); |
Alexandre Julliard | 2ace16a | 1996-04-28 15:09:19 +0000 | [diff] [blame] | 123 | |
Ulrich Weigand | 0be24af | 1999-01-20 13:16:32 +0000 | [diff] [blame] | 124 | HOOK_FreeQueueHooks( hQueue ); |
Alexandre Julliard | 2ace16a | 1996-04-28 15:09:19 +0000 | [diff] [blame] | 125 | |
Ulrich Weigand | 0be24af | 1999-01-20 13:16:32 +0000 | [diff] [blame] | 126 | QUEUE_SetExitingQueue( hQueue ); |
| 127 | WIN_ResetQueueWindows( desktop, hQueue, (HQUEUE16)0); |
Ulrich Weigand | 0be24af | 1999-01-20 13:16:32 +0000 | [diff] [blame] | 128 | QUEUE_SetExitingQueue( 0 ); |
Alexandre Julliard | e2bfa4c | 1996-05-16 18:21:06 +0000 | [diff] [blame] | 129 | |
Ulrich Weigand | 0be24af | 1999-01-20 13:16:32 +0000 | [diff] [blame] | 130 | /* Free the message queue */ |
| 131 | QUEUE_DeleteMsgQueue( hQueue ); |
Francois Boisvert | 3a3cd9f | 1999-03-28 12:42:52 +0000 | [diff] [blame] | 132 | |
| 133 | WIN_ReleaseDesktop(); |
Ulrich Weigand | 0be24af | 1999-01-20 13:16:32 +0000 | [diff] [blame] | 134 | } |
Stephane Lussier | 91bb1f9 | 1999-02-09 14:07:07 +0000 | [diff] [blame] | 135 | } |
| 136 | |
| 137 | /********************************************************************** |
| 138 | * USER_AppExit |
| 139 | */ |
Alexandre Julliard | 7d5bc5c | 2001-01-15 20:09:09 +0000 | [diff] [blame] | 140 | static void USER_AppExit(void) |
Stephane Lussier | 91bb1f9 | 1999-02-09 14:07:07 +0000 | [diff] [blame] | 141 | { |
Alexandre Julliard | 7d5bc5c | 2001-01-15 20:09:09 +0000 | [diff] [blame] | 142 | HINSTANCE16 hInstance = MapHModuleLS(0); |
| 143 | |
Noel Borthwick | 2970067 | 1999-09-03 15:17:57 +0000 | [diff] [blame] | 144 | /* FIXME: maybe destroy menus (Windows only complains about them |
| 145 | * but does nothing); |
| 146 | */ |
| 147 | |
Alexandre Julliard | 77b9918 | 1997-09-14 17:17:23 +0000 | [diff] [blame] | 148 | /* ModuleUnload() in "Internals" */ |
| 149 | |
| 150 | hInstance = GetExePtr( hInstance ); |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 151 | if( GetModuleUsage16( hInstance ) <= 1 ) |
Alexandre Julliard | 77b9918 | 1997-09-14 17:17:23 +0000 | [diff] [blame] | 152 | USER_ModuleUnload( hInstance ); |
Alexandre Julliard | 2ace16a | 1996-04-28 15:09:19 +0000 | [diff] [blame] | 153 | } |
| 154 | |
Alexandre Julliard | 889f742 | 1997-04-15 17:19:52 +0000 | [diff] [blame] | 155 | |
| 156 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 157 | * SignalProc (USER.314) |
Alexandre Julliard | 77b9918 | 1997-09-14 17:17:23 +0000 | [diff] [blame] | 158 | */ |
| 159 | void WINAPI USER_SignalProc( HANDLE16 hTaskOrModule, UINT16 uCode, |
| 160 | UINT16 uExitFn, HINSTANCE16 hInstance, |
| 161 | HQUEUE16 hQueue ) |
| 162 | { |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 163 | FIXME_(win)("Win 3.1 USER signal %04x\n", uCode ); |
Alexandre Julliard | 77b9918 | 1997-09-14 17:17:23 +0000 | [diff] [blame] | 164 | } |
| 165 | |
Ulrich Weigand | e392a0c | 1999-04-01 11:44:52 +0000 | [diff] [blame] | 166 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 167 | * FinalUserInit (USER.400) |
Ulrich Weigand | 98c3053 | 1999-07-27 17:10:06 +0000 | [diff] [blame] | 168 | */ |
| 169 | void WINAPI FinalUserInit16( void ) |
| 170 | { |
| 171 | /* FIXME: Should chain to FinalGdiInit now. */ |
| 172 | } |
| 173 | |
| 174 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 175 | * UserSignalProc (USER.391) (USER32.@) |
Ulrich Weigand | e392a0c | 1999-04-01 11:44:52 +0000 | [diff] [blame] | 176 | * |
| 177 | * For comments about the meaning of uCode and dwFlags |
| 178 | * see PROCESS_CallUserSignalProc. |
| 179 | * |
| 180 | */ |
| 181 | WORD WINAPI UserSignalProc( UINT uCode, DWORD dwThreadOrProcessID, |
| 182 | DWORD dwFlags, HMODULE16 hModule ) |
| 183 | { |
Ulrich Weigand | e392a0c | 1999-04-01 11:44:52 +0000 | [diff] [blame] | 184 | /* FIXME: Proper reaction to most signals still missing. */ |
| 185 | |
| 186 | switch ( uCode ) |
| 187 | { |
| 188 | case USIG_DLL_UNLOAD_WIN16: |
| 189 | case USIG_DLL_UNLOAD_WIN32: |
| 190 | USER_ModuleUnload( hModule ); |
| 191 | break; |
| 192 | |
| 193 | case USIG_DLL_UNLOAD_ORPHANS: |
| 194 | break; |
| 195 | |
| 196 | case USIG_FAULT_DIALOG_PUSH: |
| 197 | case USIG_FAULT_DIALOG_POP: |
| 198 | break; |
| 199 | |
| 200 | case USIG_THREAD_INIT: |
| 201 | break; |
| 202 | |
| 203 | case USIG_THREAD_EXIT: |
| 204 | USER_QueueCleanup( GetThreadQueue16( dwThreadOrProcessID ) ); |
| 205 | SetThreadQueue16( dwThreadOrProcessID, 0 ); |
| 206 | break; |
| 207 | |
| 208 | case USIG_PROCESS_CREATE: |
Peter Ganten | 6619f5a | 2000-01-01 22:38:20 +0000 | [diff] [blame] | 209 | break; |
| 210 | |
Ulrich Weigand | e392a0c | 1999-04-01 11:44:52 +0000 | [diff] [blame] | 211 | case USIG_PROCESS_INIT: |
| 212 | case USIG_PROCESS_LOADED: |
Peter Ganten | 6619f5a | 2000-01-01 22:38:20 +0000 | [diff] [blame] | 213 | break; |
Ulrich Weigand | e392a0c | 1999-04-01 11:44:52 +0000 | [diff] [blame] | 214 | case USIG_PROCESS_RUNNING: |
| 215 | break; |
| 216 | |
| 217 | case USIG_PROCESS_EXIT: |
| 218 | break; |
| 219 | |
Alexandre Julliard | 7d5bc5c | 2001-01-15 20:09:09 +0000 | [diff] [blame] | 220 | case USIG_PROCESS_DESTROY: |
| 221 | USER_AppExit(); |
Peter Ganten | 6619f5a | 2000-01-01 22:38:20 +0000 | [diff] [blame] | 222 | break; |
Ulrich Weigand | e392a0c | 1999-04-01 11:44:52 +0000 | [diff] [blame] | 223 | |
| 224 | default: |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 225 | FIXME_(win)("(%04x, %08lx, %04lx, %04x)\n", |
Ulrich Weigand | e392a0c | 1999-04-01 11:44:52 +0000 | [diff] [blame] | 226 | uCode, dwThreadOrProcessID, dwFlags, hModule ); |
| 227 | break; |
| 228 | } |
| 229 | |
| 230 | /* FIXME: Should chain to GdiSignalProc now. */ |
| 231 | |
| 232 | return 0; |
| 233 | } |
| 234 | |
Ulrich Weigand | 937f4d3 | 1999-12-05 02:49:59 +0000 | [diff] [blame] | 235 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 236 | * DllEntryPoint (USER.374) |
Ulrich Weigand | 937f4d3 | 1999-12-05 02:49:59 +0000 | [diff] [blame] | 237 | */ |
| 238 | BOOL WINAPI USER_DllEntryPoint( DWORD dwReason, HINSTANCE hInstDLL, WORD ds, |
| 239 | WORD wHeapSize, DWORD dwReserved1, WORD wReserved2 ) |
| 240 | { |
| 241 | switch ( dwReason ) |
| 242 | { |
| 243 | case DLL_PROCESS_ATTACH: |
| 244 | /* |
| 245 | * We need to load the 32-bit library so as to be able |
| 246 | * to access the system resources stored there! |
| 247 | */ |
| 248 | if ( !LoadLibraryA("USER32.DLL") ) |
| 249 | { |
| 250 | ERR_(win)( "Could not load USER32.DLL\n" ); |
| 251 | return FALSE; |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | return TRUE; |
| 256 | } |
Ulrich Weigand | e392a0c | 1999-04-01 11:44:52 +0000 | [diff] [blame] | 257 | |
Alexandre Julliard | 77b9918 | 1997-09-14 17:17:23 +0000 | [diff] [blame] | 258 | |
| 259 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 260 | * ExitWindows (USER.7) |
Alexandre Julliard | 889f742 | 1997-04-15 17:19:52 +0000 | [diff] [blame] | 261 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 262 | BOOL16 WINAPI ExitWindows16( DWORD dwReturnCode, UINT16 wReserved ) |
Alexandre Julliard | 889f742 | 1997-04-15 17:19:52 +0000 | [diff] [blame] | 263 | { |
| 264 | return ExitWindowsEx( EWX_LOGOFF, 0xffffffff ); |
| 265 | } |
| 266 | |
| 267 | |
| 268 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 269 | * ExitWindowsExec (USER.246) |
Alexandre Julliard | d37eb36 | 1997-07-20 16:23:21 +0000 | [diff] [blame] | 270 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 271 | BOOL16 WINAPI ExitWindowsExec16( LPCSTR lpszExe, LPCSTR lpszParams ) |
Alexandre Julliard | d37eb36 | 1997-07-20 16:23:21 +0000 | [diff] [blame] | 272 | { |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 273 | TRACE_(system)("Should run the following in DOS-mode: \"%s %s\"\n", |
Alexandre Julliard | d37eb36 | 1997-07-20 16:23:21 +0000 | [diff] [blame] | 274 | lpszExe, lpszParams); |
| 275 | return ExitWindowsEx( EWX_LOGOFF, 0xffffffff ); |
| 276 | } |
| 277 | |
| 278 | |
| 279 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 280 | * ExitWindowsEx (USER32.@) |
Alexandre Julliard | 889f742 | 1997-04-15 17:19:52 +0000 | [diff] [blame] | 281 | */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 282 | BOOL WINAPI ExitWindowsEx( UINT flags, DWORD reserved ) |
Alexandre Julliard | 889f742 | 1997-04-15 17:19:52 +0000 | [diff] [blame] | 283 | { |
| 284 | int i; |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 285 | BOOL result; |
Alexandre Julliard | 889f742 | 1997-04-15 17:19:52 +0000 | [diff] [blame] | 286 | WND **list, **ppWnd; |
| 287 | |
| 288 | /* We have to build a list of all windows first, as in EnumWindows */ |
| 289 | |
Francois Boisvert | 3a3cd9f | 1999-03-28 12:42:52 +0000 | [diff] [blame] | 290 | if (!(list = WIN_BuildWinArray( WIN_GetDesktop(), 0, NULL ))) |
| 291 | { |
| 292 | WIN_ReleaseDesktop(); |
| 293 | return FALSE; |
| 294 | } |
Alexandre Julliard | 889f742 | 1997-04-15 17:19:52 +0000 | [diff] [blame] | 295 | |
| 296 | /* Send a WM_QUERYENDSESSION message to every window */ |
| 297 | |
| 298 | for (ppWnd = list, i = 0; *ppWnd; ppWnd++, i++) |
| 299 | { |
| 300 | /* Make sure that the window still exists */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 301 | if (!IsWindow( (*ppWnd)->hwndSelf )) continue; |
Alexandre Julliard | 889f742 | 1997-04-15 17:19:52 +0000 | [diff] [blame] | 302 | if (!SendMessage16( (*ppWnd)->hwndSelf, WM_QUERYENDSESSION, 0, 0 )) |
| 303 | break; |
| 304 | } |
| 305 | result = !(*ppWnd); |
| 306 | |
| 307 | /* Now notify all windows that got a WM_QUERYENDSESSION of the result */ |
| 308 | |
| 309 | for (ppWnd = list; i > 0; i--, ppWnd++) |
| 310 | { |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 311 | if (!IsWindow( (*ppWnd)->hwndSelf )) continue; |
Alexandre Julliard | 889f742 | 1997-04-15 17:19:52 +0000 | [diff] [blame] | 312 | SendMessage16( (*ppWnd)->hwndSelf, WM_ENDSESSION, result, 0 ); |
| 313 | } |
Francois Boisvert | 3a3cd9f | 1999-03-28 12:42:52 +0000 | [diff] [blame] | 314 | WIN_ReleaseWinArray(list); |
Alexandre Julliard | 889f742 | 1997-04-15 17:19:52 +0000 | [diff] [blame] | 315 | |
Ulrich Weigand | c319c66 | 1999-05-22 16:18:36 +0000 | [diff] [blame] | 316 | if (result) ExitKernel16(); |
Francois Boisvert | 3a3cd9f | 1999-03-28 12:42:52 +0000 | [diff] [blame] | 317 | WIN_ReleaseDesktop(); |
Alexandre Julliard | 889f742 | 1997-04-15 17:19:52 +0000 | [diff] [blame] | 318 | return FALSE; |
| 319 | } |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 320 | |
Marcus Meissner | 5e2f50f | 1999-11-07 22:26:20 +0000 | [diff] [blame] | 321 | static void _dump_CDS_flags(DWORD flags) { |
| 322 | #define X(x) if (flags & CDS_##x) MESSAGE(""#x ","); |
| 323 | X(UPDATEREGISTRY);X(TEST);X(FULLSCREEN);X(GLOBAL); |
| 324 | X(SET_PRIMARY);X(RESET);X(SETRECT);X(NORESET); |
| 325 | #undef X |
| 326 | } |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 327 | |
| 328 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 329 | * ChangeDisplaySettingsA (USER32.@) |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 330 | */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 331 | LONG WINAPI ChangeDisplaySettingsA( LPDEVMODEA devmode, DWORD flags ) |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 332 | { |
Marcus Meissner | 5e2f50f | 1999-11-07 22:26:20 +0000 | [diff] [blame] | 333 | FIXME_(system)("(%p,0x%08lx), stub\n",devmode,flags); |
| 334 | MESSAGE("\tflags=");_dump_CDS_flags(flags);MESSAGE("\n"); |
| 335 | if (devmode==NULL) |
| 336 | FIXME_(system)(" devmode=NULL (return to default mode)\n"); |
Alexandre Julliard | 646c562 | 2000-07-31 23:32:47 +0000 | [diff] [blame] | 337 | else if ( (devmode->dmBitsPerPel != GetSystemMetrics(SM_WINE_BPP)) |
| 338 | || (devmode->dmPelsHeight != GetSystemMetrics(SM_CYSCREEN)) |
| 339 | || (devmode->dmPelsWidth != GetSystemMetrics(SM_CXSCREEN)) ) |
Marcus Meissner | 5e2f50f | 1999-11-07 22:26:20 +0000 | [diff] [blame] | 340 | |
| 341 | { |
| 342 | |
| 343 | if (devmode->dmFields & DM_BITSPERPEL) |
| 344 | FIXME_(system)(" bpp=%ld\n",devmode->dmBitsPerPel); |
| 345 | if (devmode->dmFields & DM_PELSWIDTH) |
| 346 | FIXME_(system)(" width=%ld\n",devmode->dmPelsWidth); |
| 347 | if (devmode->dmFields & DM_PELSHEIGHT) |
| 348 | FIXME_(system)(" height=%ld\n",devmode->dmPelsHeight); |
| 349 | FIXME_(system)(" (Putting X in this mode beforehand might help)\n"); |
| 350 | /* we don't, but the program ... does not need to know */ |
| 351 | return DISP_CHANGE_SUCCESSFUL; |
| 352 | } |
| 353 | return DISP_CHANGE_SUCCESSFUL; |
| 354 | } |
| 355 | |
| 356 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 357 | * ChangeDisplaySettingsExA (USER32.@) |
Marcus Meissner | 5e2f50f | 1999-11-07 22:26:20 +0000 | [diff] [blame] | 358 | */ |
| 359 | LONG WINAPI ChangeDisplaySettingsExA( |
| 360 | LPCSTR devname, LPDEVMODEA devmode, HWND hwnd, DWORD flags, |
| 361 | LPARAM lparam |
| 362 | ) { |
| 363 | FIXME_(system)("(%s,%p,0x%04x,0x%08lx,0x%08lx), stub\n",devname,devmode,hwnd,flags,lparam); |
| 364 | MESSAGE("\tflags=");_dump_CDS_flags(flags);MESSAGE("\n"); |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 365 | if (devmode==NULL) |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 366 | FIXME_(system)(" devmode=NULL (return to default mode)\n"); |
Alexandre Julliard | 646c562 | 2000-07-31 23:32:47 +0000 | [diff] [blame] | 367 | else if ( (devmode->dmBitsPerPel != GetSystemMetrics(SM_WINE_BPP)) |
| 368 | || (devmode->dmPelsHeight != GetSystemMetrics(SM_CYSCREEN)) |
| 369 | || (devmode->dmPelsWidth != GetSystemMetrics(SM_CXSCREEN)) ) |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 370 | |
| 371 | { |
| 372 | |
| 373 | if (devmode->dmFields & DM_BITSPERPEL) |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 374 | FIXME_(system)(" bpp=%ld\n",devmode->dmBitsPerPel); |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 375 | if (devmode->dmFields & DM_PELSWIDTH) |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 376 | FIXME_(system)(" width=%ld\n",devmode->dmPelsWidth); |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 377 | if (devmode->dmFields & DM_PELSHEIGHT) |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 378 | FIXME_(system)(" height=%ld\n",devmode->dmPelsHeight); |
| 379 | FIXME_(system)(" (Putting X in this mode beforehand might help)\n"); |
Marcus Meissner | 66cd333 | 1998-10-27 15:41:54 +0000 | [diff] [blame] | 380 | /* we don't, but the program ... does not need to know */ |
| 381 | return DISP_CHANGE_SUCCESSFUL; |
Alexandre Julliard | 829fe32 | 1998-07-26 14:27:39 +0000 | [diff] [blame] | 382 | } |
| 383 | return DISP_CHANGE_SUCCESSFUL; |
| 384 | } |
| 385 | |
Alexandre Julliard | a11d7b1 | 1998-03-01 20:05:02 +0000 | [diff] [blame] | 386 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 387 | * EnumDisplaySettingsA (USER32.@) |
Marcus Meissner | 66cd333 | 1998-10-27 15:41:54 +0000 | [diff] [blame] | 388 | * FIXME: Currently uses static list of modes. |
| 389 | * |
| 390 | * RETURNS |
Patrik Stridvall | 2d6457c | 2000-03-28 20:22:59 +0000 | [diff] [blame] | 391 | * TRUE if nth setting exists found (described in the LPDEVMODEA struct) |
Marcus Meissner | 66cd333 | 1998-10-27 15:41:54 +0000 | [diff] [blame] | 392 | * FALSE if we do not have the nth setting |
Alexandre Julliard | a11d7b1 | 1998-03-01 20:05:02 +0000 | [diff] [blame] | 393 | */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 394 | BOOL WINAPI EnumDisplaySettingsA( |
Marcus Meissner | 66cd333 | 1998-10-27 15:41:54 +0000 | [diff] [blame] | 395 | LPCSTR name, /* [in] huh? */ |
| 396 | DWORD n, /* [in] nth entry in display settings list*/ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 397 | LPDEVMODEA devmode /* [out] devmode for that setting */ |
Marcus Meissner | 66cd333 | 1998-10-27 15:41:54 +0000 | [diff] [blame] | 398 | ) { |
| 399 | #define NRMODES 5 |
| 400 | #define NRDEPTHS 4 |
| 401 | struct { |
| 402 | int w,h; |
| 403 | } modes[NRMODES]={{512,384},{640,400},{640,480},{800,600},{1024,768}}; |
| 404 | int depths[4] = {8,16,24,32}; |
| 405 | |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 406 | TRACE_(system)("(%s,%ld,%p)\n",name,n,devmode); |
Alexandre Julliard | a11d7b1 | 1998-03-01 20:05:02 +0000 | [diff] [blame] | 407 | if (n==0) { |
Alexandre Julliard | 646c562 | 2000-07-31 23:32:47 +0000 | [diff] [blame] | 408 | devmode->dmBitsPerPel = GetSystemMetrics(SM_WINE_BPP); |
| 409 | devmode->dmPelsHeight = GetSystemMetrics(SM_CYSCREEN); |
| 410 | devmode->dmPelsWidth = GetSystemMetrics(SM_CXSCREEN); |
Alexandre Julliard | a11d7b1 | 1998-03-01 20:05:02 +0000 | [diff] [blame] | 411 | return TRUE; |
| 412 | } |
Marcus Meissner | 66cd333 | 1998-10-27 15:41:54 +0000 | [diff] [blame] | 413 | if ((n-1)<NRMODES*NRDEPTHS) { |
| 414 | devmode->dmBitsPerPel = depths[(n-1)/NRMODES]; |
| 415 | devmode->dmPelsHeight = modes[(n-1)%NRMODES].h; |
| 416 | devmode->dmPelsWidth = modes[(n-1)%NRMODES].w; |
| 417 | return TRUE; |
| 418 | } |
Alexandre Julliard | a11d7b1 | 1998-03-01 20:05:02 +0000 | [diff] [blame] | 419 | return FALSE; |
| 420 | } |
| 421 | |
Juergen Schmied | 8e26b58 | 1998-10-23 12:51:38 +0000 | [diff] [blame] | 422 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 423 | * EnumDisplaySettingsW (USER32.@) |
Juergen Schmied | 8e26b58 | 1998-10-23 12:51:38 +0000 | [diff] [blame] | 424 | */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 425 | BOOL WINAPI EnumDisplaySettingsW(LPCWSTR name,DWORD n,LPDEVMODEW devmode) { |
Marcus Meissner | 66cd333 | 1998-10-27 15:41:54 +0000 | [diff] [blame] | 426 | LPSTR nameA = HEAP_strdupWtoA(GetProcessHeap(),0,name); |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 427 | DEVMODEA devmodeA; |
| 428 | BOOL ret = EnumDisplaySettingsA(nameA,n,&devmodeA); |
Marcus Meissner | 66cd333 | 1998-10-27 15:41:54 +0000 | [diff] [blame] | 429 | |
| 430 | if (ret) { |
| 431 | devmode->dmBitsPerPel = devmodeA.dmBitsPerPel; |
| 432 | devmode->dmPelsHeight = devmodeA.dmPelsHeight; |
| 433 | devmode->dmPelsWidth = devmodeA.dmPelsWidth; |
| 434 | /* FIXME: convert rest too, if they are ever returned */ |
Juergen Schmied | 8e26b58 | 1998-10-23 12:51:38 +0000 | [diff] [blame] | 435 | } |
Marcus Meissner | 66cd333 | 1998-10-27 15:41:54 +0000 | [diff] [blame] | 436 | HeapFree(GetProcessHeap(),0,nameA); |
| 437 | return ret; |
Juergen Schmied | 8e26b58 | 1998-10-23 12:51:38 +0000 | [diff] [blame] | 438 | } |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 439 | |
| 440 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 441 | * EnumDisplayDevicesA (USER32.@) |
Marcus Meissner | 8388f67 | 1999-09-19 12:09:23 +0000 | [diff] [blame] | 442 | */ |
| 443 | BOOL WINAPI EnumDisplayDevicesA( |
| 444 | LPVOID unused,DWORD i,LPDISPLAY_DEVICEA lpDisplayDevice,DWORD dwFlags |
| 445 | ) { |
| 446 | if (i) |
| 447 | return FALSE; |
| 448 | FIXME_(system)("(%p,%ld,%p,0x%08lx), stub!\n",unused,i,lpDisplayDevice,dwFlags); |
| 449 | strcpy(lpDisplayDevice->DeviceName,"X11"); |
| 450 | strcpy(lpDisplayDevice->DeviceString,"X 11 Windowing System"); |
| 451 | lpDisplayDevice->StateFlags = |
| 452 | DISPLAY_DEVICE_ATTACHED_TO_DESKTOP | |
| 453 | DISPLAY_DEVICE_PRIMARY_DEVICE | |
| 454 | DISPLAY_DEVICE_VGA_COMPATIBLE; |
| 455 | return TRUE; |
| 456 | } |
| 457 | |
| 458 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 459 | * EnumDisplayDevicesW (USER32.@) |
Marcus Meissner | 8388f67 | 1999-09-19 12:09:23 +0000 | [diff] [blame] | 460 | */ |
| 461 | BOOL WINAPI EnumDisplayDevicesW( |
| 462 | LPVOID unused,DWORD i,LPDISPLAY_DEVICEW lpDisplayDevice,DWORD dwFlags |
| 463 | ) { |
| 464 | if (i) |
| 465 | return FALSE; |
| 466 | FIXME_(system)("(%p,%ld,%p,0x%08lx), stub!\n",unused,i,lpDisplayDevice,dwFlags); |
Alexandre Julliard | 24a62ab | 2000-11-28 22:40:56 +0000 | [diff] [blame] | 467 | MultiByteToWideChar( CP_ACP, 0, "X11", -1, lpDisplayDevice->DeviceName, |
| 468 | sizeof(lpDisplayDevice->DeviceName)/sizeof(WCHAR) ); |
| 469 | MultiByteToWideChar( CP_ACP, 0, "X11 Windowing System", -1, lpDisplayDevice->DeviceString, |
| 470 | sizeof(lpDisplayDevice->DeviceString)/sizeof(WCHAR) ); |
Marcus Meissner | 8388f67 | 1999-09-19 12:09:23 +0000 | [diff] [blame] | 471 | lpDisplayDevice->StateFlags = |
| 472 | DISPLAY_DEVICE_ATTACHED_TO_DESKTOP | |
| 473 | DISPLAY_DEVICE_PRIMARY_DEVICE | |
| 474 | DISPLAY_DEVICE_VGA_COMPATIBLE; |
| 475 | return TRUE; |
| 476 | } |
| 477 | |
| 478 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 479 | * SetEventHook (USER.321) |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 480 | * |
| 481 | * Used by Turbo Debugger for Windows |
| 482 | */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 483 | FARPROC16 WINAPI SetEventHook16(FARPROC16 lpfnEventHook) |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 484 | { |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 485 | FIXME_(hook)("(lpfnEventHook=%08x): stub\n", (UINT)lpfnEventHook); |
Alexandre Julliard | 60ce85c | 1998-02-01 18:33:27 +0000 | [diff] [blame] | 486 | return NULL; |
| 487 | } |
Alexandre Julliard | a69b88b | 1998-03-15 20:29:56 +0000 | [diff] [blame] | 488 | |
| 489 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 490 | * UserSeeUserDo (USER.216) |
Alexandre Julliard | a69b88b | 1998-03-15 20:29:56 +0000 | [diff] [blame] | 491 | */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 492 | DWORD WINAPI UserSeeUserDo16(WORD wReqType, WORD wParam1, WORD wParam2, WORD wParam3) |
Alexandre Julliard | a69b88b | 1998-03-15 20:29:56 +0000 | [diff] [blame] | 493 | { |
| 494 | switch (wReqType) |
| 495 | { |
| 496 | case USUD_LOCALALLOC: |
| 497 | return LOCAL_Alloc(USER_HeapSel, wParam1, wParam3); |
| 498 | case USUD_LOCALFREE: |
| 499 | return LOCAL_Free(USER_HeapSel, wParam1); |
| 500 | case USUD_LOCALCOMPACT: |
| 501 | return LOCAL_Compact(USER_HeapSel, wParam3, 0); |
| 502 | case USUD_LOCALHEAP: |
| 503 | return USER_HeapSel; |
| 504 | case USUD_FIRSTCLASS: |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 505 | FIXME_(local)("return a pointer to the first window class.\n"); |
Alexandre Julliard | a69b88b | 1998-03-15 20:29:56 +0000 | [diff] [blame] | 506 | return (DWORD)-1; |
| 507 | default: |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 508 | WARN_(local)("wReqType %04x (unknown)", wReqType); |
Alexandre Julliard | a69b88b | 1998-03-15 20:29:56 +0000 | [diff] [blame] | 509 | return (DWORD)-1; |
| 510 | } |
| 511 | } |
| 512 | |
Marcus Meissner | 9cfe2d5 | 1998-11-01 14:02:57 +0000 | [diff] [blame] | 513 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 514 | * GetSystemDebugState (USER.231) |
Alexandre Julliard | 4220b29 | 1999-07-11 17:20:01 +0000 | [diff] [blame] | 515 | */ |
| 516 | WORD WINAPI GetSystemDebugState16(void) |
| 517 | { |
| 518 | return 0; /* FIXME */ |
| 519 | } |
| 520 | |
| 521 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 522 | * RegisterLogonProcess (USER32.@) |
Marcus Meissner | 9cfe2d5 | 1998-11-01 14:02:57 +0000 | [diff] [blame] | 523 | */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 524 | DWORD WINAPI RegisterLogonProcess(HANDLE hprocess,BOOL x) { |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 525 | FIXME_(win32)("(%d,%d),stub!\n",hprocess,x); |
Marcus Meissner | 8143acc | 1998-10-31 12:19:56 +0000 | [diff] [blame] | 526 | return 1; |
| 527 | } |
| 528 | |
Marcus Meissner | 9cfe2d5 | 1998-11-01 14:02:57 +0000 | [diff] [blame] | 529 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 530 | * CreateWindowStationW (USER32.@) |
Marcus Meissner | 9cfe2d5 | 1998-11-01 14:02:57 +0000 | [diff] [blame] | 531 | */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 532 | HWINSTA WINAPI CreateWindowStationW( |
Marcus Meissner | 8143acc | 1998-10-31 12:19:56 +0000 | [diff] [blame] | 533 | LPWSTR winstation,DWORD res1,DWORD desiredaccess, |
| 534 | LPSECURITY_ATTRIBUTES lpsa |
| 535 | ) { |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 536 | FIXME_(win32)("(%s,0x%08lx,0x%08lx,%p),stub!\n",debugstr_w(winstation), |
Marcus Meissner | 8143acc | 1998-10-31 12:19:56 +0000 | [diff] [blame] | 537 | res1,desiredaccess,lpsa |
| 538 | ); |
François Gouget | 54300e5 | 2001-01-09 20:56:06 +0000 | [diff] [blame] | 539 | return (HWINSTA)0xdeadcafe; |
Marcus Meissner | 8143acc | 1998-10-31 12:19:56 +0000 | [diff] [blame] | 540 | } |
| 541 | |
Marcus Meissner | 9cfe2d5 | 1998-11-01 14:02:57 +0000 | [diff] [blame] | 542 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 543 | * SetProcessWindowStation (USER32.@) |
Marcus Meissner | 9cfe2d5 | 1998-11-01 14:02:57 +0000 | [diff] [blame] | 544 | */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 545 | BOOL WINAPI SetProcessWindowStation(HWINSTA hWinSta) { |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 546 | FIXME_(win32)("(%d),stub!\n",hWinSta); |
Marcus Meissner | 8143acc | 1998-10-31 12:19:56 +0000 | [diff] [blame] | 547 | return TRUE; |
| 548 | } |
| 549 | |
Marcus Meissner | 9cfe2d5 | 1998-11-01 14:02:57 +0000 | [diff] [blame] | 550 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 551 | * SetUserObjectSecurity (USER32.@) |
Marcus Meissner | 9cfe2d5 | 1998-11-01 14:02:57 +0000 | [diff] [blame] | 552 | */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 553 | BOOL WINAPI SetUserObjectSecurity( |
| 554 | HANDLE hObj, |
Francois Gouget | 326e2ba | 2000-06-18 17:26:44 +0000 | [diff] [blame] | 555 | PSECURITY_INFORMATION pSIRequested, |
Juergen Schmied | 1ed51af | 1999-02-12 17:47:07 +0000 | [diff] [blame] | 556 | PSECURITY_DESCRIPTOR pSID |
Marcus Meissner | 8143acc | 1998-10-31 12:19:56 +0000 | [diff] [blame] | 557 | ) { |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 558 | FIXME_(win32)("(0x%08x,%p,%p),stub!\n",hObj,pSIRequested,pSID); |
Marcus Meissner | 8143acc | 1998-10-31 12:19:56 +0000 | [diff] [blame] | 559 | return TRUE; |
| 560 | } |
| 561 | |
Marcus Meissner | 9cfe2d5 | 1998-11-01 14:02:57 +0000 | [diff] [blame] | 562 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 563 | * CreateDesktopA (USER32.@) |
Peter Ganten | ae3716d | 2000-07-15 15:13:56 +0000 | [diff] [blame] | 564 | */ |
| 565 | HDESK WINAPI CreateDesktopA( |
| 566 | LPSTR lpszDesktop,LPSTR lpszDevice,LPDEVMODEA pDevmode, |
| 567 | DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa |
| 568 | ) { |
| 569 | FIXME_(win32)("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n", |
| 570 | lpszDesktop,lpszDevice,pDevmode, |
| 571 | dwFlags,dwDesiredAccess,lpsa |
| 572 | ); |
François Gouget | d6515df | 2001-01-03 21:39:33 +0000 | [diff] [blame] | 573 | return (HDESK)0xcafedead; |
Peter Ganten | ae3716d | 2000-07-15 15:13:56 +0000 | [diff] [blame] | 574 | } |
| 575 | |
| 576 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 577 | * CreateDesktopW (USER32.@) |
Marcus Meissner | 9cfe2d5 | 1998-11-01 14:02:57 +0000 | [diff] [blame] | 578 | */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 579 | HDESK WINAPI CreateDesktopW( |
| 580 | LPWSTR lpszDesktop,LPWSTR lpszDevice,LPDEVMODEW pDevmode, |
Marcus Meissner | 8143acc | 1998-10-31 12:19:56 +0000 | [diff] [blame] | 581 | DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa |
| 582 | ) { |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 583 | FIXME_(win32)("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n", |
Marcus Meissner | 8143acc | 1998-10-31 12:19:56 +0000 | [diff] [blame] | 584 | debugstr_w(lpszDesktop),debugstr_w(lpszDevice),pDevmode, |
| 585 | dwFlags,dwDesiredAccess,lpsa |
| 586 | ); |
François Gouget | d6515df | 2001-01-03 21:39:33 +0000 | [diff] [blame] | 587 | return (HDESK)0xcafedead; |
Marcus Meissner | 8143acc | 1998-10-31 12:19:56 +0000 | [diff] [blame] | 588 | } |
| 589 | |
Patrik Stridvall | 2d6457c | 2000-03-28 20:22:59 +0000 | [diff] [blame] | 590 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 591 | * EnumDesktopWindows (USER32.@) |
Peter Ganten | ae3716d | 2000-07-15 15:13:56 +0000 | [diff] [blame] | 592 | */ |
| 593 | BOOL WINAPI EnumDesktopWindows( HDESK hDesktop, WNDENUMPROC lpfn, LPARAM lParam ) { |
| 594 | FIXME_(win32)("(0x%08x, %p, 0x%08lx), stub!\n", hDesktop, lpfn, lParam ); |
| 595 | return TRUE; |
| 596 | } |
| 597 | |
| 598 | |
| 599 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 600 | * CloseWindowStation (USER32.@) |
Patrik Stridvall | 2d6457c | 2000-03-28 20:22:59 +0000 | [diff] [blame] | 601 | */ |
Sergey Turchanov | 2f5a152 | 1999-04-10 16:48:46 +0000 | [diff] [blame] | 602 | BOOL WINAPI CloseWindowStation(HWINSTA hWinSta) |
| 603 | { |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 604 | FIXME_(win32)("(0x%08x)\n", hWinSta); |
Sergey Turchanov | 2f5a152 | 1999-04-10 16:48:46 +0000 | [diff] [blame] | 605 | return TRUE; |
| 606 | } |
Patrik Stridvall | 2d6457c | 2000-03-28 20:22:59 +0000 | [diff] [blame] | 607 | |
| 608 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 609 | * CloseDesktop (USER32.@) |
Patrik Stridvall | 2d6457c | 2000-03-28 20:22:59 +0000 | [diff] [blame] | 610 | */ |
Sergey Turchanov | 2f5a152 | 1999-04-10 16:48:46 +0000 | [diff] [blame] | 611 | BOOL WINAPI CloseDesktop(HDESK hDesk) |
| 612 | { |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 613 | FIXME_(win32)("(0x%08x)\n", hDesk); |
Sergey Turchanov | 2f5a152 | 1999-04-10 16:48:46 +0000 | [diff] [blame] | 614 | return TRUE; |
| 615 | } |
| 616 | |
Marcus Meissner | 9cfe2d5 | 1998-11-01 14:02:57 +0000 | [diff] [blame] | 617 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 618 | * SetWindowStationUser (USER32.@) |
Marcus Meissner | 9cfe2d5 | 1998-11-01 14:02:57 +0000 | [diff] [blame] | 619 | */ |
Marcus Meissner | 8143acc | 1998-10-31 12:19:56 +0000 | [diff] [blame] | 620 | DWORD WINAPI SetWindowStationUser(DWORD x1,DWORD x2) { |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 621 | FIXME_(win32)("(0x%08lx,0x%08lx),stub!\n",x1,x2); |
Marcus Meissner | 8143acc | 1998-10-31 12:19:56 +0000 | [diff] [blame] | 622 | return 1; |
| 623 | } |
Marcus Meissner | 9cfe2d5 | 1998-11-01 14:02:57 +0000 | [diff] [blame] | 624 | |
| 625 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 626 | * SetLogonNotifyWindow (USER32.@) |
Marcus Meissner | 9cfe2d5 | 1998-11-01 14:02:57 +0000 | [diff] [blame] | 627 | */ |
Alexandre Julliard | a396029 | 1999-02-26 11:11:13 +0000 | [diff] [blame] | 628 | DWORD WINAPI SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd) { |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 629 | FIXME_(win32)("(0x%x,%04x),stub!\n",hwinsta,hwnd); |
Marcus Meissner | 9cfe2d5 | 1998-11-01 14:02:57 +0000 | [diff] [blame] | 630 | return 1; |
| 631 | } |
| 632 | |
| 633 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 634 | * LoadLocalFonts (USER32.@) |
Marcus Meissner | 9cfe2d5 | 1998-11-01 14:02:57 +0000 | [diff] [blame] | 635 | */ |
| 636 | VOID WINAPI LoadLocalFonts(VOID) { |
| 637 | /* are loaded. */ |
| 638 | return; |
| 639 | } |
Juergen Schmied | 8090784 | 1998-11-24 20:26:02 +0000 | [diff] [blame] | 640 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 641 | * GetUserObjectInformationA (USER32.@) |
Juergen Schmied | 8090784 | 1998-11-24 20:26:02 +0000 | [diff] [blame] | 642 | */ |
Patrik Stridvall | 8276f69 | 1999-09-23 11:48:02 +0000 | [diff] [blame] | 643 | BOOL WINAPI GetUserObjectInformationA( HANDLE hObj, INT nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen ) |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 644 | { FIXME_(win32)("(0x%x %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen ); |
Juergen Schmied | 8090784 | 1998-11-24 20:26:02 +0000 | [diff] [blame] | 645 | return TRUE; |
| 646 | } |
| 647 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 648 | * GetUserObjectInformationW (USER32.@) |
Juergen Schmied | 8090784 | 1998-11-24 20:26:02 +0000 | [diff] [blame] | 649 | */ |
Patrik Stridvall | 8276f69 | 1999-09-23 11:48:02 +0000 | [diff] [blame] | 650 | BOOL WINAPI GetUserObjectInformationW( HANDLE hObj, INT nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen ) |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 651 | { FIXME_(win32)("(0x%x %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen ); |
Juergen Schmied | 8090784 | 1998-11-24 20:26:02 +0000 | [diff] [blame] | 652 | return TRUE; |
| 653 | } |
Juergen Schmied | 535f32f | 1999-01-31 09:20:36 +0000 | [diff] [blame] | 654 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 655 | * GetUserObjectSecurity (USER32.@) |
Juergen Schmied | 535f32f | 1999-01-31 09:20:36 +0000 | [diff] [blame] | 656 | */ |
Francois Gouget | 326e2ba | 2000-06-18 17:26:44 +0000 | [diff] [blame] | 657 | BOOL WINAPI GetUserObjectSecurity(HANDLE hObj, PSECURITY_INFORMATION pSIRequested, |
Juergen Schmied | 535f32f | 1999-01-31 09:20:36 +0000 | [diff] [blame] | 658 | PSECURITY_DESCRIPTOR pSID, DWORD nLength, LPDWORD lpnLengthNeeded) |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 659 | { FIXME_(win32)("(0x%x %p %p len=%ld %p),stub!\n", hObj, pSIRequested, pSID, nLength, lpnLengthNeeded); |
Juergen Schmied | 535f32f | 1999-01-31 09:20:36 +0000 | [diff] [blame] | 660 | return TRUE; |
| 661 | } |
Lionel Ulmer | 5f5b576 | 1999-03-28 13:42:12 +0000 | [diff] [blame] | 662 | |
| 663 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 664 | * SetSystemCursor (USER32.@) |
Lionel Ulmer | 5f5b576 | 1999-03-28 13:42:12 +0000 | [diff] [blame] | 665 | */ |
| 666 | BOOL WINAPI SetSystemCursor(HCURSOR hcur, DWORD id) |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 667 | { FIXME_(win32)("(%08x,%08lx),stub!\n", hcur, id); |
Lionel Ulmer | 5f5b576 | 1999-03-28 13:42:12 +0000 | [diff] [blame] | 668 | return TRUE; |
| 669 | } |
Bertho Stultiens | af50474 | 1999-04-11 12:04:33 +0000 | [diff] [blame] | 670 | |
| 671 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 672 | * RegisterSystemThread (USER32.@) |
Bertho Stultiens | af50474 | 1999-04-11 12:04:33 +0000 | [diff] [blame] | 673 | */ |
Marcus Meissner | f203ab6 | 1999-04-15 15:12:40 +0000 | [diff] [blame] | 674 | void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved) |
Bertho Stultiens | af50474 | 1999-04-11 12:04:33 +0000 | [diff] [blame] | 675 | { |
Alexandre Julliard | 06c275a | 1999-05-02 14:32:27 +0000 | [diff] [blame] | 676 | FIXME_(win32)("(%08lx, %08lx)\n", flags, reserved); |
Bertho Stultiens | af50474 | 1999-04-11 12:04:33 +0000 | [diff] [blame] | 677 | } |
Marcus Meissner | 521c0e4 | 2000-07-10 10:58:16 +0000 | [diff] [blame] | 678 | |
| 679 | /*********************************************************************** |
Patrik Stridvall | 2ece70e | 2000-12-22 01:38:01 +0000 | [diff] [blame] | 680 | * RegisterDeviceNotificationA (USER32.@) |
Marcus Meissner | 521c0e4 | 2000-07-10 10:58:16 +0000 | [diff] [blame] | 681 | */ |
| 682 | HDEVNOTIFY WINAPI RegisterDeviceNotificationA( |
| 683 | HANDLE hnd, LPVOID notifyfilter, DWORD flags |
| 684 | ) { |
| 685 | FIXME_(win32)("(hwnd=%08x, filter=%p,flags=0x%08lx), STUB!\n", |
| 686 | hnd,notifyfilter,flags |
| 687 | ); |
| 688 | return 0; |
| 689 | } |