kernel32/tests: Add a test for CreateFileA.
[wine] / dlls / user32 / misc.c
1 /*
2  * Misc USER functions
3  *
4  * Copyright 1995 Thomas Sandford
5  * Copyright 1997 Marcus Meissner
6  * Copyright 1998 Turchanov Sergey
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21  */
22
23 #include <stdarg.h>
24
25 #include "windef.h"
26 #include "wine/windef16.h"
27 #include "winbase.h"
28 #include "wingdi.h"
29 #include "winuser.h"
30 #include "winnls.h"
31 #include "winternl.h"
32 #include "user_private.h"
33
34 #include "wine/unicode.h"
35 #include "wine/debug.h"
36
37 WINE_DEFAULT_DEBUG_CHANNEL(win);
38
39 /* USER signal proc flags and codes */
40 /* See UserSignalProc for comments */
41 #define USIG_FLAGS_WIN32          0x0001
42 #define USIG_FLAGS_GUI            0x0002
43 #define USIG_FLAGS_FEEDBACK       0x0004
44 #define USIG_FLAGS_FAULT          0x0008
45
46 #define USIG_DLL_UNLOAD_WIN16     0x0001
47 #define USIG_DLL_UNLOAD_WIN32     0x0002
48 #define USIG_FAULT_DIALOG_PUSH    0x0003
49 #define USIG_FAULT_DIALOG_POP     0x0004
50 #define USIG_DLL_UNLOAD_ORPHANS   0x0005
51 #define USIG_THREAD_INIT          0x0010
52 #define USIG_THREAD_EXIT          0x0020
53 #define USIG_PROCESS_CREATE       0x0100
54 #define USIG_PROCESS_INIT         0x0200
55 #define USIG_PROCESS_EXIT         0x0300
56 #define USIG_PROCESS_DESTROY      0x0400
57 #define USIG_PROCESS_RUNNING      0x0500
58 #define USIG_PROCESS_LOADED       0x0600
59
60 /***********************************************************************
61  *              SignalProc32 (USER.391)
62  *              UserSignalProc (USER32.@)
63  *
64  * The exact meaning of the USER signals is undocumented, but this
65  * should cover the basic idea:
66  *
67  * USIG_DLL_UNLOAD_WIN16
68  *     This is sent when a 16-bit module is unloaded.
69  *
70  * USIG_DLL_UNLOAD_WIN32
71  *     This is sent when a 32-bit module is unloaded.
72  *
73  * USIG_DLL_UNLOAD_ORPHANS
74  *     This is sent after the last Win3.1 module is unloaded,
75  *     to allow removal of orphaned menus.
76  *
77  * USIG_FAULT_DIALOG_PUSH
78  * USIG_FAULT_DIALOG_POP
79  *     These are called to allow USER to prepare for displaying a
80  *     fault dialog, even though the fault might have happened while
81  *     inside a USER critical section.
82  *
83  * USIG_THREAD_INIT
84  *     This is called from the context of a new thread, as soon as it
85  *     has started to run.
86  *
87  * USIG_THREAD_EXIT
88  *     This is called, still in its context, just before a thread is
89  *     about to terminate.
90  *
91  * USIG_PROCESS_CREATE
92  *     This is called, in the parent process context, after a new process
93  *     has been created.
94  *
95  * USIG_PROCESS_INIT
96  *     This is called in the new process context, just after the main thread
97  *     has started execution (after the main thread's USIG_THREAD_INIT has
98  *     been sent).
99  *
100  * USIG_PROCESS_LOADED
101  *     This is called after the executable file has been loaded into the
102  *     new process context.
103  *
104  * USIG_PROCESS_RUNNING
105  *     This is called immediately before the main entry point is called.
106  *
107  * USIG_PROCESS_EXIT
108  *     This is called in the context of a process that is about to
109  *     terminate (but before the last thread's USIG_THREAD_EXIT has
110  *     been sent).
111  *
112  * USIG_PROCESS_DESTROY
113  *     This is called after a process has terminated.
114  *
115  *
116  * The meaning of the dwFlags bits is as follows:
117  *
118  * USIG_FLAGS_WIN32
119  *     Current process is 32-bit.
120  *
121  * USIG_FLAGS_GUI
122  *     Current process is a (Win32) GUI process.
123  *
124  * USIG_FLAGS_FEEDBACK
125  *     Current process needs 'feedback' (determined from the STARTUPINFO
126  *     flags STARTF_FORCEONFEEDBACK / STARTF_FORCEOFFFEEDBACK).
127  *
128  * USIG_FLAGS_FAULT
129  *     The signal is being sent due to a fault.
130  */
131 WORD WINAPI UserSignalProc( UINT uCode, DWORD dwThreadOrProcessID,
132                             DWORD dwFlags, HMODULE16 hModule )
133 {
134     FIXME("(%04x, %08x, %04x, %04x)\n",
135           uCode, dwThreadOrProcessID, dwFlags, hModule );
136     /* FIXME: Should chain to GdiSignalProc now. */
137     return 0;
138 }
139
140
141 /**********************************************************************
142  * SetLastErrorEx [USER32.@]
143  *
144  * Sets the last-error code.
145  *
146  * RETURNS
147  *    None.
148  */
149 void WINAPI SetLastErrorEx(
150     DWORD error, /* [in] Per-thread error code */
151     DWORD type)  /* [in] Error type */
152 {
153     TRACE("(0x%08x, 0x%08x)\n", error,type);
154     switch(type) {
155         case 0:
156             break;
157         case SLE_ERROR:
158         case SLE_MINORERROR:
159         case SLE_WARNING:
160             /* Fall through for now */
161         default:
162             FIXME("(error=%08x, type=%08x): Unhandled type\n", error,type);
163             break;
164     }
165     SetLastError( error );
166 }
167
168 /******************************************************************************
169  * GetAltTabInfoA [USER32.@]
170  */
171 BOOL WINAPI GetAltTabInfoA(HWND hwnd, int iItem, PALTTABINFO pati, LPSTR pszItemText, UINT cchItemText)
172 {
173     FIXME("(%p, 0x%08x, %p, %p, 0x%08x)\n", hwnd, iItem, pati, pszItemText, cchItemText);
174     return FALSE;
175 }
176
177 /******************************************************************************
178  * GetAltTabInfoW [USER32.@]
179  */
180 BOOL WINAPI GetAltTabInfoW(HWND hwnd, int iItem, PALTTABINFO pati, LPWSTR pszItemText, UINT cchItemText)
181 {
182     FIXME("(%p, 0x%08x, %p, %p, 0x%08x)\n", hwnd, iItem, pati, pszItemText, cchItemText);
183     return FALSE;
184 }
185
186 /******************************************************************************
187  * SetDebugErrorLevel [USER32.@]
188  * Sets the minimum error level for generating debugging events
189  *
190  * PARAMS
191  *    dwLevel [I] Debugging error level
192  *
193  * RETURNS
194  *    Nothing.
195  */
196 VOID WINAPI SetDebugErrorLevel( DWORD dwLevel )
197 {
198     FIXME("(%d): stub\n", dwLevel);
199 }
200
201
202 /******************************************************************************
203  *                    GetProcessDefaultLayout [USER32.@]
204  *
205  * Gets the default layout for parentless windows.
206  * Right now, just returns 0 (left-to-right).
207  *
208  * RETURNS
209  *    Success: Nonzero
210  *    Failure: Zero
211  *
212  * BUGS
213  *    No RTL
214  */
215 BOOL WINAPI GetProcessDefaultLayout( DWORD *pdwDefaultLayout )
216 {
217     if ( !pdwDefaultLayout ) {
218         SetLastError( ERROR_INVALID_PARAMETER );
219         return FALSE;
220      }
221     FIXME( "( %p ): No BiDi\n", pdwDefaultLayout );
222     *pdwDefaultLayout = 0;
223     return TRUE;
224 }
225
226
227 /******************************************************************************
228  *                    SetProcessDefaultLayout [USER32.@]
229  *
230  * Sets the default layout for parentless windows.
231  * Right now, only accepts 0 (left-to-right).
232  *
233  * RETURNS
234  *    Success: Nonzero
235  *    Failure: Zero
236  *
237  * BUGS
238  *    No RTL
239  */
240 BOOL WINAPI SetProcessDefaultLayout( DWORD dwDefaultLayout )
241 {
242     if ( dwDefaultLayout == 0 )
243         return TRUE;
244     FIXME( "( %08x ): No BiDi\n", dwDefaultLayout );
245     SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
246     return FALSE;
247 }
248
249
250 /***********************************************************************
251  *              SetWindowStationUser (USER32.@)
252  */
253 DWORD WINAPI SetWindowStationUser(DWORD x1,DWORD x2)
254 {
255     FIXME("(0x%08x,0x%08x),stub!\n",x1,x2);
256     return 1;
257 }
258
259 /***********************************************************************
260  *              RegisterLogonProcess (USER32.@)
261  */
262 DWORD WINAPI RegisterLogonProcess(HANDLE hprocess,BOOL x)
263 {
264     FIXME("(%p,%d),stub!\n",hprocess,x);
265     return 1;
266 }
267
268 /***********************************************************************
269  *              SetLogonNotifyWindow (USER32.@)
270  */
271 DWORD WINAPI SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd)
272 {
273     FIXME("(%p,%p),stub!\n",hwinsta,hwnd);
274     return 1;
275 }
276
277 static const WCHAR primary_device_name[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y','1',0};
278 static const WCHAR primary_device_string[] = {'X','1','1',' ','W','i','n','d','o','w','i','n','g',' ',
279                                               'S','y','s','t','e','m',0};
280 static const WCHAR primary_device_deviceid[] = {'P','C','I','\\','V','E','N','_','0','0','0','0','&',
281                                                 'D','E','V','_','0','0','0','0',0};
282
283 /***********************************************************************
284  *              EnumDisplayDevicesA (USER32.@)
285  */
286 BOOL WINAPI EnumDisplayDevicesA( LPCSTR lpDevice, DWORD i, LPDISPLAY_DEVICEA lpDispDev,
287                                  DWORD dwFlags )
288 {
289     UNICODE_STRING deviceW;
290     DISPLAY_DEVICEW ddW;
291     BOOL ret;
292
293     if(lpDevice)
294         RtlCreateUnicodeStringFromAsciiz(&deviceW, lpDevice); 
295     else
296         deviceW.Buffer = NULL;
297
298     ddW.cb = sizeof(ddW);
299     ret = EnumDisplayDevicesW(deviceW.Buffer, i, &ddW, dwFlags);
300     RtlFreeUnicodeString(&deviceW);
301
302     if(!ret) return ret;
303
304     WideCharToMultiByte(CP_ACP, 0, ddW.DeviceName, -1, lpDispDev->DeviceName, sizeof(lpDispDev->DeviceName), NULL, NULL);
305     WideCharToMultiByte(CP_ACP, 0, ddW.DeviceString, -1, lpDispDev->DeviceString, sizeof(lpDispDev->DeviceString), NULL, NULL);
306     lpDispDev->StateFlags = ddW.StateFlags;
307
308     if(lpDispDev->cb >= offsetof(DISPLAY_DEVICEA, DeviceID) + sizeof(lpDispDev->DeviceID))
309         WideCharToMultiByte(CP_ACP, 0, ddW.DeviceID, -1, lpDispDev->DeviceID, sizeof(lpDispDev->DeviceID), NULL, NULL);
310     if(lpDispDev->cb >= offsetof(DISPLAY_DEVICEA, DeviceKey) + sizeof(lpDispDev->DeviceKey))
311         WideCharToMultiByte(CP_ACP, 0, ddW.DeviceKey, -1, lpDispDev->DeviceKey, sizeof(lpDispDev->DeviceKey), NULL, NULL);
312
313     return TRUE;
314 }
315
316 /***********************************************************************
317  *              EnumDisplayDevicesW (USER32.@)
318  */
319 BOOL WINAPI EnumDisplayDevicesW( LPCWSTR lpDevice, DWORD i, LPDISPLAY_DEVICEW lpDisplayDevice,
320                                  DWORD dwFlags )
321 {
322     FIXME("(%s,%d,%p,0x%08x), stub!\n",debugstr_w(lpDevice),i,lpDisplayDevice,dwFlags);
323
324     if (i)
325         return FALSE;
326
327     memcpy(lpDisplayDevice->DeviceName, primary_device_name, sizeof(primary_device_name));
328     memcpy(lpDisplayDevice->DeviceString, primary_device_string, sizeof(primary_device_string));
329   
330     lpDisplayDevice->StateFlags =
331         DISPLAY_DEVICE_ATTACHED_TO_DESKTOP |
332         DISPLAY_DEVICE_PRIMARY_DEVICE |
333         DISPLAY_DEVICE_VGA_COMPATIBLE;
334
335     if(lpDisplayDevice->cb >= offsetof(DISPLAY_DEVICEW, DeviceID) + sizeof(lpDisplayDevice->DeviceID))
336         memcpy(lpDisplayDevice->DeviceID, primary_device_deviceid, sizeof(primary_device_deviceid));
337     if(lpDisplayDevice->cb >= offsetof(DISPLAY_DEVICEW, DeviceKey) + sizeof(lpDisplayDevice->DeviceKey))
338         lpDisplayDevice->DeviceKey[0] = 0;
339
340     return TRUE;
341 }
342
343 struct monitor_enum_info
344 {
345     RECT     rect;
346     UINT     max_area;
347     UINT     min_distance;
348     HMONITOR primary;
349     HMONITOR nearest;
350     HMONITOR ret;
351 };
352
353 /* helper callback for MonitorFromRect */
354 static BOOL CALLBACK monitor_enum( HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM lp )
355 {
356     struct monitor_enum_info *info = (struct monitor_enum_info *)lp;
357     RECT intersect;
358
359     if (IntersectRect( &intersect, rect, &info->rect ))
360     {
361         /* check for larger intersecting area */
362         UINT area = (intersect.right - intersect.left) * (intersect.bottom - intersect.top);
363         if (area > info->max_area)
364         {
365             info->max_area = area;
366             info->ret = monitor;
367         }
368     }
369     else if (!info->max_area)  /* if not intersecting, check for min distance */
370     {
371         UINT distance;
372         INT x, y;
373
374         if (rect->left >= info->rect.right) x = info->rect.right - rect->left;
375         else x = rect->right - info->rect.left;
376         if (rect->top >= info->rect.bottom) y = info->rect.bottom - rect->top;
377         else y = rect->bottom - info->rect.top;
378         distance = x * x + y * y;
379         if (distance < info->min_distance)
380         {
381             info->min_distance = distance;
382             info->nearest = monitor;
383         }
384     }
385     if (!info->primary)
386     {
387         MONITORINFO mon_info;
388         mon_info.cbSize = sizeof(mon_info);
389         GetMonitorInfoW( monitor, &mon_info );
390         if (mon_info.dwFlags & MONITORINFOF_PRIMARY) info->primary = monitor;
391     }
392     return TRUE;
393 }
394
395 /***********************************************************************
396  *              MonitorFromRect (USER32.@)
397  */
398 HMONITOR WINAPI MonitorFromRect( LPRECT rect, DWORD flags )
399 {
400     struct monitor_enum_info info;
401
402     /* make sure the desktop window exists */
403     GetDesktopWindow();
404
405     info.rect         = *rect;
406     info.max_area     = 0;
407     info.min_distance = ~0u;
408     info.primary      = 0;
409     info.nearest      = 0;
410     info.ret          = 0;
411     if (!EnumDisplayMonitors( 0, NULL, monitor_enum, (LPARAM)&info )) return 0;
412     if (!info.ret)
413     {
414         if (flags & MONITOR_DEFAULTTOPRIMARY) info.ret = info.primary;
415         else if (flags & MONITOR_DEFAULTTONEAREST) info.ret = info.nearest;
416     }
417
418     TRACE( "%s flags %x returning %p\n", wine_dbgstr_rect(rect), flags, info.ret );
419     return info.ret;
420 }
421
422 /***********************************************************************
423  *              MonitorFromPoint (USER32.@)
424  */
425 HMONITOR WINAPI MonitorFromPoint( POINT pt, DWORD flags )
426 {
427     RECT rect;
428
429     SetRect( &rect, pt.x, pt.y, pt.x + 1, pt.y + 1 );
430     return MonitorFromRect( &rect, flags );
431 }
432
433 /***********************************************************************
434  *              MonitorFromWindow (USER32.@)
435  */
436 HMONITOR WINAPI MonitorFromWindow(HWND hWnd, DWORD dwFlags)
437 {
438     RECT rect;
439     WINDOWPLACEMENT wp;
440
441     TRACE("(%p, 0x%08x)\n", hWnd, dwFlags);
442
443     if (IsIconic(hWnd) && GetWindowPlacement(hWnd, &wp))
444         return MonitorFromRect( &wp.rcNormalPosition, dwFlags );
445
446     if (GetWindowRect( hWnd, &rect ))
447         return MonitorFromRect( &rect, dwFlags );
448
449     if (!(dwFlags & (MONITOR_DEFAULTTOPRIMARY|MONITOR_DEFAULTTONEAREST))) return 0;
450     /* retrieve the primary */
451     SetRect( &rect, 0, 0, 1, 1 );
452     return MonitorFromRect( &rect, dwFlags );
453 }
454
455 /***********************************************************************
456  *              GetMonitorInfoA (USER32.@)
457  */
458 BOOL WINAPI GetMonitorInfoA(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo)
459 {
460     MONITORINFOEXW miW;
461     MONITORINFOEXA *miA = (MONITORINFOEXA*)lpMonitorInfo;
462     BOOL ret;
463
464     miW.cbSize = sizeof(miW);
465
466     ret = GetMonitorInfoW(hMonitor, (MONITORINFO*)&miW);
467     if(!ret) return ret;
468
469     miA->rcMonitor = miW.rcMonitor;
470     miA->rcWork = miW.rcWork;
471     miA->dwFlags = miW.dwFlags;
472     if(miA->cbSize >= offsetof(MONITORINFOEXA, szDevice) + sizeof(miA->szDevice))
473         WideCharToMultiByte(CP_ACP, 0, miW.szDevice, -1, miA->szDevice, sizeof(miA->szDevice), NULL, NULL);
474     return ret;
475 }
476
477 /***********************************************************************
478  *              GetMonitorInfoW (USER32.@)
479  */
480 BOOL WINAPI GetMonitorInfoW(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo)
481 {
482     BOOL ret = USER_Driver->pGetMonitorInfo( hMonitor, lpMonitorInfo );
483     if (ret)
484         TRACE("flags %04x, monitor %s, work %s\n", lpMonitorInfo->dwFlags,
485               wine_dbgstr_rect(&lpMonitorInfo->rcMonitor),
486               wine_dbgstr_rect(&lpMonitorInfo->rcWork));
487     return ret;
488 }
489
490 /***********************************************************************
491  *              EnumDisplayMonitors (USER32.@)
492  */
493 BOOL WINAPI EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp )
494 {
495     return USER_Driver->pEnumDisplayMonitors( hdc, rect, proc, lp );
496 }
497
498 /***********************************************************************
499  *              RegisterSystemThread (USER32.@)
500  */
501 void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved)
502 {
503     FIXME("(%08x, %08x)\n", flags, reserved);
504 }
505
506 /***********************************************************************
507  *           RegisterShellHookWindow                    [USER32.@]
508  */
509 BOOL WINAPI RegisterShellHookWindow ( HWND hWnd )
510 {
511     FIXME("(%p): stub\n", hWnd);
512     return 0;
513 }
514
515
516 /***********************************************************************
517  *           DeregisterShellHookWindow                  [USER32.@]
518  */
519 HRESULT WINAPI DeregisterShellHookWindow ( DWORD u )
520 {
521     FIXME("0x%08x stub\n",u);
522     return 0;
523
524 }
525
526
527 /***********************************************************************
528  *           RegisterTasklist                           [USER32.@]
529  */
530 DWORD WINAPI RegisterTasklist (DWORD x)
531 {
532     FIXME("0x%08x\n",x);
533     return TRUE;
534 }
535
536
537 /***********************************************************************
538  *              RegisterDeviceNotificationA (USER32.@)
539  *
540  * See RegisterDeviceNotificationW.
541  */
542 HDEVNOTIFY WINAPI RegisterDeviceNotificationA(HANDLE hnd, LPVOID notifyfilter, DWORD flags)
543 {
544     FIXME("(hwnd=%p, filter=%p,flags=0x%08x) returns a fake device notification handle!\n",
545           hnd,notifyfilter,flags );
546     return (HDEVNOTIFY) 0xcafecafe;
547 }
548
549 /***********************************************************************
550  *              RegisterDeviceNotificationW (USER32.@)
551  *
552  * Registers a window with the system so that it will receive
553  * notifications about a device.
554  *
555  * PARAMS
556  *     hRecepient           [I] Window or service status handle that
557  *                              will receive notifications.
558  *     pNotificationFilter  [I] DEV_BROADCAST_HDR followed by some
559  *                              type-specific data.
560  *     dwFlags              [I] See notes
561  *
562  * RETURNS
563  *
564  * A handle to the device notification.
565  *
566  * NOTES
567  *
568  * The dwFlags parameter can be one of two values:
569  *| DEVICE_NOTIFY_WINDOW_HANDLE  - hRecepient is a window handle
570  *| DEVICE_NOTIFY_SERVICE_HANDLE - hRecepient is a service status handle
571  */
572 HDEVNOTIFY WINAPI RegisterDeviceNotificationW(HANDLE hRecepient, LPVOID pNotificationFilter, DWORD dwFlags)
573 {
574     FIXME("(hwnd=%p, filter=%p,flags=0x%08x) returns a fake device notification handle!\n",
575           hRecepient,pNotificationFilter,dwFlags );
576     return (HDEVNOTIFY) 0xcafeaffe;
577 }
578
579 /***********************************************************************
580  *              UnregisterDeviceNotification (USER32.@)
581  *
582  */
583 BOOL  WINAPI UnregisterDeviceNotification(HDEVNOTIFY hnd)
584 {
585     FIXME("(handle=%p), STUB!\n", hnd);
586     return TRUE;
587 }
588
589 /***********************************************************************
590  *           GetAppCompatFlags   (USER32.@)
591  */
592 DWORD WINAPI GetAppCompatFlags( HTASK hTask )
593 {
594     FIXME("(%p) stub\n", hTask);
595     return 0;
596 }
597
598 /***********************************************************************
599  *           GetAppCompatFlags2   (USER32.@)
600  */
601 DWORD WINAPI GetAppCompatFlags2( HTASK hTask )
602 {
603     FIXME("(%p) stub\n", hTask);
604     return 0;
605 }
606
607
608 /***********************************************************************
609  *           AlignRects   (USER32.@)
610  */
611 BOOL WINAPI AlignRects(LPRECT rect, DWORD b, DWORD c, DWORD d)
612 {
613     FIXME("(%p, %d, %d, %d): stub\n", rect, b, c, d);
614     if (rect)
615         FIXME("rect: [[%d, %d], [%d, %d]]\n", rect->left, rect->top, rect->right, rect->bottom);
616     /* Calls OffsetRect */
617     return FALSE;
618 }
619
620
621 /***********************************************************************
622  *              LoadLocalFonts (USER32.@)
623  */
624 VOID WINAPI LoadLocalFonts(VOID)
625 {
626     /* are loaded. */
627     return;
628 }
629
630
631 /***********************************************************************
632  *              User32InitializeImmEntryTable
633  */
634 BOOL WINAPI User32InitializeImmEntryTable(LPVOID ptr)
635 {
636   FIXME("(%p): stub\n", ptr);
637   return TRUE;
638 }
639
640 /**********************************************************************
641  * WINNLSGetIMEHotkey [USER32.@]
642  *
643  */
644 UINT WINAPI WINNLSGetIMEHotkey(HWND hUnknown1)
645 {
646     FIXME("hUnknown1 %p: stub!\n", hUnknown1);
647     return 0; /* unknown */
648 }
649
650 /**********************************************************************
651  * WINNLSEnableIME [USER32.@]
652  *
653  */
654 BOOL WINAPI WINNLSEnableIME(HWND hUnknown1, BOOL bUnknown2)
655 {
656     FIXME("hUnknown1 %p bUnknown2 %d: stub!\n", hUnknown1, bUnknown2);
657     return TRUE; /* success (?) */
658 }
659
660 /**********************************************************************
661  * WINNLSGetEnableStatus [USER32.@]
662  *
663  */
664 BOOL WINAPI WINNLSGetEnableStatus(HWND hUnknown1)
665 {
666     FIXME("hUnknown1 %p: stub!\n", hUnknown1);
667     return TRUE; /* success (?) */
668 }
669
670 /**********************************************************************
671  * SendIMEMessageExA [USER32.@]
672  *
673  */
674 LRESULT WINAPI SendIMEMessageExA(HWND p1, LPARAM p2)
675 {
676   FIXME("(%p,%lx): stub\n", p1, p2);
677   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
678   return 0;
679 }
680
681 /**********************************************************************
682  * SendIMEMessageExW [USER32.@]
683  *
684  */
685 LRESULT WINAPI SendIMEMessageExW(HWND p1, LPARAM p2)
686 {
687   FIXME("(%p,%lx): stub\n", p1, p2);
688   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
689   return 0;
690 }
691
692 /**********************************************************************
693  * DisableProcessWindowsGhosting [USER32.@]
694  *
695  */
696 VOID WINAPI DisableProcessWindowsGhosting(VOID)
697 {
698   FIXME(": stub\n");
699   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
700   return;
701 }