Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

user32.cpp

Go to the documentation of this file.
00001 /* $Id: user32.cpp,v 1.118 2001/12/26 19:05:35 achimha Exp $ */
00002 
00003 /*
00004  * Win32 misc user32 API functions for OS/2
00005  *
00006  * Copyright 1998 Sander van Leeuwen
00007  * Copyright 1998 Patrick Haller
00008  * Copyright 1998 Peter Fitzsimmons
00009  * Copyright 1999 Christoph Bratschi
00010  * Copyright 1999 Daniela Engert (dani@ngrt.de)
00011  *
00012  * Partly based on Wine code (windows\sysparams.c: SystemParametersInfoA)
00013  *
00014  * Copyright 1994 Alexandre Julliard
00015  *
00016  *
00017  * Project Odin Software License can be found in LICENSE.TXT
00018  *
00019  */
00020 /*****************************************************************************
00021  * Name      : USER32.CPP
00022  * Purpose   : This module maps all Win32 functions contained in USER32.DLL
00023  *             to their OS/2-specific counterparts as far as possible.
00024  *****************************************************************************/
00025 
00026 //Attention: many functions belong to other subsystems, move them to their
00027 //           right place!
00028 
00029 #include <odin.h>
00030 #include <odinwrap.h>
00031 #include <os2sel.h>
00032 
00033 #include <os2win.h>
00034 #include <misc.h>
00035 #include <winuser32.h>
00036 
00037 #include "user32.h"
00038 #include <winicon.h>
00039 #include "syscolor.h"
00040 #include "pmwindow.h"
00041 #include "oslibgdi.h"
00042 #include "oslibwin.h"
00043 #include "oslibprf.h"
00044 
00045 #include <wchar.h>
00046 #include <stdlib.h>
00047 #include <string.h>
00048 //#include <oslibwin.h>
00049 #include <win32wnd.h>
00050 #include <winuser.h>
00051 #include "initterm.h"
00052 
00053 #define DBG_LOCALLOG    DBG_user32
00054 #include "dbglocal.h"
00055 
00056 //undocumented stuff
00057 // WIN32API ClientThreadConnect
00058 // WIN32API DragObject
00059 // WIN32API DrawFrame
00060 // WIN32API EditWndProc
00061 // WIN32API EndTask
00062 // WIN32API GetInputDesktop
00063 // WIN32API GetNextQueueWindow
00064 // WIN32API GetShellWindow
00065 // WIN32API InitSharedTable
00066 // WIN32API InitTask
00067 // WIN32API IsHungThread
00068 // WIN32API LockWindowStation
00069 // WIN32API ModifyAccess
00070 // WIN32API PlaySoundEvent
00071 // WIN32API RegisterLogonProcess
00072 // WIN32API RegisterNetworkCapabilities
00073 // WIN32API RegisterSystemThread
00074 // WIN32API SetDeskWallpaper
00075 // WIN32API SetDesktopBitmap
00076 // WIN32API SetInternalWindowPos
00077 // WIN32API SetLogonNotifyWindow
00078 // WIN32API SetShellWindow
00079 // WIN32API SetSysColorsTemp
00080 // WIN32API SetWindowFullScreenState
00081 // WIN32API SwitchToThisWindow
00082 // WIN32API SysErrorBox
00083 // WIN32API UnlockWindowStation
00084 // WIN32API UserClientDllInitialize
00085 // WIN32API UserSignalProc
00086 // WIN32API WinOldAppHackoMatic
00087 // WIN32API WNDPROC_CALLBACK
00088 // WIN32API YieldTask
00089 
00090 ODINDEBUGCHANNEL(USER32-USER32)
00091 
00092 
00093 /* Coordinate Transformation */
00094 
00095 /* Rectangle Functions - parts from wine/windows/rect.c */
00096 
00097 BOOL WIN32API CopyRect( PRECT lprcDst, const RECT * lprcSrc)
00098 {
00099     dprintf2(("USER32:  CopyRect\n"));
00100     if (!lprcDst || !lprcSrc) {
00101         SetLastError(ERROR_INVALID_PARAMETER);
00102         return FALSE;
00103     }
00104 
00105     memcpy(lprcDst,lprcSrc,sizeof(RECT));
00106 
00107     return TRUE;
00108 }
00109 //******************************************************************************
00110 //******************************************************************************
00111 BOOL WIN32API EqualRect( const RECT *lprc1, const RECT *lprc2)
00112 {
00113     dprintf2(("USER32:  EqualRect\n"));
00114     if (!lprc1 || !lprc2)
00115     {
00116       SetLastError(ERROR_INVALID_PARAMETER);
00117       return FALSE;
00118     }
00119 
00120     return (lprc1->left == lprc2->left &&
00121             lprc1->right == lprc2->right &&
00122             lprc1->top == lprc2->top &&
00123             lprc1->bottom == lprc2->bottom);
00124 }
00125 //******************************************************************************
00126 //******************************************************************************
00127 BOOL WIN32API InflateRect( PRECT lprc, int dx, int  dy)
00128 {
00129     dprintf2(("USER32: InflateRect (%d,%d)(%d,%d) %d,%d", lprc->left, lprc->top, lprc->right, lprc->bottom, dx, dy));
00130     if (!lprc)
00131     {
00132       SetLastError(ERROR_INVALID_PARAMETER);
00133       return FALSE;
00134     }
00135 
00136     lprc->left   -= dx;
00137     lprc->right  += dx;
00138     lprc->top    -= dy;
00139     lprc->bottom += dy;
00140 
00141     return TRUE;
00142 }
00143 //******************************************************************************
00144 //******************************************************************************
00145 BOOL WIN32API IntersectRect( PRECT lprcDst, const RECT * lprcSrc1, const RECT * lprcSrc2)
00146 {
00147     dprintf2(("USER32:  IntersectRect (%d,%d)(%d,%d) (%d,%d)(%d,%d)", lprcSrc1->left, lprcSrc1->top, lprcSrc1->right, lprcSrc1->bottom, lprcSrc2->left, lprcSrc2->top, lprcSrc2->right, lprcSrc2->bottom));
00148     if (!lprcSrc1 || !lprcSrc2)
00149     {
00150         SetLastError(ERROR_INVALID_PARAMETER);
00151         return FALSE;
00152     }
00153 
00154     if (IsRectEmpty(lprcSrc1) || IsRectEmpty(lprcSrc2) ||
00155        (lprcSrc1->left >= lprcSrc2->right) || (lprcSrc2->left >= lprcSrc1->right) ||
00156        (lprcSrc1->top >= lprcSrc2->bottom) || (lprcSrc2->top >= lprcSrc1->bottom))
00157     {
00158         //SvL: NT doesn't set the last error here
00159         //SetLastError(ERROR_INVALID_PARAMETER);
00160         if (lprcDst) SetRectEmpty(lprcDst);
00161         return FALSE;
00162     }
00163     if (lprcDst)
00164     {
00165       lprcDst->left   = MAX(lprcSrc1->left,lprcSrc2->left);
00166       lprcDst->right  = MIN(lprcSrc1->right,lprcSrc2->right);
00167       lprcDst->top    = MAX(lprcSrc1->top,lprcSrc2->top);
00168       lprcDst->bottom = MIN(lprcSrc1->bottom,lprcSrc2->bottom);
00169     }
00170 
00171     return TRUE;
00172 }
00173 //******************************************************************************
00174 //******************************************************************************
00175 BOOL WIN32API IsRectEmpty( const RECT * lprc)
00176 {
00177     if (!lprc)
00178     {
00179       SetLastError(ERROR_INVALID_PARAMETER);
00180       return FALSE;
00181     }
00182 
00183     return (lprc->left == lprc->right || lprc->top == lprc->bottom);
00184 }
00185 //******************************************************************************
00186 //******************************************************************************
00187 BOOL WIN32API OffsetRect( PRECT lprc, int x, int  y)
00188 {
00189     dprintf2(("USER32: OffsetRect (%d,%d)(%d,%d) %d %d", lprc->left, lprc->top, lprc->right, lprc->bottom, x, y));
00190     if (!lprc)
00191     {
00192         SetLastError(ERROR_INVALID_PARAMETER);
00193         return FALSE;
00194     }
00195 
00196     lprc->left   += x;
00197     lprc->right  += x;
00198     lprc->top    += y;
00199     lprc->bottom += y;
00200 
00201     return TRUE;
00202 }
00203 //******************************************************************************
00204 //******************************************************************************
00205 BOOL WIN32API PtInRect( const RECT *lprc, POINT pt)
00206 {
00207     dprintf2(("USER32: PtInRect (%d,%d)(%d,%d) (%d,%d)", lprc->left, lprc->top, lprc->right, lprc->bottom, pt.x, pt.y));
00208     if (!lprc)
00209     {
00210       SetLastError(ERROR_INVALID_PARAMETER);
00211       return FALSE;
00212     }
00213 
00214     return (pt.x >= lprc->left &&
00215             pt.x < lprc->right &&
00216             pt.y >= lprc->top &&
00217             pt.y < lprc->bottom);
00218 }
00219 //******************************************************************************
00220 //******************************************************************************
00221 BOOL WIN32API SetRect( PRECT lprc, int nLeft, int nTop, int nRight, int  nBottom)
00222 {
00223     if (!lprc)
00224     {
00225       SetLastError(ERROR_INVALID_PARAMETER);
00226       return FALSE;
00227     }
00228 
00229     lprc->left   = nLeft;
00230     lprc->top    = nTop;
00231     lprc->right  = nRight;
00232     lprc->bottom = nBottom;
00233 
00234     return TRUE;
00235 }
00236 //******************************************************************************
00237 //******************************************************************************
00238 BOOL WIN32API SetRectEmpty( PRECT lprc)
00239 {
00240     if (!lprc)
00241     {
00242       SetLastError(ERROR_INVALID_PARAMETER);
00243       return FALSE;
00244     }
00245 
00246     lprc->left = lprc->right = lprc->top = lprc->bottom = 0;
00247 
00248     return TRUE;
00249 }
00250 //******************************************************************************
00251 //******************************************************************************
00252 BOOL WIN32API SubtractRect( PRECT lprcDest, const RECT * lprcSrc1, const RECT * lprcSrc2)
00253 {
00254     dprintf2(("USER32:  SubtractRect"));
00255     RECT tmp;
00256 
00257     if (!lprcDest || !lprcSrc1 || !lprcSrc2)
00258     {
00259       SetLastError(ERROR_INVALID_PARAMETER);
00260       return FALSE;
00261     }
00262 
00263     if (IsRectEmpty(lprcSrc1))
00264     {
00265       SetLastError(ERROR_INVALID_PARAMETER);
00266       SetRectEmpty(lprcDest);
00267       return FALSE;
00268     }
00269     *lprcDest = *lprcSrc1;
00270     if (IntersectRect(&tmp,lprcSrc1,lprcSrc2))
00271     {
00272       if (EqualRect(&tmp,lprcDest))
00273       {
00274         SetRectEmpty(lprcDest);
00275         return FALSE;
00276       }
00277       if ((tmp.top == lprcDest->top) && (tmp.bottom == lprcDest->bottom))
00278       {
00279         if (tmp.left == lprcDest->left) lprcDest->left = tmp.right;
00280         else if (tmp.right == lprcDest->right) lprcDest->right = tmp.left;
00281       }
00282       else if ((tmp.left == lprcDest->left) && (tmp.right == lprcDest->right))
00283       {
00284         if (tmp.top == lprcDest->top) lprcDest->top = tmp.bottom;
00285         else if (tmp.bottom == lprcDest->bottom) lprcDest->bottom = tmp.top;
00286       }
00287     }
00288 
00289     return TRUE;
00290 }
00291 //******************************************************************************
00292 //******************************************************************************
00293 BOOL WIN32API UnionRect( PRECT lprcDst, const RECT *lprcSrc1, const RECT *lprcSrc2)
00294 {
00295     dprintf2(("USER32:  UnionRect\n"));
00296     if (!lprcDst || !lprcSrc1 || !lprcSrc2)
00297     {
00298       SetLastError(ERROR_INVALID_PARAMETER);
00299       return FALSE;
00300     }
00301 
00302     if (IsRectEmpty(lprcSrc1))
00303     {
00304       if (IsRectEmpty(lprcSrc2))
00305       {
00306         SetLastError(ERROR_INVALID_PARAMETER);
00307         SetRectEmpty(lprcDst);
00308         return FALSE;
00309       }
00310       else *lprcDst = *lprcSrc2;
00311     }
00312     else
00313     {
00314       if (IsRectEmpty(lprcSrc2)) *lprcDst = *lprcSrc1;
00315       else
00316       {
00317         lprcDst->left   = MIN(lprcSrc1->left,lprcSrc2->left);
00318         lprcDst->right  = MAX(lprcSrc1->right,lprcSrc2->right);
00319         lprcDst->top    = MIN(lprcSrc1->top,lprcSrc2->top);
00320         lprcDst->bottom = MAX(lprcSrc1->bottom,lprcSrc2->bottom);
00321       }
00322     }
00323 
00324     return TRUE;
00325 }
00326 
00327 /* Mouse Input Functions */
00328 
00329 /* Error Functions */
00330 
00331 /*****************************************************************************
00332  * Name      : ExitWindowsEx
00333  * Purpose   : Shutdown System
00334  * Parameters: UINT  uFlags
00335  *             DWORD dwReserved
00336  * Variables :
00337  * Result    : TRUE / FALSE
00338  * Remark    :
00339  * Status    :
00340  *
00341  * Author    : Patrick Haller [Tue, 1999/10/20 21:24]
00342  *****************************************************************************/
00343 
00344 ODINFUNCTION2(BOOL, ExitWindowsEx, UINT,  uFlags,
00345                                    DWORD, dwReserved)
00346 {
00347   int rc = MessageBoxA(HWND_DESKTOP,
00348                        "Are you sure you want to shutdown the OS/2 system?",
00349                        "Shutdown ...",
00350                        MB_YESNOCANCEL | MB_ICONQUESTION);
00351   switch (rc)
00352   {
00353     case IDCANCEL: return (FALSE);
00354     case IDYES:    break;
00355     case IDNO:
00356       dprintf(("no shutdown!\n"));
00357       return TRUE;
00358   }
00359 
00360   return O32_ExitWindowsEx(uFlags,dwReserved);
00361 }
00362 
00363 
00364 //******************************************************************************
00365 //******************************************************************************
00366 BOOL WIN32API MessageBeep( UINT uType)
00367 {
00368     INT flStyle;
00369 
00370     dprintf(("USER32:  MessageBeep\n"));
00371 
00372     switch (uType)
00373     {
00374       case 0xFFFFFFFF:
00375         Beep(500,50);
00376         return TRUE;
00377       case MB_ICONASTERISK:
00378         flStyle = WAOS_NOTE;
00379         break;
00380       case MB_ICONEXCLAMATION:
00381         flStyle = WAOS_WARNING;
00382         break;
00383       case MB_ICONHAND:
00384       case MB_ICONQUESTION:
00385       case MB_OK:
00386         flStyle = WAOS_NOTE;
00387         break;
00388       default:
00389         flStyle = WAOS_ERROR; //CB: should be right
00390         break;
00391     }
00392     return OSLibWinAlarm(OSLIB_HWND_DESKTOP,flStyle);
00393 }
00394 //******************************************************************************
00395 //2nd parameter not used according to SDK (yet?)
00396 //******************************************************************************
00397 VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
00398 {
00399   dprintf(("USER32: SetLastErrorEx %x %x", dwErrCode, dwType));
00400   SetLastError(dwErrCode);
00401 }
00402 
00403 /* Accessibility Functions */
00404 
00405 int WIN32API GetSystemMetrics(int nIndex)
00406 {
00407    int rc = 0;
00408 
00409    switch(nIndex) {
00410     case SM_CXSCREEN:
00411         rc = ScreenWidth;
00412         break;
00413 
00414     case SM_CYSCREEN:
00415         rc = ScreenHeight;
00416         break;
00417 
00418     case SM_CXVSCROLL:
00419         rc = OSLibWinQuerySysValue(SVOS_CXVSCROLL);
00420         break;
00421 
00422     case SM_CYHSCROLL:
00423         rc = OSLibWinQuerySysValue(SVOS_CYHSCROLL);
00424         break;
00425 
00426     case SM_CYCAPTION:
00427         if(fOS2Look) {
00428              rc = OSLibWinQuerySysValue(SVOS_CYTITLEBAR);
00429         }
00430         else rc = 19;
00431         break;
00432 
00433     case SM_CXBORDER:
00434     case SM_CYBORDER:
00435         rc = 1;
00436         break;
00437 
00438     case SM_CXDLGFRAME:
00439     case SM_CYDLGFRAME:
00440         rc = 3;
00441         break;
00442 
00443     case SM_CYMENU:
00444     case SM_CXMENUSIZE:
00445     case SM_CYMENUSIZE:
00446         if(fOS2Look) {
00447              rc = OSLibWinQuerySysValue(SVOS_CYMENU);
00448         }
00449         else rc = 19;
00450         break;
00451 
00452     case SM_CXSIZE:
00453     case SM_CYSIZE:
00454         rc = GetSystemMetrics(SM_CYCAPTION)-2;
00455         break;
00456 
00457     case SM_CXFRAME:
00458     case SM_CYFRAME:
00459         rc = 4;
00460         break;
00461 
00462     case SM_CXEDGE:
00463     case SM_CYEDGE:
00464         rc = 2;
00465         break;
00466 
00467     case SM_CXMINSPACING:
00468         rc = 160;
00469         break;
00470 
00471     case SM_CYMINSPACING:
00472         rc = 24;
00473         break;
00474 
00475     case SM_CXSMICON:
00476     case SM_CYSMICON:
00477         rc = 16;
00478         break;
00479 
00480     case SM_CYSMCAPTION:
00481         rc = 16;
00482         break;
00483 
00484     case SM_CXSMSIZE:
00485     case SM_CYSMSIZE:
00486         rc = 15;
00487         break;
00488 
00489 //CB: todo: add missing metrics
00490 
00491     case SM_CXICONSPACING: //TODO: size of grid cell for large icons
00492         rc = OSLibWinQuerySysValue(SVOS_CXICON);
00493         //CB: return standard windows icon size?
00494         //rc = 32;
00495         break;
00496     case SM_CYICONSPACING:
00497         rc = OSLibWinQuerySysValue(SVOS_CYICON);
00498         //read SM_CXICONSPACING comment
00499         //rc = 32;
00500         break;
00501     case SM_PENWINDOWS:
00502         rc = FALSE;
00503         break;
00504     case SM_DBCSENABLED:
00505         rc = FALSE;
00506         break;
00507     case SM_CXICON:
00508     case SM_CYICON:
00509         rc = 32;  //CB: Win32: only 32x32, OS/2 32x32/40x40
00510                   //    we must implement 32x32 for all screen resolutions
00511         break;
00512     case SM_ARRANGE:
00513         rc = ARW_BOTTOMLEFT | ARW_LEFT;
00514         break;
00515     case SM_CXMINIMIZED:
00516         break;
00517     case SM_CYMINIMIZED:
00518         break;
00519 
00520     case SM_CXMINTRACK:
00521     case SM_CXMIN:
00522         rc = 112;
00523         break;
00524 
00525     case SM_CYMINTRACK:
00526     case SM_CYMIN:
00527         rc = 27;
00528         break;
00529 
00530     case SM_CXMAXTRACK: //max window size
00531     case SM_CXMAXIMIZED:    //max toplevel window size
00532         rc = OSLibWinQuerySysValue(SVOS_CXSCREEN);
00533         break;
00534 
00535     case SM_CYMAXTRACK:
00536     case SM_CYMAXIMIZED:
00537         rc = OSLibWinQuerySysValue(SVOS_CYSCREEN);
00538         break;
00539 
00540     case SM_NETWORK:
00541         rc = 0x01;  //TODO: default = yes
00542         break;
00543     case SM_CLEANBOOT:
00544         rc = 0;     //normal boot
00545         break;
00546     case SM_CXDRAG:     //nr of pixels before drag becomes a real one
00547         rc = 2;
00548         break;
00549     case SM_CYDRAG:
00550         rc = 2;
00551         break;
00552     case SM_SHOWSOUNDS: //show instead of play sound
00553         rc = FALSE;
00554         break;
00555     case SM_CXMENUCHECK:
00556         rc = 4;     //TODO
00557         break;
00558     case SM_CYMENUCHECK:
00559         rc = OSLibWinQuerySysValue(SVOS_CYMENU);
00560         break;
00561     case SM_SLOWMACHINE:
00562         rc = FALSE; //even a slow machine is fast with OS/2 :)
00563         break;
00564     case SM_MIDEASTENABLED:
00565         rc = FALSE;
00566         break;
00567     case SM_MOUSEWHEELPRESENT:
00568         rc = FALSE;
00569         break;
00570     case SM_XVIRTUALSCREEN:
00571         rc = 0;
00572         break;
00573     case SM_YVIRTUALSCREEN:
00574         rc = 0;
00575         break;
00576 
00577     case SM_CXVIRTUALSCREEN:
00578         rc = OSLibWinQuerySysValue(SVOS_CXSCREEN);
00579         break;
00580     case SM_CYVIRTUALSCREEN:
00581         rc = OSLibWinQuerySysValue(SVOS_CYSCREEN);
00582         break;
00583     case SM_CMONITORS:
00584         rc = 1;
00585         break;
00586     case SM_SAMEDISPLAYFORMAT:
00587         rc = TRUE;
00588         break;
00589     case SM_CMETRICS:
00590         rc = 81;
00591         //rc = O32_GetSystemMetrics(44);  //Open32 changed this one
00592         break;
00593     default:
00594         //better than nothing
00595         rc = O32_GetSystemMetrics(nIndex);
00596         break;
00597     }
00598     dprintf2(("USER32:  GetSystemMetrics %d returned %d\n", nIndex, rc));
00599     return(rc);
00600 }
00601 //******************************************************************************
00602 /* Not support by Open32 (not included are the new win9x parameters):
00603       case SPI_GETFASTTASKSWITCH:
00604       case SPI_GETGRIDGRANULARITY:
00605       case SPI_GETICONTITLELOGFONT:
00606       case SPI_GETICONTITLEWRAP:
00607       case SPI_GETMENUDROPALIGNMENT:
00608       case SPI_ICONHORIZONTALSPACING:
00609       case SPI_ICONVERTICALSPACING:
00610       case SPI_LANGDRIVER:
00611       case SPI_SETFASTTASKSWITCH:
00612       case SPI_SETGRIDGRANULARITY:
00613       case SPI_SETICONTITLELOGFONT:
00614       case SPI_SETICONTITLEWRAP:
00615       case SPI_SETMENUDROPALIGNMENT:
00616       case SPI_GETSCREENSAVEACTIVE:
00617       case SPI_GETSCREENSAVETIMEOUT:
00618       case SPI_SETDESKPATTERN:
00619       case SPI_SETDESKWALLPAPER:
00620       case SPI_SETSCREENSAVEACTIVE:
00621       case SPI_SETSCREENSAVETIMEOUT:
00622 */
00623 //******************************************************************************
00624 BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
00625 {
00626  BOOL rc = TRUE;
00627 
00628   dprintf(("USER32:  SystemParametersInfoA uiAction: %d, uiParam: %d, pvParam: %d, fWinIni: %d\n",
00629            uiAction, uiParam, pvParam, fWinIni));
00630 
00631   switch(uiAction) {
00632 
00633     case SPI_GETBEEP:
00634         *(ULONG*)pvParam = OSLibWinQuerySysValue(SVOS_ALARM);
00635         break;
00636 
00637     case SPI_GETKEYBOARDDELAY:
00638         *(PULONG)pvParam = OSLibPrfQueryProfileInt(OSLIB_HINI_USER, "PM_ControlPanel",
00639                                                    "KeyRepeatDelay", 90);
00640         break;
00641 
00642     case SPI_GETKEYBOARDSPEED:
00643         *(PULONG)pvParam = OSLibPrfQueryProfileInt(OSLIB_HINI_USER, "PM_ControlPanel",
00644                                                    "KeyRepeatRate", 19);
00645         break;
00646 
00647 #if 0
00648 // TODO: Make OSLib a seperate DLL and use it everywhere?
00649     case SPI_GETMOUSE:
00650     {
00651         ULONG retCode;
00652         retCode = OSLibDosOpen(
00653         break;
00654     }
00655 #endif
00656 
00657     case SPI_SETBEEP:
00658         // we don't do anything here. Win32 apps shouldn't change OS/2 settings
00659         dprintf(("USER32: SPI_SETBEEP is ignored!\n"));
00660         break;
00661 
00662     case SPI_SETBORDER:
00663         // TODO make this for Win32 apps only, Open32 changes OS/2 settings!
00664         dprintf(("USER32: SPI_SETBORDER is ignored, implement!\n"));
00665         break;
00666 
00667     case SPI_SETDOUBLECLKHEIGHT:
00668         // TODO make this for Win32 apps only, Open32 changes OS/2 settings!
00669         dprintf(("USER32: SPI_SETDOUBLECLICKHEIGHT is ignored, implement!\n"));
00670         break;
00671 
00672     case SPI_SETDOUBLECLKWIDTH:
00673         // TODO make this for Win32 apps only, Open32 changes OS/2 settings!
00674         dprintf(("USER32: SPI_SETDOUBLECLICKWIDTH is ignored, implement!\n"));
00675         break;
00676 
00677     case SPI_SETDOUBLECLICKTIME:
00678         // TODO make this for Win32 apps only, Open32 changes OS/2 settings!
00679         dprintf(("USER32: SPI_SETDOUBLECLICKTIME is ignored, implement!\n"));
00680         break;
00681 
00682     case SPI_SETKEYBOARDDELAY:
00683         // TODO make this for Win32 apps only, Open32 changes OS/2 settings!
00684         dprintf(("USER32: SPI_SETKEYBOARDDELAY is ignored, implement!\n"));
00685         break;
00686 
00687     case SPI_SETKEYBOARDSPEED:
00688         // TODO make this for Win32 apps only, Open32 changes OS/2 settings!
00689         dprintf(("USER32: SPI_SETKEYBOARDSPEED is ignored, implement!\n"));
00690         break;
00691 
00692     case SPI_SETMOUSE:
00693         // TODO make this for Win32 apps only, Open32 changes OS/2 settings!
00694         dprintf(("USER32: SPI_SETMOUSE is ignored, implement!\n"));
00695         break;
00696 
00697     case SPI_SETMOUSEBUTTONSWAP:
00698         // TODO make this for Win32 apps only, Open32 changes OS/2 settings!
00699         dprintf(("USER32: SPI_SETMOUSEBUTTONSWAP is ignored, implement!\n"));
00700         break;
00701 
00702     case SPI_SCREENSAVERRUNNING:
00703         *(BOOL *)pvParam = FALSE;
00704         break;
00705 
00706     case SPI_GETDRAGFULLWINDOWS:
00707         *(BOOL *)pvParam = OSLibWinQuerySysValue(SVOS_DYNAMICDRAG);
00708         break;
00709 
00710     case SPI_GETNONCLIENTMETRICS:
00711     {
00712         LPNONCLIENTMETRICSA lpnm = (LPNONCLIENTMETRICSA)pvParam;
00713                 
00714         if (lpnm->cbSize == sizeof(NONCLIENTMETRICSA))
00715         {
00716             memset(lpnm, 0, sizeof(NONCLIENTMETRICSA));
00717             lpnm->cbSize = sizeof(NONCLIENTMETRICSA);
00718 
00719             SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfCaptionFont),0);
00720             lpnm->lfCaptionFont.lfWeight = FW_BOLD;
00721             lpnm->iCaptionWidth    = 32; //TODO
00722             lpnm->iCaptionHeight   = 32; //TODO
00723 
00724             SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfSmCaptionFont),0);
00725             lpnm->iSmCaptionWidth  = GetSystemMetrics(SM_CXSMSIZE);
00726             lpnm->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
00727 
00728             LPLOGFONTA lpLogFont = &(lpnm->lfMenuFont);
00729             if(fOS2Look) {
00730                 char fontname[128];
00731                 char *pszFontName;
00732                 BOOL fFound = TRUE;
00733 
00734                 if(OSLibPrfQueryProfileString(OSLIB_HINI_USER, "PM_SystemFonts", "Menus", "", fontname, sizeof(fontname)) == 1) {
00735                     if(OSLibPrfQueryProfileString(OSLIB_HINI_USER, "PM_SystemFonts", "DefaultFont", "", fontname, sizeof(fontname)) == 1) {
00736                         fFound = FALSE;
00737                     }
00738                 }
00739                 if(fFound) {
00740                     pszFontName = fontname;
00741                     while(*pszFontName != '.' && *pszFontName != 0) pszFontName++;
00742                     if(*pszFontName) {
00743                         *pszFontName++ = 0;
00744 
00745                         strncpy(lpLogFont->lfFaceName, pszFontName, sizeof(lpLogFont->lfFaceName));
00746                         lpLogFont->lfFaceName[sizeof(lpLogFont->lfFaceName)-1] = 0;
00747                         lpLogFont->lfWeight = FW_NORMAL;
00748 
00749                         // AH 2001-12-26 use the font size returned by the graphics
00750                         // driver as the font height. This will take font size settings
00751                         // such as small, medium and large fonts into account
00752                         lpLogFont->lfHeight = CapsCharHeight;
00753                     }
00754                     else fFound = FALSE;
00755                 }
00756                 if(!fFound) {
00757                     GetProfileStringA("Desktop", "MenuFont", "WarpSans",
00758                                       lpLogFont->lfFaceName, LF_FACESIZE);
00759                     lpLogFont->lfWeight = FW_BOLD;
00760                     // AH 2001-12-26 take graphics driver font size setting
00761                     lpLogFont->lfHeight = -GetProfileIntA("Desktop","MenuFontSize", CapsCharHeight);
00762                 }
00763                 lpLogFont->lfWidth = 0;
00764                 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
00765             }
00766             else {
00767                 GetProfileStringA("Desktop", "MenuFont", "MS Sans Serif",
00768                                   lpLogFont->lfFaceName, LF_FACESIZE);
00769                 lpLogFont->lfWeight = FW_NORMAL;
00770                 lpLogFont->lfHeight = -GetProfileIntA("Desktop","MenuFontSize", 13);
00771                 lpLogFont->lfWidth = 0;
00772                 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
00773             }
00774             lpLogFont->lfItalic = FALSE;
00775             lpLogFont->lfStrikeOut = FALSE;
00776             lpLogFont->lfUnderline = FALSE;
00777             lpLogFont->lfCharSet = ANSI_CHARSET;
00778             lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
00779             lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
00780             lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
00781 
00782             SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0,
00783                               (LPVOID)&(lpnm->lfStatusFont),0);
00784             SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0,
00785                               (LPVOID)&(lpnm->lfMessageFont),0);
00786 
00787             lpnm->iBorderWidth     = GetSystemMetrics(SM_CXBORDER);
00788             lpnm->iScrollWidth     = GetSystemMetrics(SM_CXHSCROLL);
00789             lpnm->iScrollHeight    = GetSystemMetrics(SM_CYHSCROLL);
00790             lpnm->iMenuHeight      = GetSystemMetrics(SM_CYMENU);
00791             lpnm->iMenuWidth       = lpnm->iMenuHeight; //TODO
00792           }
00793         else
00794         {
00795             dprintf(("SPI_GETNONCLIENTMETRICS: size mismatch !! (is %d; should be %d)\n", lpnm->cbSize, sizeof(NONCLIENTMETRICSA)));
00796             /* FIXME: SetLastError? */
00797             rc = FALSE;
00798         }
00799         break;
00800     }
00801 
00802     case SPI_GETICONMETRICS:                    /*     45  WINVER >= 0x400 */
00803     {
00804         LPICONMETRICSA lpIcon = (LPICONMETRICSA)pvParam;
00805         if(lpIcon && lpIcon->cbSize == sizeof(*lpIcon))
00806         {
00807             SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, 0,
00808                                    &lpIcon->iHorzSpacing, FALSE );
00809             SystemParametersInfoA( SPI_ICONVERTICALSPACING, 0,
00810                                    &lpIcon->iVertSpacing, FALSE );
00811             SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0,
00812                                    &lpIcon->iTitleWrap, FALSE );
00813             SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0,
00814                                    &lpIcon->lfFont, FALSE );
00815         }
00816         else
00817         {
00818             dprintf(("SPI_GETICONMETRICS: size mismatch !! (is %d; should be %d)\n", lpIcon->cbSize, sizeof(ICONMETRICSA)));
00819             /* FIXME: SetLastError? */
00820             rc = FALSE;
00821         }
00822         break;
00823     }
00824 
00825     case SPI_GETICONTITLELOGFONT:
00826     {
00827         LPLOGFONTA lpLogFont = (LPLOGFONTA)pvParam;
00828 
00829         /* from now on we always have an alias for MS Sans Serif */
00830         strcpy(lpLogFont->lfFaceName, "MS Sans Serif");
00831         lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", /*8*/12); //CB: 8 is too small
00832         lpLogFont->lfWidth = 0;
00833         lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
00834         lpLogFont->lfWeight = FW_NORMAL;
00835         lpLogFont->lfItalic = FALSE;
00836         lpLogFont->lfStrikeOut = FALSE;
00837         lpLogFont->lfUnderline = FALSE;
00838         lpLogFont->lfCharSet = ANSI_CHARSET;
00839         lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
00840         lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
00841         lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
00842         break;
00843     }
00844     case SPI_GETBORDER:
00845         *(INT *)pvParam = GetSystemMetrics( SM_CXFRAME );
00846         break;
00847 
00848     case SPI_GETWORKAREA:
00849         SetRect( (RECT *)pvParam, 0, 0,
00850                 GetSystemMetrics( SM_CXSCREEN ),
00851                 GetSystemMetrics( SM_CYSCREEN )
00852         );
00853         break;
00854 
00855     case SPI_GETWHEELSCROLLLINES: //TODO: Undocumented
00856         rc = 16;
00857         break;
00858 
00859     default:
00860         dprintf(("System parameter value is not supported!\n"));
00861         rc = FALSE;
00862         // AH: no longer call Open32
00863         //rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
00864         break;
00865   }
00866   dprintf(("USER32:  SystemParametersInfoA %d, returned %d\n", uiAction, rc));
00867   return(rc);
00868 }
00869 //******************************************************************************
00870 //TODO: Check for more options that have different structs for Unicode!!!!
00871 //******************************************************************************
00872 BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
00873 {
00874  BOOL rc = TRUE;
00875  NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
00876  NONCLIENTMETRICSA  clientMetricsA = {0};
00877  PVOID  pvParamA;
00878  UINT   uiParamA;
00879 
00880     switch(uiAction) {
00881     case SPI_SETNONCLIENTMETRICS:
00882         clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
00883         clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
00884         clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
00885         clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
00886         clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
00887         clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
00888         ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
00889         clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
00890         clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
00891         ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
00892         clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
00893         clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
00894         ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
00895         ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
00896         ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
00897         //no break
00898     case SPI_GETNONCLIENTMETRICS:
00899         uiParamA = sizeof(NONCLIENTMETRICSA);
00900         pvParamA = &clientMetricsA;
00901         break;
00902 
00903     case SPI_GETICONMETRICS:                    /*     45  WINVER >= 0x400 */
00904     {
00905         LPICONMETRICSW lpIcon = (LPICONMETRICSW)pvParam;
00906         if(lpIcon && lpIcon->cbSize == sizeof(*lpIcon))
00907         {
00908             SystemParametersInfoW( SPI_ICONHORIZONTALSPACING, 0,
00909                                    &lpIcon->iHorzSpacing, FALSE );
00910             SystemParametersInfoW( SPI_ICONVERTICALSPACING, 0,
00911                                    &lpIcon->iVertSpacing, FALSE );
00912             SystemParametersInfoW( SPI_GETICONTITLEWRAP, 0,
00913                                    &lpIcon->iTitleWrap, FALSE );
00914             SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0,
00915                                    &lpIcon->lfFont, FALSE );
00916             return TRUE;
00917         }
00918         else
00919         {
00920             dprintf(("SPI_GETICONMETRICS: size mismatch !! (is %d; should be %d)\n", lpIcon->cbSize, sizeof(ICONMETRICSA)));
00921             /* FIXME: SetLastError? */
00922             return FALSE;
00923         }
00924     }
00925 
00926     case SPI_GETICONTITLELOGFONT:
00927     {
00928         LPLOGFONTW lpLogFont = (LPLOGFONTW)pvParam;
00929 
00930         /* from now on we always have an alias for MS Sans Serif */
00931         lstrcpyW(lpLogFont->lfFaceName, (LPCWSTR)L"MS Sans Serif");
00932         lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", /*8*/12); //CB: 8 is too small
00933         lpLogFont->lfWidth = 0;
00934         lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
00935         lpLogFont->lfWeight = FW_NORMAL;
00936         lpLogFont->lfItalic = FALSE;
00937         lpLogFont->lfStrikeOut = FALSE;
00938         lpLogFont->lfUnderline = FALSE;
00939         lpLogFont->lfCharSet = ANSI_CHARSET;
00940         lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
00941         lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
00942         lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
00943         return TRUE;
00944     }
00945     default:
00946         pvParamA = pvParam;
00947         uiParamA = uiParam;
00948         break;
00949     }
00950     rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
00951 
00952     switch(uiAction) {
00953     case SPI_GETNONCLIENTMETRICS:
00954         clientMetricsW->cbSize = sizeof(*clientMetricsW);
00955         clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
00956         clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
00957         clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
00958         clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
00959         clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
00960         ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
00961 
00962         clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
00963         clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
00964         ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
00965 
00966         clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
00967         clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
00968         ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
00969         ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
00970         ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
00971         break;
00972     }
00973     dprintf(("USER32:  SystemParametersInfoW %d, returned %d\n", uiAction, rc));
00974     return(rc);
00975 }
00976 
00977 /* Help Functions */
00978 
00979 BOOL WIN32API WinHelpA( HWND hwnd, LPCSTR lpszHelp, UINT uCommand, DWORD  dwData)
00980 {
00981   static WORD WM_WINHELP = 0;
00982   HWND hDest;
00983   LPWINHELP lpwh;
00984   HINSTANCE winhelp;
00985   int size,dsize,nlen;
00986   BOOL ret;
00987 
00988   dprintf(("USER32: WinHelpA %x %s %d %x", hwnd, lpszHelp, uCommand, dwData));
00989 
00990   if(!WM_WINHELP)
00991   {
00992     WM_WINHELP=RegisterWindowMessageA("WM_WINHELP");
00993     if(!WM_WINHELP)
00994       return FALSE;
00995   }
00996 
00997   hDest = FindWindowA( "MS_WINHELP", NULL );
00998   if(!hDest)
00999   {
01000     if(uCommand == HELP_QUIT)
01001       return TRUE;
01002     else
01003       winhelp = WinExec ( "winhlp32.exe -x", SW_SHOWNORMAL );
01004     if ( winhelp <= 32 ) return FALSE;
01005     if ( ! ( hDest = FindWindowA ( "MS_WINHELP", NULL ) )) return FALSE;
01006   }
01007 
01008   switch(uCommand)
01009   {
01010     case HELP_CONTEXT:
01011     case HELP_SETCONTENTS:
01012     case HELP_CONTENTS:
01013     case HELP_CONTEXTPOPUP:
01014     case HELP_FORCEFILE:
01015     case HELP_HELPONHELP:
01016     case HELP_FINDER:
01017     case HELP_QUIT:
01018       dsize=0;
01019       break;
01020 
01021     case HELP_KEY:
01022     case HELP_PARTIALKEY:
01023     case HELP_COMMAND:
01024       dsize = strlen( (LPSTR)dwData )+1;
01025       break;
01026 
01027     case HELP_MULTIKEY:
01028       dsize = ((LPMULTIKEYHELP)dwData)->mkSize;
01029       break;
01030 
01031     case HELP_SETWINPOS:
01032       dsize = ((LPHELPWININFO)dwData)->wStructSize;
01033       break;
01034 
01035     default:
01036       //WARN("Unknown help command %d\n",wCommand);
01037       return FALSE;
01038   }
01039   if(lpszHelp)
01040     nlen = strlen(lpszHelp)+1;
01041   else
01042     nlen = 0;
01043   size = sizeof(WINHELP) + nlen + dsize;
01044 
01045   //allocate shared memory
01046   lpwh = (WINHELP*)_smalloc(size);
01047   lpwh->size = size;
01048   lpwh->command = uCommand;
01049   lpwh->data = dwData;
01050   if(nlen)
01051   {
01052     strcpy(((char*)lpwh) + sizeof(WINHELP),lpszHelp);
01053     lpwh->ofsFilename = sizeof(WINHELP);
01054   } else
01055       lpwh->ofsFilename = 0;
01056   if(dsize)
01057   {
01058     memcpy(((char*)lpwh)+sizeof(WINHELP)+nlen,(LPSTR)dwData,dsize);
01059     lpwh->ofsData = sizeof(WINHELP)+nlen;
01060   } else
01061       lpwh->ofsData = 0;
01062 
01063   ret = SendMessageA(hDest,WM_WINHELP,hwnd,(LPARAM)lpwh);
01064   free(lpwh);
01065   return ret;
01066 }
01067 //******************************************************************************
01068 //******************************************************************************
01069 BOOL WIN32API WinHelpW( HWND hwnd, LPCWSTR lpszHelp, UINT uCommand, DWORD  dwData)
01070 {
01071   char *astring = UnicodeToAsciiString((LPWSTR)lpszHelp);
01072   BOOL  rc;
01073 
01074   dprintf(("USER32:  WinHelpW\n"));
01075 
01076   rc = WinHelpA(hwnd,astring,uCommand,dwData);
01077   FreeAsciiString(astring);
01078 
01079   return rc;
01080 }
01081 
01082 
01083 /* Window Functions */
01084 
01085 /*****************************************************************************
01086  * Name      : BOOL WIN32API PaintDesktop
01087  * Purpose   : The PaintDesktop function fills the clipping region in the
01088  *             specified device context with the desktop pattern or wallpaper.
01089  *             The function is provided primarily for shell desktops.
01090  * Parameters:
01091  * Variables :
01092  * Result    : If the function succeeds, the return value is TRUE.
01093  *             If the function fails, the return value is FALSE.
01094  * Remark    :
01095  * Status    : UNTESTED STUB
01096  *
01097  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01098  *****************************************************************************/
01099 BOOL WIN32API PaintDesktop(HDC hdc)
01100 {
01101   dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
01102          hdc));
01103 
01104   return (FALSE);
01105 }
01106 
01107 /* Filled Shape Functions */
01108 
01109   /* Last COLOR id */
01110 #define COLOR_MAX   COLOR_GRADIENTINACTIVECAPTION
01111 
01112 int WIN32API FillRect(HDC hDC, const RECT * lprc, HBRUSH hbr)
01113 {
01114     //SvL: brush 0 means current selected brush (verified in NT4)
01115     if(hbr == 0) {
01116         hbr = GetCurrentObject(hDC, OBJ_BRUSH);
01117     }
01118     else
01119     if (hbr <= (HBRUSH) (COLOR_MAX + 1)) {
01120         hbr = GetSysColorBrush( (INT) hbr - 1 );
01121     }
01122     dprintf(("USER32:  FillRect %x (%d,%d)(%d,%d) brush %X", hDC, lprc->left, lprc->top, lprc->right, lprc->bottom, hbr));
01123     return O32_FillRect(hDC,lprc,hbr);
01124 }
01125 //******************************************************************************
01126 //******************************************************************************
01127 int WIN32API FrameRect( HDC hDC, const RECT * lprc, HBRUSH  hbr)
01128 {
01129     dprintf(("USER32: FrameRect %x (%d,%d)(%d,%d) brush %x", hDC, lprc->top, lprc->left, lprc->bottom, lprc->right, hbr));
01130     return O32_FrameRect(hDC,lprc,hbr);
01131 }
01132 //******************************************************************************
01133 //******************************************************************************
01134 BOOL WIN32API InvertRect( HDC hDC, const RECT * lprc)
01135 {
01136     if(lprc) {
01137          dprintf(("USER32: InvertRect %x (%d,%d)(%d,%d)", hDC, lprc->left, lprc->top, lprc->right, lprc->bottom));
01138     }
01139     else dprintf(("USER32: InvertRect %x NULL", hDC));
01140     return O32_InvertRect(hDC,lprc);
01141 }
01142 
01143 /* System Information Functions */
01144 
01145 /* Window Station and Desktop Functions */
01146 
01147 /*****************************************************************************
01148  * Name      : HDESK WIN32API GetThreadDesktop
01149  * Purpose   : The GetThreadDesktop function returns a handle to the desktop
01150  *             associated with a specified thread.
01151  * Parameters: DWORD dwThreadId thread identifier
01152  * Variables :
01153  * Result    : If the function succeeds, the return value is the handle of the
01154  *               desktop associated with the specified thread.
01155  * Remark    :
01156  * Status    : UNTESTED STUB
01157  *
01158  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01159  *****************************************************************************/
01160 HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
01161 {
01162   dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
01163          dwThreadId));
01164 
01165   return (NULL);
01166 }
01167 
01168 /*****************************************************************************
01169  * Name      : BOOL WIN32API CloseDesktop
01170  * Purpose   : The CloseDesktop function closes an open handle of a desktop
01171  *             object. A desktop is a secure object contained within a window
01172  *             station object. A desktop has a logical display surface and
01173  *             contains windows, menus and hooks.
01174  * Parameters: HDESK hDesktop
01175  * Variables :
01176  * Result    : If the function succeeds, the return value is TRUE.
01177  *             If the functions fails, the return value is FALSE. To get
01178  *             extended error information, call GetLastError.
01179  * Remark    :
01180  * Status    : UNTESTED STUB
01181  *
01182  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01183  *****************************************************************************/
01184 BOOL WIN32API CloseDesktop(HDESK hDesktop)
01185 {
01186   dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
01187          hDesktop));
01188 
01189   return (FALSE);
01190 }
01191 /*****************************************************************************
01192  * Name      : BOOL WIN32API CloseWindowStation
01193  * Purpose   : The CloseWindowStation function closes an open window station handle.
01194  * Parameters: HWINSTA hWinSta
01195  * Variables :
01196  * Result    :
01197  * Remark    : If the function succeeds, the return value is TRUE.
01198  *             If the functions fails, the return value is FALSE. To get
01199  *             extended error information, call GetLastError.
01200  * Status    : UNTESTED STUB
01201  *
01202  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01203  *****************************************************************************/
01204 BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
01205 {
01206   dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
01207          hWinSta));
01208 
01209   return (FALSE);
01210 }
01211 /*****************************************************************************
01212  * Name      : HDESK WIN32API CreateDesktopA
01213  * Purpose   : The CreateDesktop function creates a new desktop on the window
01214  *             station associated with the calling process.
01215  * Parameters: LPCTSTR   lpszDesktop      name of the new desktop
01216  *             LPCTSTR   lpszDevice       name of display device to assign to the desktop
01217  *             LPDEVMODE pDevMode         reserved; must be NULL
01218  *             DWORD     dwFlags          flags to control interaction with other applications
01219  *             DWORD     dwDesiredAccess  specifies access of returned handle
01220  *             LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
01221  * Variables :
01222  * Result    : If the function succeeds, the return value is a handle of the
01223  *               newly created desktop.
01224  *             If the function fails, the return value is NULL. To get extended
01225  *               error information, call GetLastError.
01226  * Remark    :
01227  * Status    : UNTESTED STUB
01228  *
01229  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01230  *****************************************************************************/
01231 HDESK WIN32API CreateDesktopA(LPCTSTR               lpszDesktop,
01232                               LPCTSTR               lpszDevice,
01233                               LPDEVMODEA            pDevMode,
01234                               DWORD                 dwFlags,
01235                               DWORD                 dwDesiredAccess,
01236                               LPSECURITY_ATTRIBUTES lpsa)
01237 {
01238   dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
01239          lpszDesktop,
01240          lpszDevice,
01241          pDevMode,
01242          dwFlags,
01243          dwDesiredAccess,
01244          lpsa));
01245 
01246   return (NULL);
01247 }
01248 /*****************************************************************************
01249  * Name      : HDESK WIN32API CreateDesktopW
01250  * Purpose   : The CreateDesktop function creates a new desktop on the window
01251  *             station associated with the calling process.
01252  * Parameters: LPCTSTR   lpszDesktop      name of the new desktop
01253  *             LPCTSTR   lpszDevice       name of display device to assign to the desktop
01254  *             LPDEVMODE pDevMode         reserved; must be NULL
01255  *             DWORD     dwFlags          flags to control interaction with other applications
01256  *             DWORD     dwDesiredAccess  specifies access of returned handle
01257  *             LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
01258  * Variables :
01259  * Result    : If the function succeeds, the return value is a handle of the
01260  *               newly created desktop.
01261  *             If the function fails, the return value is NULL. To get extended
01262  *               error information, call GetLastError.
01263  * Remark    :
01264  * Status    : UNTESTED STUB
01265  *
01266  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01267  *****************************************************************************/
01268 HDESK WIN32API CreateDesktopW(LPCTSTR               lpszDesktop,
01269                               LPCTSTR               lpszDevice,
01270                               LPDEVMODEW            pDevMode,
01271                               DWORD                 dwFlags,
01272                               DWORD                 dwDesiredAccess,
01273                               LPSECURITY_ATTRIBUTES lpsa)
01274 {
01275   dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
01276          lpszDesktop,
01277          lpszDevice,
01278          pDevMode,
01279          dwFlags,
01280          dwDesiredAccess,
01281          lpsa));
01282 
01283   return (NULL);
01284 }
01285 /*****************************************************************************
01286  * Name      : HWINSTA WIN32API CreateWindowStationA
01287  * Purpose   : The CreateWindowStation function creates a window station object.
01288  *             It returns a handle that can be used to access the window station.
01289  *             A window station is a secure object that contains a set of global
01290  *             atoms, a clipboard, and a set of desktop objects.
01291  * Parameters: LPTSTR lpwinsta            name of the new window station
01292  *             DWORD dwReserved           reserved; must be NULL
01293  *             DWORD dwDesiredAccess      specifies access of returned handle
01294  *             LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
01295  * Variables :
01296  * Result    : If the function succeeds, the return value is the handle to the
01297  *               newly created window station.
01298  *             If the function fails, the return value is NULL. To get extended
01299  *               error information, call GetLastError.
01300  * Remark    :
01301  * Status    : UNTESTED STUB
01302  *
01303  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01304  *****************************************************************************/
01305 HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
01306                                          DWORD  dwReserved,
01307                                          DWORD  dwDesiredAccess,
01308                                          LPSECURITY_ATTRIBUTES lpsa)
01309 {
01310   dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
01311          lpWinSta,
01312          dwReserved,
01313          dwDesiredAccess,
01314          lpsa));
01315 
01316   return (NULL);
01317 }
01318 /*****************************************************************************
01319  * Name      : HWINSTA WIN32API CreateWindowStationW
01320  * Purpose   : The CreateWindowStation function creates a window station object.
01321  *             It returns a handle that can be used to access the window station.
01322  *             A window station is a secure object that contains a set of global
01323  *             atoms, a clipboard, and a set of desktop objects.
01324  * Parameters: LPTSTR lpwinsta            name of the new window station
01325  *             DWORD dwReserved           reserved; must be NULL
01326  *             DWORD dwDesiredAccess      specifies access of returned handle
01327  *             LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
01328  * Variables :
01329  * Result    : If the function succeeds, the return value is the handle to the
01330  *               newly created window station.
01331  *             If the function fails, the return value is NULL. To get extended
01332  *               error information, call GetLastError.
01333  * Remark    :
01334  * Status    : UNTESTED STUB
01335  *
01336  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01337  *****************************************************************************/
01338 HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
01339                                          DWORD  dwReserved,
01340                                          DWORD  dwDesiredAccess,
01341                                          LPSECURITY_ATTRIBUTES lpsa)
01342 {
01343   dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
01344          lpWinSta,
01345          dwReserved,
01346          dwDesiredAccess,
01347          lpsa));
01348 
01349   return (NULL);
01350 }
01351 /*****************************************************************************
01352  * Name      : BOOL WIN32API EnumDesktopWindows
01353  * Purpose   : The EnumDesktopWindows function enumerates all windows in a
01354  *             desktop by passing the handle of each window, in turn, to an
01355  *             application-defined callback function.
01356  * Parameters: HDESK       hDesktop handle of desktop to enumerate
01357  *             WNDENUMPROC lpfn     points to application's callback function
01358  *             LPARAM      lParam   32-bit value to pass to the callback function
01359  * Variables :
01360  * Result    : If the function succeeds, the return value is TRUE.
01361  *             If the function fails, the return value is FALSE. To get
01362  *             extended error information, call GetLastError.
01363  * Remark    :
01364  * Status    : UNTESTED STUB
01365  *
01366  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01367  *****************************************************************************/
01368 BOOL WIN32API EnumDesktopWindows(HDESK       hDesktop,
01369                                     WNDENUMPROC lpfn,
01370                                     LPARAM      lParam)
01371 {
01372   dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
01373          hDesktop,
01374          lpfn,
01375          lParam));
01376 
01377   return (FALSE);
01378 }
01379 /*****************************************************************************
01380  * Name      : BOOL WIN32API EnumDesktopsA
01381  * Purpose   : The EnumDesktops function enumerates all desktops in the window
01382  *             station assigned to the calling process. The function does so by
01383  *             passing the name of each desktop, in turn, to an application-
01384  *             defined callback function.
01385  * Parameters: HWINSTA         hwinsta    handle of window station to enumerate
01386  *             DESKTOPENUMPROC lpEnumFunc points to application's callback function
01387  *             LPARAM          lParam     32-bit value to pass to the callback function
01388  * Variables :
01389  * Result    : If the function succeeds, the return value is TRUE.
01390  *             If the function fails, the return value is FALSE. To get extended
01391  *             error information, call GetLastError.
01392  * Remark    :
01393  * Status    : UNTESTED STUB
01394  *
01395  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01396  *****************************************************************************/
01397 BOOL WIN32API EnumDesktopsA(HWINSTA          hWinSta,
01398                             DESKTOPENUMPROCA lpEnumFunc,
01399                             LPARAM           lParam)
01400 {
01401   dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
01402          hWinSta,
01403          lpEnumFunc,
01404          lParam));
01405 
01406   return (FALSE);
01407 }
01408 /*****************************************************************************
01409  * Name      : BOOL WIN32API EnumDesktopsW
01410  * Purpose   : The EnumDesktops function enumerates all desktops in the window
01411  *             station assigned to the calling process. The function does so by
01412  *             passing the name of each desktop, in turn, to an application-
01413  *             defined callback function.
01414  * Parameters: HWINSTA         hwinsta    handle of window station to enumerate
01415  *             DESKTOPENUMPROC lpEnumFunc points to application's callback function
01416  *             LPARAM          lParam     32-bit value to pass to the callback function
01417  * Variables :
01418  * Result    : If the function succeeds, the return value is TRUE.
01419  *             If the function fails, the return value is FALSE. To get extended
01420  *             error information, call GetLastError.
01421  * Remark    :
01422  * Status    : UNTESTED STUB
01423  *
01424  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01425  *****************************************************************************/
01426 BOOL WIN32API EnumDesktopsW(HWINSTA          hWinSta,
01427                             DESKTOPENUMPROCW lpEnumFunc,
01428                             LPARAM           lParam)
01429 {
01430   dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
01431          hWinSta,
01432          lpEnumFunc,
01433          lParam));
01434 
01435   return (FALSE);
01436 }
01437 /*****************************************************************************
01438  * Name      : BOOL WIN32API EnumWindowStationsA
01439  * Purpose   : The EnumWindowStations function enumerates all windowstations
01440  *             in the system by passing the name of each window station, in
01441  *             turn, to an application-defined callback function.
01442  * Parameters:
01443  * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
01444  *             LPARAM         lParam     32-bit value to pass to the callback function
01445  * Result    : If the function succeeds, the return value is TRUE.
01446  *             If the function fails the return value is FALSE. To get extended
01447  *             error information, call GetLastError.
01448  * Remark    :
01449  * Status    : UNTESTED STUB
01450  *
01451  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01452  *****************************************************************************/
01453 BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
01454                                   LPARAM          lParam)
01455 {
01456   dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
01457          lpEnumFunc,
01458          lParam));
01459 
01460   return (FALSE);
01461 }
01462 /*****************************************************************************
01463  * Name      : BOOL WIN32API EnumWindowStationsW
01464  * Purpose   : The EnumWindowStations function enumerates all windowstations
01465  *             in the system by passing the name of each window station, in
01466  *             turn, to an application-defined callback function.
01467  * Parameters:
01468  * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
01469  *             LPARAM         lParam     32-bit value to pass to the callback function
01470  * Result    : If the function succeeds, the return value is TRUE.
01471  *             If the function fails the return value is FALSE. To get extended
01472  *             error information, call GetLastError.
01473  * Remark    :
01474  * Status    : UNTESTED STUB
01475  *
01476  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01477  *****************************************************************************/
01478 BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
01479                                   LPARAM          lParam)
01480 {
01481   dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
01482          lpEnumFunc,
01483          lParam));
01484 
01485   return (FALSE);
01486 }
01487 /*****************************************************************************
01488  * Name      : HWINSTA WIN32API GetProcessWindowStation
01489  * Purpose   : The GetProcessWindowStation function returns a handle of the
01490  *             window station associated with the calling process.
01491  * Parameters:
01492  * Variables :
01493  * Result    : If the function succeeds, the return value is a handle of the
01494  *               window station associated with the calling process.
01495  *             If the function fails, the return value is NULL. This can occur
01496  *               if the calling process is not an application written for Windows
01497  *               NT. To get extended error information, call GetLastError.
01498  * Remark    :
01499  * Status    : UNTESTED STUB
01500  *
01501  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01502  *****************************************************************************/
01503 HWINSTA WIN32API GetProcessWindowStation(VOID)
01504 {
01505   dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
01506 
01507   return (NULL);
01508 }
01509 /*****************************************************************************
01510  * Name      : BOOL WIN32API GetUserObjectInformationA
01511  * Purpose   : The GetUserObjectInformation function returns information about
01512  *               a window station or desktop object.
01513  * Parameters: HANDLE  hObj            handle of object to get information for
01514  *             int     nIndex          type of information to get
01515  *             PVOID   pvInfo          points to buffer that receives the information
01516  *             DWORD   nLength         size, in bytes, of pvInfo buffer
01517  *             LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
01518  * Variables :
01519  * Result    : If the function succeeds, the return value is TRUE.
01520  *             If the function fails, the return value is FALSE. To get extended
01521  *             error information, call GetLastError.
01522  * Remark    :
01523  * Status    : UNTESTED STUB
01524  *
01525  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01526  *****************************************************************************/
01527 BOOL WIN32API GetUserObjectInformationA(HANDLE  hObj,
01528                                            int     nIndex,
01529                                            PVOID   pvInfo,
01530                                            DWORD   nLength,
01531                                            LPDWORD lpnLengthNeeded)
01532 {
01533   dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
01534          hObj,
01535          nIndex,
01536          pvInfo,
01537          nLength,
01538          lpnLengthNeeded));
01539 
01540   return (FALSE);
01541 }
01542 /*****************************************************************************
01543  * Name      : BOOL WIN32API GetUserObjectInformationW
01544  * Purpose   : The GetUserObjectInformation function returns information about
01545  *               a window station or desktop object.
01546  * Parameters: HANDLE  hObj            handle of object to get information for
01547  *             int     nIndex          type of information to get
01548  *             PVOID   pvInfo          points to buffer that receives the information
01549  *             DWORD   nLength         size, in bytes, of pvInfo buffer
01550  *             LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
01551  * Variables :
01552  * Result    : If the function succeeds, the return value is TRUE.
01553  *             If the function fails, the return value is FALSE. To get extended
01554  *             error information, call GetLastError.
01555  * Remark    :
01556  * Status    : UNTESTED STUB
01557  *
01558  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01559  *****************************************************************************/
01560 BOOL WIN32API GetUserObjectInformationW(HANDLE  hObj,
01561                                            int     nIndex,
01562                                            PVOID   pvInfo,
01563                                            DWORD   nLength,
01564                                            LPDWORD lpnLengthNeeded)
01565 {
01566   dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
01567          hObj,
01568          nIndex,
01569          pvInfo,
01570          nLength,
01571          lpnLengthNeeded));
01572 
01573   return (FALSE);
01574 }
01575 /*****************************************************************************
01576  * Name      : BOOL WIN32API GetUserObjectSecurity
01577  * Purpose   : The GetUserObjectSecurity function retrieves security information
01578  *             for the specified user object.
01579  * Parameters: HANDLE                hObj            handle of user object
01580  *             SECURITY_INFORMATION * pSIRequested    address of requested security information
01581  *             LPSECURITY_DESCRIPTOR  pSID            address of security descriptor
01582  *             DWORD                 nLength         size of buffer for security descriptor
01583  *             LPDWORD               lpnLengthNeeded address of required size of buffer
01584  * Variables :
01585  * Result    : If the function succeeds, the return value is TRUE.
01586  *             If the function fails, the return value is FALSE. To get extended
01587  *               error information, call GetLastError.
01588  * Remark    :
01589  * Status    : UNTESTED STUB
01590  *
01591  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01592  *****************************************************************************/
01593 BOOL WIN32API GetUserObjectSecurity(HANDLE                hObj,
01594                                        PSECURITY_INFORMATION pSIRequested,
01595                                        PSECURITY_DESCRIPTOR  pSID,
01596                                        DWORD                 nLength,
01597                                        LPDWORD               lpnLengthNeeded)
01598 {
01599   dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
01600          hObj,
01601          pSIRequested,
01602          pSID,
01603          nLength,
01604          lpnLengthNeeded));
01605 
01606   return (FALSE);
01607 }
01608 /*****************************************************************************
01609  * Name      : HDESK WIN32API OpenDesktopA
01610  * Purpose   : The OpenDesktop function returns a handle to an existing desktop.
01611  *             A desktop is a secure object contained within a window station
01612  *             object. A desktop has a logical display surface and contains
01613  *             windows, menus and hooks.
01614  * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
01615  *             DWORD dwFlags           flags to control interaction with other applications
01616  *             BOOL fInherit           specifies whether returned handle is inheritable
01617  *             DWORD dwDesiredAccess   specifies access of returned handle
01618  * Variables :
01619  * Result    : If the function succeeds, the return value is the handle to the
01620  *               opened desktop.
01621  *             If the function fails, the return value is NULL. To get extended
01622  *               error information, call GetLastError.
01623  * Remark    :
01624  * Status    : UNTESTED STUB
01625  *
01626  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01627  *****************************************************************************/
01628 HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
01629                                DWORD   dwFlags,
01630                                BOOL    fInherit,
01631                                DWORD   dwDesiredAccess)
01632 {
01633   dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
01634          lpszDesktopName,
01635          dwFlags,
01636          fInherit,
01637          dwDesiredAccess));
01638 
01639   return (NULL);
01640 }
01641 /*****************************************************************************
01642  * Name      : HDESK WIN32API OpenDesktopW
01643  * Purpose   : The OpenDesktop function returns a handle to an existing desktop.
01644  *             A desktop is a secure object contained within a window station
01645  *             object. A desktop has a logical display surface and contains
01646  *             windows, menus and hooks.
01647  * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
01648  *             DWORD dwFlags           flags to control interaction with other applications
01649  *             BOOL fInherit           specifies whether returned handle is inheritable
01650  *             DWORD dwDesiredAccess   specifies access of returned handle
01651  * Variables :
01652  * Result    : If the function succeeds, the return value is the handle to the
01653  *               opened desktop.
01654  *             If the function fails, the return value is NULL. To get extended
01655  *               error information, call GetLastError.
01656  * Remark    :
01657  * Status    : UNTESTED STUB
01658  *
01659  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01660  *****************************************************************************/
01661 HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
01662                                DWORD   dwFlags,
01663                                BOOL    fInherit,
01664                                DWORD   dwDesiredAccess)
01665 {
01666   dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
01667          lpszDesktopName,
01668          dwFlags,
01669          fInherit,
01670          dwDesiredAccess));
01671 
01672   return (NULL);
01673 }
01674 /*****************************************************************************
01675  * Name      : HDESK WIN32API OpenInputDesktop
01676  * Purpose   : The OpenInputDesktop function returns a handle to the desktop
01677  *             that receives user input. The input desktop is a desktop on the
01678  *             window station associated with the logged-on user.
01679  * Parameters: DWORD dwFlags         flags to control interaction with other applications
01680  *             BOOL  fInherit        specifies whether returned handle is inheritable
01681  *             DWORD dwDesiredAccess specifies access of returned handle
01682  * Variables :
01683  * Result    : If the function succeeds, the return value is a handle of the
01684  *               desktop that receives user input.
01685  *             If the function fails, the return value is NULL. To get extended
01686  *               error information, call GetLastError.
01687  * Remark    :
01688  * Status    : UNTESTED STUB
01689  *
01690  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01691  *****************************************************************************/
01692 HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
01693                                    BOOL  fInherit,
01694                                    DWORD dwDesiredAccess)
01695 {
01696   dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
01697          dwFlags,
01698          fInherit,
01699          dwDesiredAccess));
01700 
01701   return (NULL);
01702 }
01703 /*****************************************************************************
01704  * Name      : HWINSTA WIN32API OpenWindowStationA
01705  * Purpose   : The OpenWindowStation function returns a handle to an existing
01706  *               window station.
01707  * Parameters: LPCTSTR lpszWinStaName name of the window station to open
01708  *             BOOL fInherit          specifies whether returned handle is inheritable
01709  *             DWORD dwDesiredAccess  specifies access of returned handle
01710  * Variables :
01711  * Result    : If the function succeeds, the return value is the handle to the
01712  *               specified window station.
01713  *             If the function fails, the return value is NULL. To get extended
01714  *               error information, call GetLastError.
01715  * Remark    :
01716  * Status    : UNTESTED STUB
01717  *
01718  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01719  *****************************************************************************/
01720 HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
01721                                        BOOL    fInherit,
01722                                        DWORD   dwDesiredAccess)
01723 {
01724   dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
01725          lpszWinStaName,
01726          fInherit,
01727          dwDesiredAccess));
01728 
01729   return (NULL);
01730 }
01731 /*****************************************************************************
01732  * Name      : HWINSTA WIN32API OpenWindowStationW
01733  * Purpose   : The OpenWindowStation function returns a handle to an existing
01734  *               window station.
01735  * Parameters: LPCTSTR lpszWinStaName name of the window station to open
01736  *             BOOL fInherit          specifies whether returned handle is inheritable
01737  *             DWORD dwDesiredAccess  specifies access of returned handle
01738  * Variables :
01739  * Result    : If the function succeeds, the return value is the handle to the
01740  *               specified window station.
01741  *             If the function fails, the return value is NULL. To get extended
01742  *               error information, call GetLastError.
01743 
01744 
01745  * Remark    :
01746  * Status    : UNTESTED STUB
01747  *
01748  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01749  *****************************************************************************/
01750 HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
01751                                        BOOL    fInherit,
01752                                        DWORD   dwDesiredAccess)
01753 {
01754   dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
01755          lpszWinStaName,
01756          fInherit,
01757          dwDesiredAccess));
01758 
01759   return (NULL);
01760 }
01761 /*****************************************************************************
01762  * Name      : BOOL WIN32API SetProcessWindowStation
01763  * Purpose   : The SetProcessWindowStation function assigns a window station
01764  *             to the calling process. This enables the process to access
01765  *             objects in the window station such as desktops, the clipboard,
01766  *             and global atoms. All subsequent operations on the window station
01767  *             use the access rights granted to hWinSta.
01768  * Parameters:
01769  * Variables :
01770  * Result    : If the function succeeds, the return value is TRUE.
01771  *             If the function fails, the return value is FALSE. To get extended
01772  *               error information, call GetLastError.
01773  * Remark    :
01774  * Status    : UNTESTED STUB
01775  *
01776  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01777  *****************************************************************************/
01778 BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
01779 {
01780   dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
01781          hWinSta));
01782 
01783   return (FALSE);
01784 }
01785 /*****************************************************************************
01786  * Name      : BOOL WIN32API SetThreadDesktop
01787  * Purpose   : The SetThreadDesktop function assigns a desktop to the calling
01788  *             thread. All subsequent operations on the desktop use the access
01789  *             rights granted to hDesk.
01790  * Parameters: HDESK hDesk handle of the desktop to assign to this thread
01791  * Variables :
01792  * Result    : If the function succeeds, the return value is TRUE.
01793  *             If the function fails, the return value is FALSE. To get extended
01794  *             error information, call GetLastError.
01795  * Remark    :
01796  * Status    : UNTESTED STUB
01797  *
01798  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01799  *****************************************************************************/
01800 BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
01801 {
01802   dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
01803          hDesktop));
01804 
01805   return (FALSE);
01806 }
01807 /*****************************************************************************
01808  * Name      : BOOL WIN32API SetUserObjectInformationA
01809  * Purpose   : The SetUserObjectInformation function sets information about a
01810  *             window station or desktop object.
01811  * Parameters: HANDLE hObject handle of the object for which to set information
01812  *             int    nIndex  type of information to set
01813  *             PVOID  lpvInfo points to a buffer that contains the information
01814  *             DWORD  cbInfo  size, in bytes, of lpvInfo buffer
01815  * Variables :
01816  * Result    : If the function succeeds, the return value is TRUE.
01817  *             If the function fails the return value is FALSE. To get extended
01818  *               error information, call GetLastError.
01819  * Remark    :
01820  * Status    : UNTESTED STUB
01821  *
01822  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01823  *****************************************************************************/
01824 BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
01825                                            int    nIndex,
01826                                            PVOID  lpvInfo,
01827                                            DWORD  cbInfo)
01828 {
01829   dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
01830            hObject,
01831            nIndex,
01832            lpvInfo,
01833            cbInfo));
01834 
01835   return (FALSE);
01836 }
01837 /*****************************************************************************
01838  * Name      : BOOL WIN32API SetUserObjectInformationW
01839  * Purpose   : The SetUserObjectInformation function sets information about a
01840  *             window station or desktop object.
01841  * Parameters: HANDLE hObject handle of the object for which to set information
01842  *             int    nIndex  type of information to set
01843  *             PVOID  lpvInfo points to a buffer that contains the information
01844  *             DWORD  cbInfo  size, in bytes, of lpvInfo buffer
01845  * Variables :
01846  * Result    : If the function succeeds, the return value is TRUE.
01847  *             If the function fails the return value is FALSE. To get extended
01848  *               error information, call GetLastError.
01849  * Remark    :
01850  * Status    : UNTESTED STUB
01851  *
01852  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01853  *****************************************************************************/
01854 BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
01855                                            int    nIndex,
01856                                            PVOID  lpvInfo,
01857                                            DWORD  cbInfo)
01858 {
01859   dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
01860            hObject,
01861            nIndex,
01862            lpvInfo,
01863            cbInfo));
01864 
01865   return (FALSE);
01866 }
01867 /*****************************************************************************
01868  * Name      : BOOL WIN32API SetUserObjectSecurity
01869  * Purpose   : The SetUserObjectSecurity function sets the security of a user
01870  *             object. This can be, for example, a window or a DDE conversation
01871  * Parameters: HANDLE  hObject           handle of user object
01872  *             SECURITY_INFORMATION * psi address of security information
01873  *             LPSECURITY_DESCRIPTOR  psd address of security descriptor
01874  * Variables :
01875  * Result    : If the function succeeds, the return value is TRUE.
01876  *             If the function fails, the return value is FALSE. To get extended
01877  *             error information, call GetLastError.
01878  * Remark    :
01879  * Status    : UNTESTED STUB
01880  *
01881  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01882  *****************************************************************************/
01883 BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
01884                                        PSECURITY_INFORMATION psi,
01885                                        PSECURITY_DESCRIPTOR  psd)
01886 {
01887   dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
01888            hObject,
01889            psi,
01890            psd));
01891 
01892   return (FALSE);
01893 }
01894 /*****************************************************************************
01895  * Name      : BOOL WIN32API SwitchDesktop
01896  * Purpose   : The SwitchDesktop function makes a desktop visible and activates
01897  *             it. This enables the desktop to receive input from the user. The
01898  *             calling process must have DESKTOP_SWITCHDESKTOP access to the
01899  *             desktop for the SwitchDesktop function to succeed.
01900  * Parameters:
01901  * Variables :
01902  * Result    : If the function succeeds, the return value is TRUE.
01903  *             If the function fails, the return value is FALSE. To get extended
01904  *               error information, call GetLastError.
01905  * Remark    :
01906  * Status    : UNTESTED STUB
01907  *
01908  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01909  *****************************************************************************/
01910 BOOL WIN32API SwitchDesktop(HDESK hDesktop)
01911 {
01912   dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
01913          hDesktop));
01914 
01915   return (FALSE);
01916 }
01917 
01918 /* Debugging Functions */
01919 
01920 /*****************************************************************************
01921  * Name      : VOID WIN32API SetDebugErrorLevel
01922  * Purpose   : The SetDebugErrorLevel function sets the minimum error level at
01923  *             which Windows will generate debugging events and pass them to a debugger.
01924  * Parameters: DWORD dwLevel debugging error level
01925  * Variables :
01926  * Result    :
01927  * Remark    :
01928  * Status    : UNTESTED STUB
01929  *
01930  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
01931  *****************************************************************************/
01932 VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
01933 {
01934   dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
01935          dwLevel));
01936 }
01937 
01938 /* Drag'n'drop */
01939 
01940 /*****************************************************************************
01941  * Name      : BOOL WIN32API DragObject
01942  * Purpose   : Unknown
01943  * Parameters: Unknown
01944  * Variables :
01945  * Result    :
01946  * Remark    :
01947  * Status    : UNTESTED UNKNOWN STUB
01948  *
01949  * Author    : Patrick Haller [Wed, 1998/06/16 11:55]
01950  *****************************************************************************/
01951 DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
01952 {
01953   dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
01954            x1,
01955            x2,
01956            x3,
01957            x4,
01958            x5));
01959 
01960   return (FALSE); /* default */
01961 }
01962 
01963 /* Unknown */
01964 
01965 /*****************************************************************************
01966  * Name      : BOOL WIN32API SetShellWindow
01967  * Purpose   : Unknown
01968  * Parameters: Unknown
01969  * Variables :
01970  * Result    :
01971  * Remark    :
01972  * Status    : UNTESTED UNKNOWN STUB
01973  *
01974  * Author    : Patrick Haller [Wed, 1998/06/16 11:55]
01975  *****************************************************************************/
01976 BOOL WIN32API SetShellWindow(DWORD x1)
01977 {
01978   dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
01979            x1));
01980 
01981   return (FALSE); /* default */
01982 }
01983 /*****************************************************************************
01984  * Name      : BOOL WIN32API PlaySoundEvent
01985  * Purpose   : Unknown
01986  * Parameters: Unknown
01987  * Variables :
01988  * Result    :
01989  * Remark    :
01990  * Status    : UNTESTED UNKNOWN STUB
01991  *
01992  * Author    : Patrick Haller [Wed, 1998/06/16 11:55]
01993  *****************************************************************************/
01994 BOOL WIN32API PlaySoundEvent(DWORD x1)
01995 {
01996   dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
01997            x1));
01998 
01999   return (FALSE); /* default */
02000 }
02001 /*****************************************************************************
02002  * Name      : BOOL WIN32API SetSysColorsTemp
02003  * Purpose   : Unknown
02004  * Parameters: Unknown
02005  * Variables :
02006  * Result    :
02007  * Remark    :
02008  * Status    : UNTESTED UNKNOWN STUB
02009  *
02010  * Author    : Patrick Haller [Wed, 1998/06/16 11:55]
02011  *****************************************************************************/
02012 BOOL WIN32API SetSysColorsTemp(void)
02013 {
02014   dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
02015 
02016   return (FALSE); /* default */
02017 }
02018 /*****************************************************************************
02019  * Name      : BOOL WIN32API RegisterNetworkCapabilities
02020  * Purpose   : Unknown
02021  * Parameters: Unknown
02022  * Variables :
02023  * Result    :
02024  * Remark    :
02025  * Status    : UNTESTED UNKNOWN STUB
02026  *
02027  * Author    : Patrick Haller [Wed, 1998/06/16 11:55]
02028  *****************************************************************************/
02029 BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
02030                                              DWORD x2)
02031 {
02032   dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
02033            x1,
02034            x2));
02035 
02036   return (FALSE); /* default */
02037 }
02038 /*****************************************************************************
02039  * Name      : BOOL WIN32API EndTask
02040  * Purpose   : Unknown
02041  * Parameters: Unknown
02042  * Variables :
02043  * Result    :
02044  * Remark    :
02045  * Status    : UNTESTED UNKNOWN STUB
02046  *
02047  * Author    : Patrick Haller [Wed, 1998/06/16 11:55]
02048  *****************************************************************************/
02049 BOOL WIN32API EndTask(DWORD x1,
02050                          DWORD x2,
02051                          DWORD x3)
02052 {
02053   dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
02054            x1,
02055            x2,
02056            x3));
02057 
02058   return (FALSE); /* default */
02059 }
02060 /*****************************************************************************
02061  * Name      : BOOL WIN32API GetNextQueueWindow
02062  * Purpose   : Unknown
02063  * Parameters: Unknown
02064  * Variables :
02065  * Result    :
02066  * Remark    :
02067  * Status    : UNTESTED UNKNOWN STUB
02068  *
02069  * Author    : Patrick Haller [Wed, 1998/06/16 11:55]
02070  *****************************************************************************/
02071 BOOL WIN32API GetNextQueueWindow(DWORD x1,
02072                                     DWORD x2)
02073 {
02074   dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
02075            x1,
02076            x2));
02077 
02078   return (FALSE); /* default */
02079 }
02080 /*****************************************************************************
02081  * Name      : BOOL WIN32API YieldTask
02082  * Purpose   : Unknown
02083  * Parameters: Unknown
02084  * Variables :
02085  * Result    :
02086  * Remark    :
02087  * Status    : UNTESTED UNKNOWN STUB
02088  *
02089  * Author    : Patrick Haller [Wed, 1998/06/16 11:55]
02090  *****************************************************************************/
02091 BOOL WIN32API YieldTask(void)
02092 {
02093   dprintf(("USER32: YieldTask() not implemented.\n"));
02094 
02095   return (FALSE); /* default */
02096 }
02097 /*****************************************************************************
02098  * Name      : BOOL WIN32API WinOldAppHackoMatic
02099  * Purpose   : Unknown
02100  * Parameters: Unknown
02101  * Variables :
02102  * Result    :
02103  * Remark    :
02104  * Status    : UNTESTED UNKNOWN STUB
02105  *
02106  * Author    : Patrick Haller [Wed, 1998/06/16 11:55]
02107  *****************************************************************************/
02108 BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
02109 {
02110   dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
02111            x1));
02112 
02113   return (FALSE); /* default */
02114 }
02115 /*****************************************************************************
02116  * Name      : BOOL WIN32API RegisterSystemThread
02117  * Purpose   : Unknown
02118  * Parameters: Unknown
02119  * Variables :
02120  * Result    :
02121  * Remark    :
02122  * Status    : UNTESTED UNKNOWN STUB
02123  *
02124  * Author    : Patrick Haller [Wed, 1998/06/16 11:55]
02125  *****************************************************************************/
02126 BOOL WIN32API RegisterSystemThread(DWORD x1,
02127                                       DWORD x2)
02128 {
02129   dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
02130            x1,
02131            x2));
02132 
02133   return (FALSE); /* default */
02134 }
02135 /*****************************************************************************
02136  * Name      : BOOL WIN32API IsHungThread
02137  * Purpose   : Unknown
02138  * Parameters: Unknown
02139  * Variables :
02140  * Result    :
02141  * Remark    :
02142  * Status    : UNTESTED UNKNOWN STUB
02143  *
02144  * Author    : Patrick Haller [Wed, 1998/06/16 11:55]
02145  *****************************************************************************/
02146 BOOL WIN32API IsHungThread(DWORD x1)
02147 {
02148   dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
02149            x1));
02150 
02151   return (FALSE); /* default */
02152 }
02153 /*****************************************************************************
02154  * Name      : BOOL WIN32API UserSignalProc
02155  * Purpose   : Unknown
02156  * Parameters: Unknown
02157  * Variables :
02158  * Result    :
02159  * Remark    :
02160  * Status    : UNTESTED UNKNOWN STUB
02161  *
02162  * Author    : Patrick Haller [Wed, 1998/06/16 11:55]
02163  *****************************************************************************/
02164 BOOL WIN32API UserSignalProc(DWORD x1,
02165                                 DWORD x2,
02166                                 DWORD x3,
02167                                 DWORD x4)
02168 {
02169   dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
02170            x1,
02171            x2,
02172            x3,
02173            x4));
02174 
02175   return (FALSE); /* default */
02176 }
02177 /*****************************************************************************
02178  * Name      : BOOL WIN32API GetShellWindow
02179  * Purpose   : Unknown
02180  * Parameters: Unknown
02181  * Variables :
02182  * Result    :
02183  * Remark    :
02184  * Status    : UNTESTED UNKNOWN STUB
02185  *
02186  * Author    : Patrick Haller [Wed, 1998/06/16 11:55]
02187  *****************************************************************************/
02188 HWND WIN32API GetShellWindow(void)
02189 {
02190   dprintf(("USER32: GetShellWindow() not implemented.\n"));
02191 
02192   return (0); /* default */
02193 }
02194 /***********************************************************************
02195  *           RegisterTasklist32                [USER32.436]
02196  */
02197 DWORD WIN32API RegisterTasklist (DWORD x)
02198 {
02199     dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
02200              x));
02201 
02202     return TRUE;
02203 }
02204 /***********************************************************************
02205  *           SetLogonNotifyWindow   (USER32.486)
02206  */
02207 DWORD WIN32API SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd)
02208 {
02209   dprintf(("USER32: SetLogonNotifyWindow - empty stub!"));
02210 
02211   return 1;
02212 }
02213 
02214 
02215 DWORD WIN32API GetGUIThreadInfo(DWORD arg1, DWORD arg2)
02216 {
02217   dprintf(("USER32: GetGUIThreadInfo %x %x - empty stub!!", arg1, arg2));
02218 
02219   return 0;
02220 }

Generated on Wed Jan 23 23:17:44 2002 for ODIN-user32 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001