| 1 | /* $Id: user32.cpp,v 1.122 2002-02-18 22:07:00 phaller Exp $ */ | 
|---|
| 2 |  | 
|---|
| 3 | /* | 
|---|
| 4 | * Win32 misc user32 API functions for OS/2 | 
|---|
| 5 | * | 
|---|
| 6 | * Copyright 1998 Sander van Leeuwen | 
|---|
| 7 | * Copyright 1998 Patrick Haller | 
|---|
| 8 | * Copyright 1998 Peter Fitzsimmons | 
|---|
| 9 | * Copyright 1999 Christoph Bratschi | 
|---|
| 10 | * Copyright 1999 Daniela Engert (dani@ngrt.de) | 
|---|
| 11 | * | 
|---|
| 12 | * Partly based on Wine code (windows\sysparams.c: SystemParametersInfoA) | 
|---|
| 13 | * | 
|---|
| 14 | * Copyright 1994 Alexandre Julliard | 
|---|
| 15 | * | 
|---|
| 16 | * | 
|---|
| 17 | * Project Odin Software License can be found in LICENSE.TXT | 
|---|
| 18 | * | 
|---|
| 19 | */ | 
|---|
| 20 | /***************************************************************************** | 
|---|
| 21 | * Name      : USER32.CPP | 
|---|
| 22 | * Purpose   : This module maps all Win32 functions contained in USER32.DLL | 
|---|
| 23 | *             to their OS/2-specific counterparts as far as possible. | 
|---|
| 24 | *****************************************************************************/ | 
|---|
| 25 |  | 
|---|
| 26 | //Attention: many functions belong to other subsystems, move them to their | 
|---|
| 27 | //           right place! | 
|---|
| 28 |  | 
|---|
| 29 | #include <odin.h> | 
|---|
| 30 | #include <odinwrap.h> | 
|---|
| 31 | #include <os2sel.h> | 
|---|
| 32 |  | 
|---|
| 33 | #include <os2win.h> | 
|---|
| 34 | #include <misc.h> | 
|---|
| 35 | #include <winuser32.h> | 
|---|
| 36 |  | 
|---|
| 37 | #include "user32.h" | 
|---|
| 38 | #include <winicon.h> | 
|---|
| 39 | #include "syscolor.h" | 
|---|
| 40 | #include "pmwindow.h" | 
|---|
| 41 | #include "oslibgdi.h" | 
|---|
| 42 | #include "oslibwin.h" | 
|---|
| 43 | #include "oslibprf.h" | 
|---|
| 44 |  | 
|---|
| 45 | #include <wchar.h> | 
|---|
| 46 | #include <stdlib.h> | 
|---|
| 47 | #include <string.h> | 
|---|
| 48 | //#include <oslibwin.h> | 
|---|
| 49 | #include <win32wnd.h> | 
|---|
| 50 | #include <winuser.h> | 
|---|
| 51 | #include "initterm.h" | 
|---|
| 52 |  | 
|---|
| 53 | #define DBG_LOCALLOG    DBG_user32 | 
|---|
| 54 | #include "dbglocal.h" | 
|---|
| 55 |  | 
|---|
| 56 | //undocumented stuff | 
|---|
| 57 | // WIN32API ClientThreadConnect | 
|---|
| 58 | // WIN32API DragObject | 
|---|
| 59 | // WIN32API DrawFrame | 
|---|
| 60 | // WIN32API EditWndProc | 
|---|
| 61 | // WIN32API EndTask | 
|---|
| 62 | // WIN32API GetInputDesktop | 
|---|
| 63 | // WIN32API GetNextQueueWindow | 
|---|
| 64 | // WIN32API GetShellWindow | 
|---|
| 65 | // WIN32API InitSharedTable | 
|---|
| 66 | // WIN32API InitTask | 
|---|
| 67 | // WIN32API IsHungThread | 
|---|
| 68 | // WIN32API LockWindowStation | 
|---|
| 69 | // WIN32API ModifyAccess | 
|---|
| 70 | // WIN32API PlaySoundEvent | 
|---|
| 71 | // WIN32API RegisterLogonProcess | 
|---|
| 72 | // WIN32API RegisterNetworkCapabilities | 
|---|
| 73 | // WIN32API RegisterSystemThread | 
|---|
| 74 | // WIN32API SetDeskWallpaper | 
|---|
| 75 | // WIN32API SetDesktopBitmap | 
|---|
| 76 | // WIN32API SetInternalWindowPos | 
|---|
| 77 | // WIN32API SetLogonNotifyWindow | 
|---|
| 78 | // WIN32API SetShellWindow | 
|---|
| 79 | // WIN32API SetSysColorsTemp | 
|---|
| 80 | // WIN32API SetWindowFullScreenState | 
|---|
| 81 | // WIN32API SwitchToThisWindow | 
|---|
| 82 | // WIN32API SysErrorBox | 
|---|
| 83 | // WIN32API UnlockWindowStation | 
|---|
| 84 | // WIN32API UserClientDllInitialize | 
|---|
| 85 | // WIN32API UserSignalProc | 
|---|
| 86 | // WIN32API WinOldAppHackoMatic | 
|---|
| 87 | // WIN32API WNDPROC_CALLBACK | 
|---|
| 88 | // WIN32API YieldTask | 
|---|
| 89 |  | 
|---|
| 90 | ODINDEBUGCHANNEL(USER32-USER32) | 
|---|
| 91 |  | 
|---|
| 92 |  | 
|---|
| 93 | /* Coordinate Transformation */ | 
|---|
| 94 |  | 
|---|
| 95 | /* Rectangle Functions - parts from wine/windows/rect.c */ | 
|---|
| 96 |  | 
|---|
| 97 | BOOL WIN32API CopyRect( PRECT lprcDst, const RECT * lprcSrc) | 
|---|
| 98 | { | 
|---|
| 99 | dprintf2(("USER32:  CopyRect\n")); | 
|---|
| 100 | if (!lprcDst || !lprcSrc) { | 
|---|
| 101 | SetLastError(ERROR_INVALID_PARAMETER); | 
|---|
| 102 | return FALSE; | 
|---|
| 103 | } | 
|---|
| 104 |  | 
|---|
| 105 | memcpy(lprcDst,lprcSrc,sizeof(RECT)); | 
|---|
| 106 |  | 
|---|
| 107 | return TRUE; | 
|---|
| 108 | } | 
|---|
| 109 | //****************************************************************************** | 
|---|
| 110 | //****************************************************************************** | 
|---|
| 111 | BOOL WIN32API EqualRect( const RECT *lprc1, const RECT *lprc2) | 
|---|
| 112 | { | 
|---|
| 113 | dprintf2(("USER32:  EqualRect\n")); | 
|---|
| 114 | if (!lprc1 || !lprc2) | 
|---|
| 115 | { | 
|---|
| 116 | SetLastError(ERROR_INVALID_PARAMETER); | 
|---|
| 117 | return FALSE; | 
|---|
| 118 | } | 
|---|
| 119 |  | 
|---|
| 120 | return (lprc1->left == lprc2->left && | 
|---|
| 121 | lprc1->right == lprc2->right && | 
|---|
| 122 | lprc1->top == lprc2->top && | 
|---|
| 123 | lprc1->bottom == lprc2->bottom); | 
|---|
| 124 | } | 
|---|
| 125 | //****************************************************************************** | 
|---|
| 126 | //****************************************************************************** | 
|---|
| 127 | BOOL WIN32API InflateRect( PRECT lprc, int dx, int  dy) | 
|---|
| 128 | { | 
|---|
| 129 | dprintf2(("USER32: InflateRect (%d,%d)(%d,%d) %d,%d", lprc->left, lprc->top, lprc->right, lprc->bottom, dx, dy)); | 
|---|
| 130 | if (!lprc) | 
|---|
| 131 | { | 
|---|
| 132 | SetLastError(ERROR_INVALID_PARAMETER); | 
|---|
| 133 | return FALSE; | 
|---|
| 134 | } | 
|---|
| 135 |  | 
|---|
| 136 | lprc->left   -= dx; | 
|---|
| 137 | lprc->right  += dx; | 
|---|
| 138 | lprc->top    -= dy; | 
|---|
| 139 | lprc->bottom += dy; | 
|---|
| 140 |  | 
|---|
| 141 | return TRUE; | 
|---|
| 142 | } | 
|---|
| 143 | //****************************************************************************** | 
|---|
| 144 | //****************************************************************************** | 
|---|
| 145 | BOOL WIN32API IntersectRect( PRECT lprcDst, const RECT * lprcSrc1, const RECT * lprcSrc2) | 
|---|
| 146 | { | 
|---|
| 147 | 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)); | 
|---|
| 148 | if (!lprcSrc1 || !lprcSrc2) | 
|---|
| 149 | { | 
|---|
| 150 | SetLastError(ERROR_INVALID_PARAMETER); | 
|---|
| 151 | return FALSE; | 
|---|
| 152 | } | 
|---|
| 153 |  | 
|---|
| 154 | if (IsRectEmpty(lprcSrc1) || IsRectEmpty(lprcSrc2) || | 
|---|
| 155 | (lprcSrc1->left >= lprcSrc2->right) || (lprcSrc2->left >= lprcSrc1->right) || | 
|---|
| 156 | (lprcSrc1->top >= lprcSrc2->bottom) || (lprcSrc2->top >= lprcSrc1->bottom)) | 
|---|
| 157 | { | 
|---|
| 158 | //SvL: NT doesn't set the last error here | 
|---|
| 159 | //SetLastError(ERROR_INVALID_PARAMETER); | 
|---|
| 160 | if (lprcDst) SetRectEmpty(lprcDst); | 
|---|
| 161 | return FALSE; | 
|---|
| 162 | } | 
|---|
| 163 | if (lprcDst) | 
|---|
| 164 | { | 
|---|
| 165 | lprcDst->left   = MAX(lprcSrc1->left,lprcSrc2->left); | 
|---|
| 166 | lprcDst->right  = MIN(lprcSrc1->right,lprcSrc2->right); | 
|---|
| 167 | lprcDst->top    = MAX(lprcSrc1->top,lprcSrc2->top); | 
|---|
| 168 | lprcDst->bottom = MIN(lprcSrc1->bottom,lprcSrc2->bottom); | 
|---|
| 169 | } | 
|---|
| 170 |  | 
|---|
| 171 | return TRUE; | 
|---|
| 172 | } | 
|---|
| 173 | //****************************************************************************** | 
|---|
| 174 | //****************************************************************************** | 
|---|
| 175 | BOOL WIN32API IsRectEmpty( const RECT * lprc) | 
|---|
| 176 | { | 
|---|
| 177 | if (!lprc) | 
|---|
| 178 | { | 
|---|
| 179 | SetLastError(ERROR_INVALID_PARAMETER); | 
|---|
| 180 | return FALSE; | 
|---|
| 181 | } | 
|---|
| 182 |  | 
|---|
| 183 | return (lprc->left == lprc->right || lprc->top == lprc->bottom); | 
|---|
| 184 | } | 
|---|
| 185 | //****************************************************************************** | 
|---|
| 186 | //****************************************************************************** | 
|---|
| 187 | BOOL WIN32API OffsetRect( PRECT lprc, int x, int  y) | 
|---|
| 188 | { | 
|---|
| 189 | dprintf2(("USER32: OffsetRect (%d,%d)(%d,%d) %d %d", lprc->left, lprc->top, lprc->right, lprc->bottom, x, y)); | 
|---|
| 190 | if (!lprc) | 
|---|
| 191 | { | 
|---|
| 192 | SetLastError(ERROR_INVALID_PARAMETER); | 
|---|
| 193 | return FALSE; | 
|---|
| 194 | } | 
|---|
| 195 |  | 
|---|
| 196 | lprc->left   += x; | 
|---|
| 197 | lprc->right  += x; | 
|---|
| 198 | lprc->top    += y; | 
|---|
| 199 | lprc->bottom += y; | 
|---|
| 200 |  | 
|---|
| 201 | return TRUE; | 
|---|
| 202 | } | 
|---|
| 203 | //****************************************************************************** | 
|---|
| 204 | //****************************************************************************** | 
|---|
| 205 | BOOL WIN32API PtInRect( const RECT *lprc, POINT pt) | 
|---|
| 206 | { | 
|---|
| 207 | dprintf2(("USER32: PtInRect (%d,%d)(%d,%d) (%d,%d)", lprc->left, lprc->top, lprc->right, lprc->bottom, pt.x, pt.y)); | 
|---|
| 208 | if (!lprc) | 
|---|
| 209 | { | 
|---|
| 210 | SetLastError(ERROR_INVALID_PARAMETER); | 
|---|
| 211 | return FALSE; | 
|---|
| 212 | } | 
|---|
| 213 |  | 
|---|
| 214 | return (pt.x >= lprc->left && | 
|---|
| 215 | pt.x < lprc->right && | 
|---|
| 216 | pt.y >= lprc->top && | 
|---|
| 217 | pt.y < lprc->bottom); | 
|---|
| 218 | } | 
|---|
| 219 | //****************************************************************************** | 
|---|
| 220 | //****************************************************************************** | 
|---|
| 221 | BOOL WIN32API SetRect( PRECT lprc, int nLeft, int nTop, int nRight, int  nBottom) | 
|---|
| 222 | { | 
|---|
| 223 | if (!lprc) | 
|---|
| 224 | { | 
|---|
| 225 | SetLastError(ERROR_INVALID_PARAMETER); | 
|---|
| 226 | return FALSE; | 
|---|
| 227 | } | 
|---|
| 228 |  | 
|---|
| 229 | lprc->left   = nLeft; | 
|---|
| 230 | lprc->top    = nTop; | 
|---|
| 231 | lprc->right  = nRight; | 
|---|
| 232 | lprc->bottom = nBottom; | 
|---|
| 233 |  | 
|---|
| 234 | return TRUE; | 
|---|
| 235 | } | 
|---|
| 236 | //****************************************************************************** | 
|---|
| 237 | //****************************************************************************** | 
|---|
| 238 | BOOL WIN32API SetRectEmpty( PRECT lprc) | 
|---|
| 239 | { | 
|---|
| 240 | if (!lprc) | 
|---|
| 241 | { | 
|---|
| 242 | SetLastError(ERROR_INVALID_PARAMETER); | 
|---|
| 243 | return FALSE; | 
|---|
| 244 | } | 
|---|
| 245 |  | 
|---|
| 246 | lprc->left = lprc->right = lprc->top = lprc->bottom = 0; | 
|---|
| 247 |  | 
|---|
| 248 | return TRUE; | 
|---|
| 249 | } | 
|---|
| 250 | //****************************************************************************** | 
|---|
| 251 | //****************************************************************************** | 
|---|
| 252 | BOOL WIN32API SubtractRect( PRECT lprcDest, const RECT * lprcSrc1, const RECT * lprcSrc2) | 
|---|
| 253 | { | 
|---|
| 254 | dprintf2(("USER32:  SubtractRect")); | 
|---|
| 255 | RECT tmp; | 
|---|
| 256 |  | 
|---|
| 257 | if (!lprcDest || !lprcSrc1 || !lprcSrc2) | 
|---|
| 258 | { | 
|---|
| 259 | SetLastError(ERROR_INVALID_PARAMETER); | 
|---|
| 260 | return FALSE; | 
|---|
| 261 | } | 
|---|
| 262 |  | 
|---|
| 263 | if (IsRectEmpty(lprcSrc1)) | 
|---|
| 264 | { | 
|---|
| 265 | SetLastError(ERROR_INVALID_PARAMETER); | 
|---|
| 266 | SetRectEmpty(lprcDest); | 
|---|
| 267 | return FALSE; | 
|---|
| 268 | } | 
|---|
| 269 | *lprcDest = *lprcSrc1; | 
|---|
| 270 | if (IntersectRect(&tmp,lprcSrc1,lprcSrc2)) | 
|---|
| 271 | { | 
|---|
| 272 | if (EqualRect(&tmp,lprcDest)) | 
|---|
| 273 | { | 
|---|
| 274 | SetRectEmpty(lprcDest); | 
|---|
| 275 | return FALSE; | 
|---|
| 276 | } | 
|---|
| 277 | if ((tmp.top == lprcDest->top) && (tmp.bottom == lprcDest->bottom)) | 
|---|
| 278 | { | 
|---|
| 279 | if (tmp.left == lprcDest->left) lprcDest->left = tmp.right; | 
|---|
| 280 | else if (tmp.right == lprcDest->right) lprcDest->right = tmp.left; | 
|---|
| 281 | } | 
|---|
| 282 | else if ((tmp.left == lprcDest->left) && (tmp.right == lprcDest->right)) | 
|---|
| 283 | { | 
|---|
| 284 | if (tmp.top == lprcDest->top) lprcDest->top = tmp.bottom; | 
|---|
| 285 | else if (tmp.bottom == lprcDest->bottom) lprcDest->bottom = tmp.top; | 
|---|
| 286 | } | 
|---|
| 287 | } | 
|---|
| 288 |  | 
|---|
| 289 | return TRUE; | 
|---|
| 290 | } | 
|---|
| 291 | //****************************************************************************** | 
|---|
| 292 | //****************************************************************************** | 
|---|
| 293 | BOOL WIN32API UnionRect( PRECT lprcDst, const RECT *lprcSrc1, const RECT *lprcSrc2) | 
|---|
| 294 | { | 
|---|
| 295 | dprintf2(("USER32:  UnionRect\n")); | 
|---|
| 296 | if (!lprcDst || !lprcSrc1 || !lprcSrc2) | 
|---|
| 297 | { | 
|---|
| 298 | SetLastError(ERROR_INVALID_PARAMETER); | 
|---|
| 299 | return FALSE; | 
|---|
| 300 | } | 
|---|
| 301 |  | 
|---|
| 302 | if (IsRectEmpty(lprcSrc1)) | 
|---|
| 303 | { | 
|---|
| 304 | if (IsRectEmpty(lprcSrc2)) | 
|---|
| 305 | { | 
|---|
| 306 | SetLastError(ERROR_INVALID_PARAMETER); | 
|---|
| 307 | SetRectEmpty(lprcDst); | 
|---|
| 308 | return FALSE; | 
|---|
| 309 | } | 
|---|
| 310 | else *lprcDst = *lprcSrc2; | 
|---|
| 311 | } | 
|---|
| 312 | else | 
|---|
| 313 | { | 
|---|
| 314 | if (IsRectEmpty(lprcSrc2)) *lprcDst = *lprcSrc1; | 
|---|
| 315 | else | 
|---|
| 316 | { | 
|---|
| 317 | lprcDst->left   = MIN(lprcSrc1->left,lprcSrc2->left); | 
|---|
| 318 | lprcDst->right  = MAX(lprcSrc1->right,lprcSrc2->right); | 
|---|
| 319 | lprcDst->top    = MIN(lprcSrc1->top,lprcSrc2->top); | 
|---|
| 320 | lprcDst->bottom = MAX(lprcSrc1->bottom,lprcSrc2->bottom); | 
|---|
| 321 | } | 
|---|
| 322 | } | 
|---|
| 323 |  | 
|---|
| 324 | return TRUE; | 
|---|
| 325 | } | 
|---|
| 326 |  | 
|---|
| 327 | /* Mouse Input Functions */ | 
|---|
| 328 |  | 
|---|
| 329 | /* Error Functions */ | 
|---|
| 330 |  | 
|---|
| 331 | /***************************************************************************** | 
|---|
| 332 | * Name      : ExitWindowsEx | 
|---|
| 333 | * Purpose   : Shutdown System | 
|---|
| 334 | * Parameters: UINT  uFlags | 
|---|
| 335 | *             DWORD dwReserved | 
|---|
| 336 | * Variables : | 
|---|
| 337 | * Result    : TRUE / FALSE | 
|---|
| 338 | * Remark    : | 
|---|
| 339 | * Status    : | 
|---|
| 340 | * | 
|---|
| 341 | * Author    : Patrick Haller [Tue, 1999/10/20 21:24] | 
|---|
| 342 | *****************************************************************************/ | 
|---|
| 343 |  | 
|---|
| 344 | BOOL WIN32API ExitWindowsEx(UINT uFlags, DWORD dwReserved) | 
|---|
| 345 | { | 
|---|
| 346 | int rc = MessageBoxA(HWND_DESKTOP, | 
|---|
| 347 | "Are you sure you want to shutdown the OS/2 system?", | 
|---|
| 348 | "Shutdown ...", | 
|---|
| 349 | MB_YESNOCANCEL | MB_ICONQUESTION); | 
|---|
| 350 | switch (rc) | 
|---|
| 351 | { | 
|---|
| 352 | case IDCANCEL: return (FALSE); | 
|---|
| 353 | case IDYES:    break; | 
|---|
| 354 | case IDNO: | 
|---|
| 355 | dprintf(("no shutdown!\n")); | 
|---|
| 356 | return TRUE; | 
|---|
| 357 | } | 
|---|
| 358 |  | 
|---|
| 359 | return O32_ExitWindowsEx(uFlags,dwReserved); | 
|---|
| 360 | } | 
|---|
| 361 |  | 
|---|
| 362 |  | 
|---|
| 363 | //****************************************************************************** | 
|---|
| 364 | //****************************************************************************** | 
|---|
| 365 | BOOL WIN32API MessageBeep( UINT uType) | 
|---|
| 366 | { | 
|---|
| 367 | INT flStyle; | 
|---|
| 368 |  | 
|---|
| 369 | dprintf(("USER32:  MessageBeep\n")); | 
|---|
| 370 |  | 
|---|
| 371 | switch (uType) | 
|---|
| 372 | { | 
|---|
| 373 | case 0xFFFFFFFF: | 
|---|
| 374 | Beep(500,50); | 
|---|
| 375 | return TRUE; | 
|---|
| 376 | case MB_ICONASTERISK: | 
|---|
| 377 | flStyle = WAOS_NOTE; | 
|---|
| 378 | break; | 
|---|
| 379 | case MB_ICONEXCLAMATION: | 
|---|
| 380 | flStyle = WAOS_WARNING; | 
|---|
| 381 | break; | 
|---|
| 382 | case MB_ICONHAND: | 
|---|
| 383 | case MB_ICONQUESTION: | 
|---|
| 384 | case MB_OK: | 
|---|
| 385 | flStyle = WAOS_NOTE; | 
|---|
| 386 | break; | 
|---|
| 387 | default: | 
|---|
| 388 | flStyle = WAOS_ERROR; //CB: should be right | 
|---|
| 389 | break; | 
|---|
| 390 | } | 
|---|
| 391 | return OSLibWinAlarm(OSLIB_HWND_DESKTOP,flStyle); | 
|---|
| 392 | } | 
|---|
| 393 | //****************************************************************************** | 
|---|
| 394 | //2nd parameter not used according to SDK (yet?) | 
|---|
| 395 | //****************************************************************************** | 
|---|
| 396 | VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType) | 
|---|
| 397 | { | 
|---|
| 398 | dprintf(("USER32: SetLastErrorEx %x %x", dwErrCode, dwType)); | 
|---|
| 399 | SetLastError(dwErrCode); | 
|---|
| 400 | } | 
|---|
| 401 |  | 
|---|
| 402 | /* Accessibility Functions */ | 
|---|
| 403 |  | 
|---|
| 404 | int WIN32API GetSystemMetrics(int nIndex) | 
|---|
| 405 | { | 
|---|
| 406 | int rc = 0; | 
|---|
| 407 |  | 
|---|
| 408 | switch(nIndex) { | 
|---|
| 409 | case SM_CXSCREEN: | 
|---|
| 410 | rc = ScreenWidth; | 
|---|
| 411 | break; | 
|---|
| 412 |  | 
|---|
| 413 | case SM_CYSCREEN: | 
|---|
| 414 | rc = ScreenHeight; | 
|---|
| 415 | break; | 
|---|
| 416 |  | 
|---|
| 417 | case SM_CXVSCROLL: | 
|---|
| 418 | rc = OSLibWinQuerySysValue(SVOS_CXVSCROLL); | 
|---|
| 419 | break; | 
|---|
| 420 |  | 
|---|
| 421 | case SM_CYHSCROLL: | 
|---|
| 422 | rc = OSLibWinQuerySysValue(SVOS_CYHSCROLL); | 
|---|
| 423 | break; | 
|---|
| 424 |  | 
|---|
| 425 | case SM_CYCAPTION: | 
|---|
| 426 | if(fOS2Look) { | 
|---|
| 427 | rc = OSLibWinQuerySysValue(SVOS_CYTITLEBAR); | 
|---|
| 428 | } | 
|---|
| 429 | else rc = 19; | 
|---|
| 430 | break; | 
|---|
| 431 |  | 
|---|
| 432 | case SM_CXBORDER: | 
|---|
| 433 | case SM_CYBORDER: | 
|---|
| 434 | rc = 1; | 
|---|
| 435 | break; | 
|---|
| 436 |  | 
|---|
| 437 | case SM_CXDLGFRAME: | 
|---|
| 438 | case SM_CYDLGFRAME: | 
|---|
| 439 | rc = 3; | 
|---|
| 440 | break; | 
|---|
| 441 |  | 
|---|
| 442 | case SM_CYMENU: | 
|---|
| 443 | case SM_CXMENUSIZE: | 
|---|
| 444 | case SM_CYMENUSIZE: | 
|---|
| 445 | if(fOS2Look) { | 
|---|
| 446 | rc = OSLibWinQuerySysValue(SVOS_CYMENU); | 
|---|
| 447 | } | 
|---|
| 448 | else rc = 19; | 
|---|
| 449 | break; | 
|---|
| 450 |  | 
|---|
| 451 | case SM_CXSIZE: | 
|---|
| 452 | case SM_CYSIZE: | 
|---|
| 453 | rc = GetSystemMetrics(SM_CYCAPTION)-2; | 
|---|
| 454 | break; | 
|---|
| 455 |  | 
|---|
| 456 | case SM_CXFRAME: | 
|---|
| 457 | case SM_CYFRAME: | 
|---|
| 458 | rc = 4; | 
|---|
| 459 | break; | 
|---|
| 460 |  | 
|---|
| 461 | case SM_CXEDGE: | 
|---|
| 462 | case SM_CYEDGE: | 
|---|
| 463 | rc = 2; | 
|---|
| 464 | break; | 
|---|
| 465 |  | 
|---|
| 466 | case SM_CXMINSPACING: | 
|---|
| 467 | rc = 160; | 
|---|
| 468 | break; | 
|---|
| 469 |  | 
|---|
| 470 | case SM_CYMINSPACING: | 
|---|
| 471 | rc = 24; | 
|---|
| 472 | break; | 
|---|
| 473 |  | 
|---|
| 474 | case SM_CXSMICON: | 
|---|
| 475 | case SM_CYSMICON: | 
|---|
| 476 | rc = 16; | 
|---|
| 477 | break; | 
|---|
| 478 |  | 
|---|
| 479 | case SM_CYSMCAPTION: | 
|---|
| 480 | rc = 16; | 
|---|
| 481 | break; | 
|---|
| 482 |  | 
|---|
| 483 | case SM_CXSMSIZE: | 
|---|
| 484 | case SM_CYSMSIZE: | 
|---|
| 485 | rc = 15; | 
|---|
| 486 | break; | 
|---|
| 487 |  | 
|---|
| 488 | //CB: todo: add missing metrics | 
|---|
| 489 |  | 
|---|
| 490 | case SM_CXICONSPACING: //TODO: size of grid cell for large icons | 
|---|
| 491 | rc = OSLibWinQuerySysValue(SVOS_CXICON); | 
|---|
| 492 | //CB: return standard windows icon size? | 
|---|
| 493 | //rc = 32; | 
|---|
| 494 | break; | 
|---|
| 495 | case SM_CYICONSPACING: | 
|---|
| 496 | rc = OSLibWinQuerySysValue(SVOS_CYICON); | 
|---|
| 497 | //read SM_CXICONSPACING comment | 
|---|
| 498 | //rc = 32; | 
|---|
| 499 | break; | 
|---|
| 500 | case SM_PENWINDOWS: | 
|---|
| 501 | rc = FALSE; | 
|---|
| 502 | break; | 
|---|
| 503 | case SM_DBCSENABLED: | 
|---|
| 504 | rc = FALSE; | 
|---|
| 505 | break; | 
|---|
| 506 | case SM_CXICON: | 
|---|
| 507 | case SM_CYICON: | 
|---|
| 508 | rc = 32;  //CB: Win32: only 32x32, OS/2 32x32/40x40 | 
|---|
| 509 | //    we must implement 32x32 for all screen resolutions | 
|---|
| 510 | break; | 
|---|
| 511 | case SM_ARRANGE: | 
|---|
| 512 | rc = ARW_BOTTOMLEFT | ARW_LEFT; | 
|---|
| 513 | break; | 
|---|
| 514 | case SM_CXMINIMIZED: | 
|---|
| 515 | break; | 
|---|
| 516 | case SM_CYMINIMIZED: | 
|---|
| 517 | break; | 
|---|
| 518 |  | 
|---|
| 519 | case SM_CXMINTRACK: | 
|---|
| 520 | case SM_CXMIN: | 
|---|
| 521 | rc = 112; | 
|---|
| 522 | break; | 
|---|
| 523 |  | 
|---|
| 524 | case SM_CYMINTRACK: | 
|---|
| 525 | case SM_CYMIN: | 
|---|
| 526 | rc = 27; | 
|---|
| 527 | break; | 
|---|
| 528 |  | 
|---|
| 529 | case SM_CXMAXTRACK: //max window size | 
|---|
| 530 | case SM_CXMAXIMIZED:    //max toplevel window size | 
|---|
| 531 | rc = OSLibWinQuerySysValue(SVOS_CXSCREEN); | 
|---|
| 532 | break; | 
|---|
| 533 |  | 
|---|
| 534 | case SM_CYMAXTRACK: | 
|---|
| 535 | case SM_CYMAXIMIZED: | 
|---|
| 536 | rc = OSLibWinQuerySysValue(SVOS_CYSCREEN); | 
|---|
| 537 | break; | 
|---|
| 538 |  | 
|---|
| 539 | case SM_NETWORK: | 
|---|
| 540 | rc = 0x01;  //TODO: default = yes | 
|---|
| 541 | break; | 
|---|
| 542 | case SM_CLEANBOOT: | 
|---|
| 543 | rc = 0;     //normal boot | 
|---|
| 544 | break; | 
|---|
| 545 | case SM_CXDRAG:     //nr of pixels before drag becomes a real one | 
|---|
| 546 | rc = 2; | 
|---|
| 547 | break; | 
|---|
| 548 | case SM_CYDRAG: | 
|---|
| 549 | rc = 2; | 
|---|
| 550 | break; | 
|---|
| 551 | case SM_SHOWSOUNDS: //show instead of play sound | 
|---|
| 552 | rc = FALSE; | 
|---|
| 553 | break; | 
|---|
| 554 | case SM_CXMENUCHECK: | 
|---|
| 555 | rc = 4;     //TODO | 
|---|
| 556 | break; | 
|---|
| 557 | case SM_CYMENUCHECK: | 
|---|
| 558 | rc = OSLibWinQuerySysValue(SVOS_CYMENU); | 
|---|
| 559 | break; | 
|---|
| 560 | case SM_SLOWMACHINE: | 
|---|
| 561 | rc = FALSE; //even a slow machine is fast with OS/2 :) | 
|---|
| 562 | break; | 
|---|
| 563 | case SM_MIDEASTENABLED: | 
|---|
| 564 | rc = FALSE; | 
|---|
| 565 | break; | 
|---|
| 566 | case SM_MOUSEWHEELPRESENT: | 
|---|
| 567 | rc = FALSE; | 
|---|
| 568 | break; | 
|---|
| 569 | case SM_XVIRTUALSCREEN: | 
|---|
| 570 | rc = 0; | 
|---|
| 571 | break; | 
|---|
| 572 | case SM_YVIRTUALSCREEN: | 
|---|
| 573 | rc = 0; | 
|---|
| 574 | break; | 
|---|
| 575 |  | 
|---|
| 576 | case SM_CXVIRTUALSCREEN: | 
|---|
| 577 | rc = OSLibWinQuerySysValue(SVOS_CXSCREEN); | 
|---|
| 578 | break; | 
|---|
| 579 | case SM_CYVIRTUALSCREEN: | 
|---|
| 580 | rc = OSLibWinQuerySysValue(SVOS_CYSCREEN); | 
|---|
| 581 | break; | 
|---|
| 582 | case SM_CMONITORS: | 
|---|
| 583 | rc = 1; | 
|---|
| 584 | break; | 
|---|
| 585 | case SM_SAMEDISPLAYFORMAT: | 
|---|
| 586 | rc = TRUE; | 
|---|
| 587 | break; | 
|---|
| 588 | case SM_CMETRICS: | 
|---|
| 589 | rc = 81; | 
|---|
| 590 | //rc = O32_GetSystemMetrics(44);  //Open32 changed this one | 
|---|
| 591 | break; | 
|---|
| 592 | default: | 
|---|
| 593 | //better than nothing | 
|---|
| 594 | rc = O32_GetSystemMetrics(nIndex); | 
|---|
| 595 | break; | 
|---|
| 596 | } | 
|---|
| 597 | dprintf2(("USER32:  GetSystemMetrics %d returned %d\n", nIndex, rc)); | 
|---|
| 598 | return(rc); | 
|---|
| 599 | } | 
|---|
| 600 | //****************************************************************************** | 
|---|
| 601 | /* Not support by Open32 (not included are the new win9x parameters): | 
|---|
| 602 | case SPI_GETFASTTASKSWITCH: | 
|---|
| 603 | case SPI_GETGRIDGRANULARITY: | 
|---|
| 604 | case SPI_GETICONTITLELOGFONT: | 
|---|
| 605 | case SPI_GETICONTITLEWRAP: | 
|---|
| 606 | case SPI_GETMENUDROPALIGNMENT: | 
|---|
| 607 | case SPI_ICONHORIZONTALSPACING: | 
|---|
| 608 | case SPI_ICONVERTICALSPACING: | 
|---|
| 609 | case SPI_LANGDRIVER: | 
|---|
| 610 | case SPI_SETFASTTASKSWITCH: | 
|---|
| 611 | case SPI_SETGRIDGRANULARITY: | 
|---|
| 612 | case SPI_SETICONTITLELOGFONT: | 
|---|
| 613 | case SPI_SETICONTITLEWRAP: | 
|---|
| 614 | case SPI_SETMENUDROPALIGNMENT: | 
|---|
| 615 | case SPI_GETSCREENSAVEACTIVE: | 
|---|
| 616 | case SPI_GETSCREENSAVETIMEOUT: | 
|---|
| 617 | case SPI_SETDESKPATTERN: | 
|---|
| 618 | case SPI_SETDESKWALLPAPER: | 
|---|
| 619 | case SPI_SETSCREENSAVEACTIVE: | 
|---|
| 620 | case SPI_SETSCREENSAVETIMEOUT: | 
|---|
| 621 | */ | 
|---|
| 622 | //****************************************************************************** | 
|---|
| 623 | BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni) | 
|---|
| 624 | { | 
|---|
| 625 | BOOL rc = TRUE; | 
|---|
| 626 |  | 
|---|
| 627 | dprintf(("USER32:  SystemParametersInfoA uiAction: %d, uiParam: %d, pvParam: %d, fWinIni: %d\n", | 
|---|
| 628 | uiAction, uiParam, pvParam, fWinIni)); | 
|---|
| 629 |  | 
|---|
| 630 | switch(uiAction) { | 
|---|
| 631 |  | 
|---|
| 632 | case SPI_GETBEEP: | 
|---|
| 633 | *(ULONG*)pvParam = OSLibWinQuerySysValue(SVOS_ALARM); | 
|---|
| 634 | break; | 
|---|
| 635 |  | 
|---|
| 636 | case SPI_GETKEYBOARDDELAY: | 
|---|
| 637 | *(PULONG)pvParam = OSLibPrfQueryProfileInt(OSLIB_HINI_USER, "PM_ControlPanel", | 
|---|
| 638 | "KeyRepeatDelay", 90); | 
|---|
| 639 | break; | 
|---|
| 640 |  | 
|---|
| 641 | case SPI_GETKEYBOARDSPEED: | 
|---|
| 642 | *(PULONG)pvParam = OSLibPrfQueryProfileInt(OSLIB_HINI_USER, "PM_ControlPanel", | 
|---|
| 643 | "KeyRepeatRate", 19); | 
|---|
| 644 | break; | 
|---|
| 645 |  | 
|---|
| 646 | #if 0 | 
|---|
| 647 | // TODO: Make OSLib a seperate DLL and use it everywhere? | 
|---|
| 648 | case SPI_GETMOUSE: | 
|---|
| 649 | { | 
|---|
| 650 | ULONG retCode; | 
|---|
| 651 | retCode = OSLibDosOpen( | 
|---|
| 652 | break; | 
|---|
| 653 | } | 
|---|
| 654 | #endif | 
|---|
| 655 |  | 
|---|
| 656 | case SPI_SETBEEP: | 
|---|
| 657 | // we don't do anything here. Win32 apps shouldn't change OS/2 settings | 
|---|
| 658 | dprintf(("USER32: SPI_SETBEEP is ignored!\n")); | 
|---|
| 659 | break; | 
|---|
| 660 |  | 
|---|
| 661 | case SPI_SETBORDER: | 
|---|
| 662 | // TODO make this for Win32 apps only, Open32 changes OS/2 settings! | 
|---|
| 663 | dprintf(("USER32: SPI_SETBORDER is ignored, implement!\n")); | 
|---|
| 664 | break; | 
|---|
| 665 |  | 
|---|
| 666 | case SPI_SETDOUBLECLKHEIGHT: | 
|---|
| 667 | // TODO make this for Win32 apps only, Open32 changes OS/2 settings! | 
|---|
| 668 | dprintf(("USER32: SPI_SETDOUBLECLICKHEIGHT is ignored, implement!\n")); | 
|---|
| 669 | break; | 
|---|
| 670 |  | 
|---|
| 671 | case SPI_SETDOUBLECLKWIDTH: | 
|---|
| 672 | // TODO make this for Win32 apps only, Open32 changes OS/2 settings! | 
|---|
| 673 | dprintf(("USER32: SPI_SETDOUBLECLICKWIDTH is ignored, implement!\n")); | 
|---|
| 674 | break; | 
|---|
| 675 |  | 
|---|
| 676 | case SPI_SETDOUBLECLICKTIME: | 
|---|
| 677 | // TODO make this for Win32 apps only, Open32 changes OS/2 settings! | 
|---|
| 678 | dprintf(("USER32: SPI_SETDOUBLECLICKTIME is ignored, implement!\n")); | 
|---|
| 679 | break; | 
|---|
| 680 |  | 
|---|
| 681 | case SPI_SETKEYBOARDDELAY: | 
|---|
| 682 | // TODO make this for Win32 apps only, Open32 changes OS/2 settings! | 
|---|
| 683 | dprintf(("USER32: SPI_SETKEYBOARDDELAY is ignored, implement!\n")); | 
|---|
| 684 | break; | 
|---|
| 685 |  | 
|---|
| 686 | case SPI_SETKEYBOARDSPEED: | 
|---|
| 687 | // TODO make this for Win32 apps only, Open32 changes OS/2 settings! | 
|---|
| 688 | dprintf(("USER32: SPI_SETKEYBOARDSPEED is ignored, implement!\n")); | 
|---|
| 689 | break; | 
|---|
| 690 |  | 
|---|
| 691 | case SPI_SETMOUSE: | 
|---|
| 692 | // TODO make this for Win32 apps only, Open32 changes OS/2 settings! | 
|---|
| 693 | dprintf(("USER32: SPI_SETMOUSE is ignored, implement!\n")); | 
|---|
| 694 | break; | 
|---|
| 695 |  | 
|---|
| 696 | case SPI_SETMOUSEBUTTONSWAP: | 
|---|
| 697 | // TODO make this for Win32 apps only, Open32 changes OS/2 settings! | 
|---|
| 698 | dprintf(("USER32: SPI_SETMOUSEBUTTONSWAP is ignored, implement!\n")); | 
|---|
| 699 | break; | 
|---|
| 700 |  | 
|---|
| 701 | case SPI_SCREENSAVERRUNNING: | 
|---|
| 702 | *(BOOL *)pvParam = FALSE; | 
|---|
| 703 | break; | 
|---|
| 704 |  | 
|---|
| 705 | case SPI_GETDRAGFULLWINDOWS: | 
|---|
| 706 | *(BOOL *)pvParam = OSLibWinQuerySysValue(SVOS_DYNAMICDRAG); | 
|---|
| 707 | break; | 
|---|
| 708 |  | 
|---|
| 709 | case SPI_GETNONCLIENTMETRICS: | 
|---|
| 710 | { | 
|---|
| 711 | LPNONCLIENTMETRICSA lpnm = (LPNONCLIENTMETRICSA)pvParam; | 
|---|
| 712 |  | 
|---|
| 713 | if (lpnm->cbSize == sizeof(NONCLIENTMETRICSA)) | 
|---|
| 714 | { | 
|---|
| 715 | memset(lpnm, 0, sizeof(NONCLIENTMETRICSA)); | 
|---|
| 716 | lpnm->cbSize = sizeof(NONCLIENTMETRICSA); | 
|---|
| 717 |  | 
|---|
| 718 | SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfCaptionFont),0); | 
|---|
| 719 | lpnm->lfCaptionFont.lfWeight = FW_BOLD; | 
|---|
| 720 | lpnm->iCaptionWidth    = 32; //TODO | 
|---|
| 721 | lpnm->iCaptionHeight   = 32; //TODO | 
|---|
| 722 |  | 
|---|
| 723 | SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfSmCaptionFont),0); | 
|---|
| 724 | lpnm->iSmCaptionWidth  = GetSystemMetrics(SM_CXSMSIZE); | 
|---|
| 725 | lpnm->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE); | 
|---|
| 726 |  | 
|---|
| 727 | LPLOGFONTA lpLogFont = &(lpnm->lfMenuFont); | 
|---|
| 728 | if(fOS2Look) { | 
|---|
| 729 | char fontname[128]; | 
|---|
| 730 | char *pszFontName; | 
|---|
| 731 | BOOL fFound = TRUE; | 
|---|
| 732 |  | 
|---|
| 733 | if(OSLibPrfQueryProfileString(OSLIB_HINI_USER, "PM_SystemFonts", "Menus", "", fontname, sizeof(fontname)) == 1) { | 
|---|
| 734 | if(OSLibPrfQueryProfileString(OSLIB_HINI_USER, "PM_SystemFonts", "DefaultFont", "", fontname, sizeof(fontname)) == 1) { | 
|---|
| 735 | fFound = FALSE; | 
|---|
| 736 | } | 
|---|
| 737 | } | 
|---|
| 738 | if(fFound) { | 
|---|
| 739 | pszFontName = fontname; | 
|---|
| 740 | while(*pszFontName != '.' && *pszFontName != 0) pszFontName++; | 
|---|
| 741 | if(*pszFontName) { | 
|---|
| 742 | *pszFontName++ = 0; | 
|---|
| 743 |  | 
|---|
| 744 | strncpy(lpLogFont->lfFaceName, pszFontName, sizeof(lpLogFont->lfFaceName)); | 
|---|
| 745 | lpLogFont->lfFaceName[sizeof(lpLogFont->lfFaceName)-1] = 0; | 
|---|
| 746 | lpLogFont->lfWeight = FW_NORMAL; | 
|---|
| 747 |  | 
|---|
| 748 | // AH 2001-12-26 use the font size returned by the graphics | 
|---|
| 749 | // driver as the font height. This will take font size settings | 
|---|
| 750 | // such as small, medium and large fonts into account | 
|---|
| 751 | lpLogFont->lfHeight = CapsCharHeight; | 
|---|
| 752 | } | 
|---|
| 753 | else fFound = FALSE; | 
|---|
| 754 | } | 
|---|
| 755 | if(!fFound) { | 
|---|
| 756 | GetProfileStringA("Desktop", "MenuFont", "WarpSans", | 
|---|
| 757 | lpLogFont->lfFaceName, LF_FACESIZE); | 
|---|
| 758 | lpLogFont->lfWeight = FW_BOLD; | 
|---|
| 759 | // AH 2001-12-26 take graphics driver font size setting | 
|---|
| 760 | lpLogFont->lfHeight = -GetProfileIntA("Desktop","MenuFontSize", CapsCharHeight); | 
|---|
| 761 | } | 
|---|
| 762 | lpLogFont->lfWidth = 0; | 
|---|
| 763 | lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0; | 
|---|
| 764 | } | 
|---|
| 765 | else { | 
|---|
| 766 | GetProfileStringA("Desktop", "MenuFont", "MS Sans Serif", | 
|---|
| 767 | lpLogFont->lfFaceName, LF_FACESIZE); | 
|---|
| 768 | lpLogFont->lfWeight = FW_NORMAL; | 
|---|
| 769 | lpLogFont->lfHeight = -GetProfileIntA("Desktop","MenuFontSize", 13); | 
|---|
| 770 | lpLogFont->lfWidth = 0; | 
|---|
| 771 | lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0; | 
|---|
| 772 | } | 
|---|
| 773 | lpLogFont->lfItalic = FALSE; | 
|---|
| 774 | lpLogFont->lfStrikeOut = FALSE; | 
|---|
| 775 | lpLogFont->lfUnderline = FALSE; | 
|---|
| 776 | lpLogFont->lfCharSet = ANSI_CHARSET; | 
|---|
| 777 | lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS; | 
|---|
| 778 | lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS; | 
|---|
| 779 | lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS; | 
|---|
| 780 |  | 
|---|
| 781 | SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, | 
|---|
| 782 | (LPVOID)&(lpnm->lfStatusFont),0); | 
|---|
| 783 | SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, | 
|---|
| 784 | (LPVOID)&(lpnm->lfMessageFont),0); | 
|---|
| 785 |  | 
|---|
| 786 | lpnm->iBorderWidth     = GetSystemMetrics(SM_CXBORDER); | 
|---|
| 787 | lpnm->iScrollWidth     = GetSystemMetrics(SM_CXHSCROLL); | 
|---|
| 788 | lpnm->iScrollHeight    = GetSystemMetrics(SM_CYHSCROLL); | 
|---|
| 789 | lpnm->iMenuHeight      = GetSystemMetrics(SM_CYMENU); | 
|---|
| 790 | lpnm->iMenuWidth       = lpnm->iMenuHeight; //TODO | 
|---|
| 791 | } | 
|---|
| 792 | else | 
|---|
| 793 | { | 
|---|
| 794 | dprintf(("SPI_GETNONCLIENTMETRICS: size mismatch !! (is %d; should be %d)\n", lpnm->cbSize, sizeof(NONCLIENTMETRICSA))); | 
|---|
| 795 | /* FIXME: SetLastError? */ | 
|---|
| 796 | rc = FALSE; | 
|---|
| 797 | } | 
|---|
| 798 | break; | 
|---|
| 799 | } | 
|---|
| 800 |  | 
|---|
| 801 | case SPI_GETICONMETRICS:                    /*     45  WINVER >= 0x400 */ | 
|---|
| 802 | { | 
|---|
| 803 | LPICONMETRICSA lpIcon = (LPICONMETRICSA)pvParam; | 
|---|
| 804 | if(lpIcon && lpIcon->cbSize == sizeof(*lpIcon)) | 
|---|
| 805 | { | 
|---|
| 806 | SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, 0, | 
|---|
| 807 | &lpIcon->iHorzSpacing, FALSE ); | 
|---|
| 808 | SystemParametersInfoA( SPI_ICONVERTICALSPACING, 0, | 
|---|
| 809 | &lpIcon->iVertSpacing, FALSE ); | 
|---|
| 810 | SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0, | 
|---|
| 811 | &lpIcon->iTitleWrap, FALSE ); | 
|---|
| 812 | SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0, | 
|---|
| 813 | &lpIcon->lfFont, FALSE ); | 
|---|
| 814 | } | 
|---|
| 815 | else | 
|---|
| 816 | { | 
|---|
| 817 | dprintf(("SPI_GETICONMETRICS: size mismatch !! (is %d; should be %d)\n", lpIcon->cbSize, sizeof(ICONMETRICSA))); | 
|---|
| 818 | /* FIXME: SetLastError? */ | 
|---|
| 819 | rc = FALSE; | 
|---|
| 820 | } | 
|---|
| 821 | break; | 
|---|
| 822 | } | 
|---|
| 823 |  | 
|---|
| 824 | case SPI_GETICONTITLELOGFONT: | 
|---|
| 825 | { | 
|---|
| 826 | LPLOGFONTA lpLogFont = (LPLOGFONTA)pvParam; | 
|---|
| 827 |  | 
|---|
| 828 | /* from now on we always have an alias for MS Sans Serif */ | 
|---|
| 829 | strcpy(lpLogFont->lfFaceName, "MS Sans Serif"); | 
|---|
| 830 | lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", /*8*/12); //CB: 8 is too small | 
|---|
| 831 | lpLogFont->lfWidth = 0; | 
|---|
| 832 | lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0; | 
|---|
| 833 | lpLogFont->lfWeight = FW_NORMAL; | 
|---|
| 834 | lpLogFont->lfItalic = FALSE; | 
|---|
| 835 | lpLogFont->lfStrikeOut = FALSE; | 
|---|
| 836 | lpLogFont->lfUnderline = FALSE; | 
|---|
| 837 | lpLogFont->lfCharSet = ANSI_CHARSET; | 
|---|
| 838 | lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS; | 
|---|
| 839 | lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS; | 
|---|
| 840 | lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS; | 
|---|
| 841 | break; | 
|---|
| 842 | } | 
|---|
| 843 | case SPI_GETBORDER: | 
|---|
| 844 | *(INT *)pvParam = GetSystemMetrics( SM_CXFRAME ); | 
|---|
| 845 | break; | 
|---|
| 846 |  | 
|---|
| 847 | case SPI_GETWORKAREA: | 
|---|
| 848 | SetRect( (RECT *)pvParam, 0, 0, | 
|---|
| 849 | GetSystemMetrics( SM_CXSCREEN ), | 
|---|
| 850 | GetSystemMetrics( SM_CYSCREEN ) | 
|---|
| 851 | ); | 
|---|
| 852 | break; | 
|---|
| 853 |  | 
|---|
| 854 | case SPI_GETWHEELSCROLLLINES: //TODO: Undocumented | 
|---|
| 855 | rc = 16; | 
|---|
| 856 | break; | 
|---|
| 857 |  | 
|---|
| 858 | default: | 
|---|
| 859 | dprintf(("System parameter value is not supported!\n")); | 
|---|
| 860 | rc = FALSE; | 
|---|
| 861 | // AH: no longer call Open32 | 
|---|
| 862 | //rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni); | 
|---|
| 863 | break; | 
|---|
| 864 | } | 
|---|
| 865 | dprintf(("USER32:  SystemParametersInfoA %d, returned %d\n", uiAction, rc)); | 
|---|
| 866 | return(rc); | 
|---|
| 867 | } | 
|---|
| 868 | //****************************************************************************** | 
|---|
| 869 | //TODO: Check for more options that have different structs for Unicode!!!! | 
|---|
| 870 | //****************************************************************************** | 
|---|
| 871 | BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni) | 
|---|
| 872 | { | 
|---|
| 873 | BOOL rc = TRUE; | 
|---|
| 874 | NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam; | 
|---|
| 875 | NONCLIENTMETRICSA  clientMetricsA = {0}; | 
|---|
| 876 | PVOID  pvParamA; | 
|---|
| 877 | UINT   uiParamA; | 
|---|
| 878 |  | 
|---|
| 879 | switch(uiAction) { | 
|---|
| 880 | case SPI_SETNONCLIENTMETRICS: | 
|---|
| 881 | clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth; | 
|---|
| 882 | clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth; | 
|---|
| 883 | clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight; | 
|---|
| 884 | clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth; | 
|---|
| 885 | clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight; | 
|---|
| 886 | ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont); | 
|---|
| 887 | clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth; | 
|---|
| 888 | clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight; | 
|---|
| 889 | ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont); | 
|---|
| 890 | clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth; | 
|---|
| 891 | clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight; | 
|---|
| 892 | ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont); | 
|---|
| 893 | ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont); | 
|---|
| 894 | ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont); | 
|---|
| 895 | //no break | 
|---|
| 896 | case SPI_GETNONCLIENTMETRICS: | 
|---|
| 897 | // Fix: set the structure size in any case (SET and GET!) | 
|---|
| 898 | clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA); | 
|---|
| 899 |  | 
|---|
| 900 | uiParamA = sizeof(NONCLIENTMETRICSA); | 
|---|
| 901 | pvParamA = &clientMetricsA; | 
|---|
| 902 | break; | 
|---|
| 903 |  | 
|---|
| 904 | case SPI_GETICONMETRICS:                    /*     45  WINVER >= 0x400 */ | 
|---|
| 905 | { | 
|---|
| 906 | LPICONMETRICSW lpIcon = (LPICONMETRICSW)pvParam; | 
|---|
| 907 | if(lpIcon && lpIcon->cbSize == sizeof(*lpIcon)) | 
|---|
| 908 | { | 
|---|
| 909 | SystemParametersInfoW( SPI_ICONHORIZONTALSPACING, 0, | 
|---|
| 910 | &lpIcon->iHorzSpacing, FALSE ); | 
|---|
| 911 | SystemParametersInfoW( SPI_ICONVERTICALSPACING, 0, | 
|---|
| 912 | &lpIcon->iVertSpacing, FALSE ); | 
|---|
| 913 | SystemParametersInfoW( SPI_GETICONTITLEWRAP, 0, | 
|---|
| 914 | &lpIcon->iTitleWrap, FALSE ); | 
|---|
| 915 | SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0, | 
|---|
| 916 | &lpIcon->lfFont, FALSE ); | 
|---|
| 917 | return TRUE; | 
|---|
| 918 | } | 
|---|
| 919 | else | 
|---|
| 920 | { | 
|---|
| 921 | dprintf(("SPI_GETICONMETRICS: size mismatch !! (is %d; should be %d)\n", lpIcon->cbSize, sizeof(ICONMETRICSA))); | 
|---|
| 922 | /* FIXME: SetLastError? */ | 
|---|
| 923 | return FALSE; | 
|---|
| 924 | } | 
|---|
| 925 | } | 
|---|
| 926 |  | 
|---|
| 927 | case SPI_GETICONTITLELOGFONT: | 
|---|
| 928 | { | 
|---|
| 929 | LPLOGFONTW lpLogFont = (LPLOGFONTW)pvParam; | 
|---|
| 930 |  | 
|---|
| 931 | /* from now on we always have an alias for MS Sans Serif */ | 
|---|
| 932 | lstrcpyW(lpLogFont->lfFaceName, (LPCWSTR)L"MS Sans Serif"); | 
|---|
| 933 | lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", /*8*/12); //CB: 8 is too small | 
|---|
| 934 | lpLogFont->lfWidth = 0; | 
|---|
| 935 | lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0; | 
|---|
| 936 | lpLogFont->lfWeight = FW_NORMAL; | 
|---|
| 937 | lpLogFont->lfItalic = FALSE; | 
|---|
| 938 | lpLogFont->lfStrikeOut = FALSE; | 
|---|
| 939 | lpLogFont->lfUnderline = FALSE; | 
|---|
| 940 | lpLogFont->lfCharSet = ANSI_CHARSET; | 
|---|
| 941 | lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS; | 
|---|
| 942 | lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS; | 
|---|
| 943 | lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS; | 
|---|
| 944 | return TRUE; | 
|---|
| 945 | } | 
|---|
| 946 | default: | 
|---|
| 947 | pvParamA = pvParam; | 
|---|
| 948 | uiParamA = uiParam; | 
|---|
| 949 | break; | 
|---|
| 950 | } | 
|---|
| 951 | rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni); | 
|---|
| 952 |  | 
|---|
| 953 | switch(uiAction) { | 
|---|
| 954 | case SPI_GETNONCLIENTMETRICS: | 
|---|
| 955 | clientMetricsW->cbSize = sizeof(*clientMetricsW); | 
|---|
| 956 | clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth; | 
|---|
| 957 | clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth; | 
|---|
| 958 | clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight; | 
|---|
| 959 | clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth; | 
|---|
| 960 | clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight; | 
|---|
| 961 | ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont); | 
|---|
| 962 |  | 
|---|
| 963 | clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth; | 
|---|
| 964 | clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight; | 
|---|
| 965 | ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont); | 
|---|
| 966 |  | 
|---|
| 967 | clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth; | 
|---|
| 968 | clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight; | 
|---|
| 969 | ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont); | 
|---|
| 970 | ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont); | 
|---|
| 971 | ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont); | 
|---|
| 972 | break; | 
|---|
| 973 | } | 
|---|
| 974 | dprintf(("USER32:  SystemParametersInfoW %d, returned %d\n", uiAction, rc)); | 
|---|
| 975 | return(rc); | 
|---|
| 976 | } | 
|---|
| 977 |  | 
|---|
| 978 | /* Help Functions */ | 
|---|
| 979 |  | 
|---|
| 980 | BOOL WIN32API WinHelpA( HWND hwnd, LPCSTR lpszHelp, UINT uCommand, DWORD  dwData) | 
|---|
| 981 | { | 
|---|
| 982 | static WORD WM_WINHELP = 0; | 
|---|
| 983 | HWND hDest; | 
|---|
| 984 | LPWINHELP lpwh; | 
|---|
| 985 | HINSTANCE winhelp; | 
|---|
| 986 | int size,dsize,nlen; | 
|---|
| 987 | BOOL ret; | 
|---|
| 988 |  | 
|---|
| 989 | dprintf(("USER32: WinHelpA %x %s %d %x", hwnd, lpszHelp, uCommand, dwData)); | 
|---|
| 990 |  | 
|---|
| 991 | if(!WM_WINHELP) | 
|---|
| 992 | { | 
|---|
| 993 | WM_WINHELP=RegisterWindowMessageA("WM_WINHELP"); | 
|---|
| 994 | if(!WM_WINHELP) | 
|---|
| 995 | return FALSE; | 
|---|
| 996 | } | 
|---|
| 997 |  | 
|---|
| 998 | hDest = FindWindowA( "MS_WINHELP", NULL ); | 
|---|
| 999 | if(!hDest) | 
|---|
| 1000 | { | 
|---|
| 1001 | if(uCommand == HELP_QUIT) | 
|---|
| 1002 | return TRUE; | 
|---|
| 1003 | else | 
|---|
| 1004 | winhelp = WinExec ( "winhlp32.exe -x", SW_SHOWNORMAL ); | 
|---|
| 1005 | if ( winhelp <= 32 ) return FALSE; | 
|---|
| 1006 | if ( ! ( hDest = FindWindowA ( "MS_WINHELP", NULL ) )) return FALSE; | 
|---|
| 1007 | } | 
|---|
| 1008 |  | 
|---|
| 1009 | switch(uCommand) | 
|---|
| 1010 | { | 
|---|
| 1011 | case HELP_CONTEXT: | 
|---|
| 1012 | case HELP_SETCONTENTS: | 
|---|
| 1013 | case HELP_CONTENTS: | 
|---|
| 1014 | case HELP_CONTEXTPOPUP: | 
|---|
| 1015 | case HELP_FORCEFILE: | 
|---|
| 1016 | case HELP_HELPONHELP: | 
|---|
| 1017 | case HELP_FINDER: | 
|---|
| 1018 | case HELP_QUIT: | 
|---|
| 1019 | dsize=0; | 
|---|
| 1020 | break; | 
|---|
| 1021 |  | 
|---|
| 1022 | case HELP_KEY: | 
|---|
| 1023 | case HELP_PARTIALKEY: | 
|---|
| 1024 | case HELP_COMMAND: | 
|---|
| 1025 | dsize = strlen( (LPSTR)dwData )+1; | 
|---|
| 1026 | break; | 
|---|
| 1027 |  | 
|---|
| 1028 | case HELP_MULTIKEY: | 
|---|
| 1029 | dsize = ((LPMULTIKEYHELP)dwData)->mkSize; | 
|---|
| 1030 | break; | 
|---|
| 1031 |  | 
|---|
| 1032 | case HELP_SETWINPOS: | 
|---|
| 1033 | dsize = ((LPHELPWININFO)dwData)->wStructSize; | 
|---|
| 1034 | break; | 
|---|
| 1035 |  | 
|---|
| 1036 | default: | 
|---|
| 1037 | //WARN("Unknown help command %d\n",wCommand); | 
|---|
| 1038 | return FALSE; | 
|---|
| 1039 | } | 
|---|
| 1040 | if(lpszHelp) | 
|---|
| 1041 | nlen = strlen(lpszHelp)+1; | 
|---|
| 1042 | else | 
|---|
| 1043 | nlen = 0; | 
|---|
| 1044 | size = sizeof(WINHELP) + nlen + dsize; | 
|---|
| 1045 |  | 
|---|
| 1046 | //allocate shared memory | 
|---|
| 1047 | lpwh = (WINHELP*)_smalloc(size); | 
|---|
| 1048 | lpwh->size = size; | 
|---|
| 1049 | lpwh->command = uCommand; | 
|---|
| 1050 | lpwh->data = dwData; | 
|---|
| 1051 | if(nlen) | 
|---|
| 1052 | { | 
|---|
| 1053 | strcpy(((char*)lpwh) + sizeof(WINHELP),lpszHelp); | 
|---|
| 1054 | lpwh->ofsFilename = sizeof(WINHELP); | 
|---|
| 1055 | } else | 
|---|
| 1056 | lpwh->ofsFilename = 0; | 
|---|
| 1057 | if(dsize) | 
|---|
| 1058 | { | 
|---|
| 1059 | memcpy(((char*)lpwh)+sizeof(WINHELP)+nlen,(LPSTR)dwData,dsize); | 
|---|
| 1060 | lpwh->ofsData = sizeof(WINHELP)+nlen; | 
|---|
| 1061 | } else | 
|---|
| 1062 | lpwh->ofsData = 0; | 
|---|
| 1063 |  | 
|---|
| 1064 | ret = SendMessageA(hDest,WM_WINHELP,hwnd,(LPARAM)lpwh); | 
|---|
| 1065 | free(lpwh); | 
|---|
| 1066 | return ret; | 
|---|
| 1067 | } | 
|---|
| 1068 | //****************************************************************************** | 
|---|
| 1069 | //****************************************************************************** | 
|---|
| 1070 | BOOL WIN32API WinHelpW( HWND hwnd, LPCWSTR lpszHelp, UINT uCommand, DWORD  dwData) | 
|---|
| 1071 | { | 
|---|
| 1072 | char *astring = UnicodeToAsciiString((LPWSTR)lpszHelp); | 
|---|
| 1073 | BOOL  rc; | 
|---|
| 1074 |  | 
|---|
| 1075 | dprintf(("USER32:  WinHelpW\n")); | 
|---|
| 1076 |  | 
|---|
| 1077 | rc = WinHelpA(hwnd,astring,uCommand,dwData); | 
|---|
| 1078 | FreeAsciiString(astring); | 
|---|
| 1079 |  | 
|---|
| 1080 | return rc; | 
|---|
| 1081 | } | 
|---|
| 1082 |  | 
|---|
| 1083 |  | 
|---|
| 1084 | /* Window Functions */ | 
|---|
| 1085 |  | 
|---|
| 1086 | /***************************************************************************** | 
|---|
| 1087 | * Name      : BOOL WIN32API PaintDesktop | 
|---|
| 1088 | * Purpose   : The PaintDesktop function fills the clipping region in the | 
|---|
| 1089 | *             specified device context with the desktop pattern or wallpaper. | 
|---|
| 1090 | *             The function is provided primarily for shell desktops. | 
|---|
| 1091 | * Parameters: | 
|---|
| 1092 | * Variables : | 
|---|
| 1093 | * Result    : If the function succeeds, the return value is TRUE. | 
|---|
| 1094 | *             If the function fails, the return value is FALSE. | 
|---|
| 1095 | * Remark    : | 
|---|
| 1096 | * Status    : UNTESTED STUB | 
|---|
| 1097 | * | 
|---|
| 1098 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1099 | *****************************************************************************/ | 
|---|
| 1100 | BOOL WIN32API PaintDesktop(HDC hdc) | 
|---|
| 1101 | { | 
|---|
| 1102 | dprintf(("USER32:PaintDesktop (%08x) not implemented.\n", | 
|---|
| 1103 | hdc)); | 
|---|
| 1104 |  | 
|---|
| 1105 | return (FALSE); | 
|---|
| 1106 | } | 
|---|
| 1107 |  | 
|---|
| 1108 | /* Filled Shape Functions */ | 
|---|
| 1109 |  | 
|---|
| 1110 | /* Last COLOR id */ | 
|---|
| 1111 | #define COLOR_MAX   COLOR_GRADIENTINACTIVECAPTION | 
|---|
| 1112 |  | 
|---|
| 1113 | int WIN32API FillRect(HDC hDC, const RECT * lprc, HBRUSH hbr) | 
|---|
| 1114 | { | 
|---|
| 1115 | //SvL: brush 0 means current selected brush (verified in NT4) | 
|---|
| 1116 | if(hbr == 0) { | 
|---|
| 1117 | hbr = GetCurrentObject(hDC, OBJ_BRUSH); | 
|---|
| 1118 | } | 
|---|
| 1119 | else | 
|---|
| 1120 | if (hbr <= (HBRUSH) (COLOR_MAX + 1)) { | 
|---|
| 1121 | hbr = GetSysColorBrush( (INT) hbr - 1 ); | 
|---|
| 1122 | } | 
|---|
| 1123 | dprintf(("USER32:  FillRect %x (%d,%d)(%d,%d) brush %X", hDC, lprc->left, lprc->top, lprc->right, lprc->bottom, hbr)); | 
|---|
| 1124 | return O32_FillRect(hDC,lprc,hbr); | 
|---|
| 1125 | } | 
|---|
| 1126 | //****************************************************************************** | 
|---|
| 1127 | //****************************************************************************** | 
|---|
| 1128 | int WIN32API FrameRect( HDC hDC, const RECT * lprc, HBRUSH  hbr) | 
|---|
| 1129 | { | 
|---|
| 1130 | dprintf(("USER32: FrameRect %x (%d,%d)(%d,%d) brush %x", hDC, lprc->top, lprc->left, lprc->bottom, lprc->right, hbr)); | 
|---|
| 1131 | return O32_FrameRect(hDC,lprc,hbr); | 
|---|
| 1132 | } | 
|---|
| 1133 | //****************************************************************************** | 
|---|
| 1134 | //****************************************************************************** | 
|---|
| 1135 | BOOL WIN32API InvertRect( HDC hDC, const RECT * lprc) | 
|---|
| 1136 | { | 
|---|
| 1137 | if(lprc) { | 
|---|
| 1138 | dprintf(("USER32: InvertRect %x (%d,%d)(%d,%d)", hDC, lprc->left, lprc->top, lprc->right, lprc->bottom)); | 
|---|
| 1139 | } | 
|---|
| 1140 | else dprintf(("USER32: InvertRect %x NULL", hDC)); | 
|---|
| 1141 | return O32_InvertRect(hDC,lprc); | 
|---|
| 1142 | } | 
|---|
| 1143 |  | 
|---|
| 1144 | /* System Information Functions */ | 
|---|
| 1145 |  | 
|---|
| 1146 | /* Window Station and Desktop Functions */ | 
|---|
| 1147 |  | 
|---|
| 1148 | /***************************************************************************** | 
|---|
| 1149 | * Name      : HDESK WIN32API GetThreadDesktop | 
|---|
| 1150 | * Purpose   : The GetThreadDesktop function returns a handle to the desktop | 
|---|
| 1151 | *             associated with a specified thread. | 
|---|
| 1152 | * Parameters: DWORD dwThreadId thread identifier | 
|---|
| 1153 | * Variables : | 
|---|
| 1154 | * Result    : If the function succeeds, the return value is the handle of the | 
|---|
| 1155 | *               desktop associated with the specified thread. | 
|---|
| 1156 | * Remark    : | 
|---|
| 1157 | * Status    : UNTESTED STUB | 
|---|
| 1158 | * | 
|---|
| 1159 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1160 | *****************************************************************************/ | 
|---|
| 1161 | HDESK WIN32API GetThreadDesktop(DWORD dwThreadId) | 
|---|
| 1162 | { | 
|---|
| 1163 | dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n", | 
|---|
| 1164 | dwThreadId)); | 
|---|
| 1165 |  | 
|---|
| 1166 | return (NULL); | 
|---|
| 1167 | } | 
|---|
| 1168 |  | 
|---|
| 1169 | /***************************************************************************** | 
|---|
| 1170 | * Name      : BOOL WIN32API CloseDesktop | 
|---|
| 1171 | * Purpose   : The CloseDesktop function closes an open handle of a desktop | 
|---|
| 1172 | *             object. A desktop is a secure object contained within a window | 
|---|
| 1173 | *             station object. A desktop has a logical display surface and | 
|---|
| 1174 | *             contains windows, menus and hooks. | 
|---|
| 1175 | * Parameters: HDESK hDesktop | 
|---|
| 1176 | * Variables : | 
|---|
| 1177 | * Result    : If the function succeeds, the return value is TRUE. | 
|---|
| 1178 | *             If the functions fails, the return value is FALSE. To get | 
|---|
| 1179 | *             extended error information, call GetLastError. | 
|---|
| 1180 | * Remark    : | 
|---|
| 1181 | * Status    : UNTESTED STUB | 
|---|
| 1182 | * | 
|---|
| 1183 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1184 | *****************************************************************************/ | 
|---|
| 1185 | BOOL WIN32API CloseDesktop(HDESK hDesktop) | 
|---|
| 1186 | { | 
|---|
| 1187 | dprintf(("USER32:CloseDesktop(%08x) not implemented.\n", | 
|---|
| 1188 | hDesktop)); | 
|---|
| 1189 |  | 
|---|
| 1190 | return (FALSE); | 
|---|
| 1191 | } | 
|---|
| 1192 | /***************************************************************************** | 
|---|
| 1193 | * Name      : BOOL WIN32API CloseWindowStation | 
|---|
| 1194 | * Purpose   : The CloseWindowStation function closes an open window station handle. | 
|---|
| 1195 | * Parameters: HWINSTA hWinSta | 
|---|
| 1196 | * Variables : | 
|---|
| 1197 | * Result    : | 
|---|
| 1198 | * Remark    : If the function succeeds, the return value is TRUE. | 
|---|
| 1199 | *             If the functions fails, the return value is FALSE. To get | 
|---|
| 1200 | *             extended error information, call GetLastError. | 
|---|
| 1201 | * Status    : UNTESTED STUB | 
|---|
| 1202 | * | 
|---|
| 1203 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1204 | *****************************************************************************/ | 
|---|
| 1205 | BOOL WIN32API CloseWindowStation(HWINSTA hWinSta) | 
|---|
| 1206 | { | 
|---|
| 1207 | dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n", | 
|---|
| 1208 | hWinSta)); | 
|---|
| 1209 |  | 
|---|
| 1210 | return (FALSE); | 
|---|
| 1211 | } | 
|---|
| 1212 | /***************************************************************************** | 
|---|
| 1213 | * Name      : HDESK WIN32API CreateDesktopA | 
|---|
| 1214 | * Purpose   : The CreateDesktop function creates a new desktop on the window | 
|---|
| 1215 | *             station associated with the calling process. | 
|---|
| 1216 | * Parameters: LPCTSTR   lpszDesktop      name of the new desktop | 
|---|
| 1217 | *             LPCTSTR   lpszDevice       name of display device to assign to the desktop | 
|---|
| 1218 | *             LPDEVMODE pDevMode         reserved; must be NULL | 
|---|
| 1219 | *             DWORD     dwFlags          flags to control interaction with other applications | 
|---|
| 1220 | *             DWORD     dwDesiredAccess  specifies access of returned handle | 
|---|
| 1221 | *             LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop | 
|---|
| 1222 | * Variables : | 
|---|
| 1223 | * Result    : If the function succeeds, the return value is a handle of the | 
|---|
| 1224 | *               newly created desktop. | 
|---|
| 1225 | *             If the function fails, the return value is NULL. To get extended | 
|---|
| 1226 | *               error information, call GetLastError. | 
|---|
| 1227 | * Remark    : | 
|---|
| 1228 | * Status    : UNTESTED STUB | 
|---|
| 1229 | * | 
|---|
| 1230 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1231 | *****************************************************************************/ | 
|---|
| 1232 | HDESK WIN32API CreateDesktopA(LPCTSTR               lpszDesktop, | 
|---|
| 1233 | LPCTSTR               lpszDevice, | 
|---|
| 1234 | LPDEVMODEA            pDevMode, | 
|---|
| 1235 | DWORD                 dwFlags, | 
|---|
| 1236 | DWORD                 dwDesiredAccess, | 
|---|
| 1237 | LPSECURITY_ATTRIBUTES lpsa) | 
|---|
| 1238 | { | 
|---|
| 1239 | dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n", | 
|---|
| 1240 | lpszDesktop, | 
|---|
| 1241 | lpszDevice, | 
|---|
| 1242 | pDevMode, | 
|---|
| 1243 | dwFlags, | 
|---|
| 1244 | dwDesiredAccess, | 
|---|
| 1245 | lpsa)); | 
|---|
| 1246 |  | 
|---|
| 1247 | return (NULL); | 
|---|
| 1248 | } | 
|---|
| 1249 | /***************************************************************************** | 
|---|
| 1250 | * Name      : HDESK WIN32API CreateDesktopW | 
|---|
| 1251 | * Purpose   : The CreateDesktop function creates a new desktop on the window | 
|---|
| 1252 | *             station associated with the calling process. | 
|---|
| 1253 | * Parameters: LPCTSTR   lpszDesktop      name of the new desktop | 
|---|
| 1254 | *             LPCTSTR   lpszDevice       name of display device to assign to the desktop | 
|---|
| 1255 | *             LPDEVMODE pDevMode         reserved; must be NULL | 
|---|
| 1256 | *             DWORD     dwFlags          flags to control interaction with other applications | 
|---|
| 1257 | *             DWORD     dwDesiredAccess  specifies access of returned handle | 
|---|
| 1258 | *             LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop | 
|---|
| 1259 | * Variables : | 
|---|
| 1260 | * Result    : If the function succeeds, the return value is a handle of the | 
|---|
| 1261 | *               newly created desktop. | 
|---|
| 1262 | *             If the function fails, the return value is NULL. To get extended | 
|---|
| 1263 | *               error information, call GetLastError. | 
|---|
| 1264 | * Remark    : | 
|---|
| 1265 | * Status    : UNTESTED STUB | 
|---|
| 1266 | * | 
|---|
| 1267 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1268 | *****************************************************************************/ | 
|---|
| 1269 | HDESK WIN32API CreateDesktopW(LPCTSTR               lpszDesktop, | 
|---|
| 1270 | LPCTSTR               lpszDevice, | 
|---|
| 1271 | LPDEVMODEW            pDevMode, | 
|---|
| 1272 | DWORD                 dwFlags, | 
|---|
| 1273 | DWORD                 dwDesiredAccess, | 
|---|
| 1274 | LPSECURITY_ATTRIBUTES lpsa) | 
|---|
| 1275 | { | 
|---|
| 1276 | dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n", | 
|---|
| 1277 | lpszDesktop, | 
|---|
| 1278 | lpszDevice, | 
|---|
| 1279 | pDevMode, | 
|---|
| 1280 | dwFlags, | 
|---|
| 1281 | dwDesiredAccess, | 
|---|
| 1282 | lpsa)); | 
|---|
| 1283 |  | 
|---|
| 1284 | return (NULL); | 
|---|
| 1285 | } | 
|---|
| 1286 | /***************************************************************************** | 
|---|
| 1287 | * Name      : HWINSTA WIN32API CreateWindowStationA | 
|---|
| 1288 | * Purpose   : The CreateWindowStation function creates a window station object. | 
|---|
| 1289 | *             It returns a handle that can be used to access the window station. | 
|---|
| 1290 | *             A window station is a secure object that contains a set of global | 
|---|
| 1291 | *             atoms, a clipboard, and a set of desktop objects. | 
|---|
| 1292 | * Parameters: LPTSTR lpwinsta            name of the new window station | 
|---|
| 1293 | *             DWORD dwReserved           reserved; must be NULL | 
|---|
| 1294 | *             DWORD dwDesiredAccess      specifies access of returned handle | 
|---|
| 1295 | *             LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station | 
|---|
| 1296 | * Variables : | 
|---|
| 1297 | * Result    : If the function succeeds, the return value is the handle to the | 
|---|
| 1298 | *               newly created window station. | 
|---|
| 1299 | *             If the function fails, the return value is NULL. To get extended | 
|---|
| 1300 | *               error information, call GetLastError. | 
|---|
| 1301 | * Remark    : | 
|---|
| 1302 | * Status    : UNTESTED STUB | 
|---|
| 1303 | * | 
|---|
| 1304 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1305 | *****************************************************************************/ | 
|---|
| 1306 | HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta, | 
|---|
| 1307 | DWORD  dwReserved, | 
|---|
| 1308 | DWORD  dwDesiredAccess, | 
|---|
| 1309 | LPSECURITY_ATTRIBUTES lpsa) | 
|---|
| 1310 | { | 
|---|
| 1311 | dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n", | 
|---|
| 1312 | lpWinSta, | 
|---|
| 1313 | dwReserved, | 
|---|
| 1314 | dwDesiredAccess, | 
|---|
| 1315 | lpsa)); | 
|---|
| 1316 |  | 
|---|
| 1317 | return (NULL); | 
|---|
| 1318 | } | 
|---|
| 1319 | /***************************************************************************** | 
|---|
| 1320 | * Name      : HWINSTA WIN32API CreateWindowStationW | 
|---|
| 1321 | * Purpose   : The CreateWindowStation function creates a window station object. | 
|---|
| 1322 | *             It returns a handle that can be used to access the window station. | 
|---|
| 1323 | *             A window station is a secure object that contains a set of global | 
|---|
| 1324 | *             atoms, a clipboard, and a set of desktop objects. | 
|---|
| 1325 | * Parameters: LPTSTR lpwinsta            name of the new window station | 
|---|
| 1326 | *             DWORD dwReserved           reserved; must be NULL | 
|---|
| 1327 | *             DWORD dwDesiredAccess      specifies access of returned handle | 
|---|
| 1328 | *             LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station | 
|---|
| 1329 | * Variables : | 
|---|
| 1330 | * Result    : If the function succeeds, the return value is the handle to the | 
|---|
| 1331 | *               newly created window station. | 
|---|
| 1332 | *             If the function fails, the return value is NULL. To get extended | 
|---|
| 1333 | *               error information, call GetLastError. | 
|---|
| 1334 | * Remark    : | 
|---|
| 1335 | * Status    : UNTESTED STUB | 
|---|
| 1336 | * | 
|---|
| 1337 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1338 | *****************************************************************************/ | 
|---|
| 1339 | HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta, | 
|---|
| 1340 | DWORD  dwReserved, | 
|---|
| 1341 | DWORD  dwDesiredAccess, | 
|---|
| 1342 | LPSECURITY_ATTRIBUTES lpsa) | 
|---|
| 1343 | { | 
|---|
| 1344 | dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n", | 
|---|
| 1345 | lpWinSta, | 
|---|
| 1346 | dwReserved, | 
|---|
| 1347 | dwDesiredAccess, | 
|---|
| 1348 | lpsa)); | 
|---|
| 1349 |  | 
|---|
| 1350 | return (NULL); | 
|---|
| 1351 | } | 
|---|
| 1352 | /***************************************************************************** | 
|---|
| 1353 | * Name      : BOOL WIN32API EnumDesktopWindows | 
|---|
| 1354 | * Purpose   : The EnumDesktopWindows function enumerates all windows in a | 
|---|
| 1355 | *             desktop by passing the handle of each window, in turn, to an | 
|---|
| 1356 | *             application-defined callback function. | 
|---|
| 1357 | * Parameters: HDESK       hDesktop handle of desktop to enumerate | 
|---|
| 1358 | *             WNDENUMPROC lpfn     points to application's callback function | 
|---|
| 1359 | *             LPARAM      lParam   32-bit value to pass to the callback function | 
|---|
| 1360 | * Variables : | 
|---|
| 1361 | * Result    : If the function succeeds, the return value is TRUE. | 
|---|
| 1362 | *             If the function fails, the return value is FALSE. To get | 
|---|
| 1363 | *             extended error information, call GetLastError. | 
|---|
| 1364 | * Remark    : | 
|---|
| 1365 | * Status    : UNTESTED STUB | 
|---|
| 1366 | * | 
|---|
| 1367 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1368 | *****************************************************************************/ | 
|---|
| 1369 | BOOL WIN32API EnumDesktopWindows(HDESK       hDesktop, | 
|---|
| 1370 | WNDENUMPROC lpfn, | 
|---|
| 1371 | LPARAM      lParam) | 
|---|
| 1372 | { | 
|---|
| 1373 | dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n", | 
|---|
| 1374 | hDesktop, | 
|---|
| 1375 | lpfn, | 
|---|
| 1376 | lParam)); | 
|---|
| 1377 |  | 
|---|
| 1378 | return (FALSE); | 
|---|
| 1379 | } | 
|---|
| 1380 | /***************************************************************************** | 
|---|
| 1381 | * Name      : BOOL WIN32API EnumDesktopsA | 
|---|
| 1382 | * Purpose   : The EnumDesktops function enumerates all desktops in the window | 
|---|
| 1383 | *             station assigned to the calling process. The function does so by | 
|---|
| 1384 | *             passing the name of each desktop, in turn, to an application- | 
|---|
| 1385 | *             defined callback function. | 
|---|
| 1386 | * Parameters: HWINSTA         hwinsta    handle of window station to enumerate | 
|---|
| 1387 | *             DESKTOPENUMPROC lpEnumFunc points to application's callback function | 
|---|
| 1388 | *             LPARAM          lParam     32-bit value to pass to the callback function | 
|---|
| 1389 | * Variables : | 
|---|
| 1390 | * Result    : If the function succeeds, the return value is TRUE. | 
|---|
| 1391 | *             If the function fails, the return value is FALSE. To get extended | 
|---|
| 1392 | *             error information, call GetLastError. | 
|---|
| 1393 | * Remark    : | 
|---|
| 1394 | * Status    : UNTESTED STUB | 
|---|
| 1395 | * | 
|---|
| 1396 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1397 | *****************************************************************************/ | 
|---|
| 1398 | BOOL WIN32API EnumDesktopsA(HWINSTA          hWinSta, | 
|---|
| 1399 | DESKTOPENUMPROCA lpEnumFunc, | 
|---|
| 1400 | LPARAM           lParam) | 
|---|
| 1401 | { | 
|---|
| 1402 | dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n", | 
|---|
| 1403 | hWinSta, | 
|---|
| 1404 | lpEnumFunc, | 
|---|
| 1405 | lParam)); | 
|---|
| 1406 |  | 
|---|
| 1407 | return (FALSE); | 
|---|
| 1408 | } | 
|---|
| 1409 | /***************************************************************************** | 
|---|
| 1410 | * Name      : BOOL WIN32API EnumDesktopsW | 
|---|
| 1411 | * Purpose   : The EnumDesktops function enumerates all desktops in the window | 
|---|
| 1412 | *             station assigned to the calling process. The function does so by | 
|---|
| 1413 | *             passing the name of each desktop, in turn, to an application- | 
|---|
| 1414 | *             defined callback function. | 
|---|
| 1415 | * Parameters: HWINSTA         hwinsta    handle of window station to enumerate | 
|---|
| 1416 | *             DESKTOPENUMPROC lpEnumFunc points to application's callback function | 
|---|
| 1417 | *             LPARAM          lParam     32-bit value to pass to the callback function | 
|---|
| 1418 | * Variables : | 
|---|
| 1419 | * Result    : If the function succeeds, the return value is TRUE. | 
|---|
| 1420 | *             If the function fails, the return value is FALSE. To get extended | 
|---|
| 1421 | *             error information, call GetLastError. | 
|---|
| 1422 | * Remark    : | 
|---|
| 1423 | * Status    : UNTESTED STUB | 
|---|
| 1424 | * | 
|---|
| 1425 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1426 | *****************************************************************************/ | 
|---|
| 1427 | BOOL WIN32API EnumDesktopsW(HWINSTA          hWinSta, | 
|---|
| 1428 | DESKTOPENUMPROCW lpEnumFunc, | 
|---|
| 1429 | LPARAM           lParam) | 
|---|
| 1430 | { | 
|---|
| 1431 | dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n", | 
|---|
| 1432 | hWinSta, | 
|---|
| 1433 | lpEnumFunc, | 
|---|
| 1434 | lParam)); | 
|---|
| 1435 |  | 
|---|
| 1436 | return (FALSE); | 
|---|
| 1437 | } | 
|---|
| 1438 | /***************************************************************************** | 
|---|
| 1439 | * Name      : BOOL WIN32API EnumWindowStationsA | 
|---|
| 1440 | * Purpose   : The EnumWindowStations function enumerates all windowstations | 
|---|
| 1441 | *             in the system by passing the name of each window station, in | 
|---|
| 1442 | *             turn, to an application-defined callback function. | 
|---|
| 1443 | * Parameters: | 
|---|
| 1444 | * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function | 
|---|
| 1445 | *             LPARAM         lParam     32-bit value to pass to the callback function | 
|---|
| 1446 | * Result    : If the function succeeds, the return value is TRUE. | 
|---|
| 1447 | *             If the function fails the return value is FALSE. To get extended | 
|---|
| 1448 | *             error information, call GetLastError. | 
|---|
| 1449 | * Remark    : | 
|---|
| 1450 | * Status    : UNTESTED STUB | 
|---|
| 1451 | * | 
|---|
| 1452 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1453 | *****************************************************************************/ | 
|---|
| 1454 | BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc, | 
|---|
| 1455 | LPARAM          lParam) | 
|---|
| 1456 | { | 
|---|
| 1457 | dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n", | 
|---|
| 1458 | lpEnumFunc, | 
|---|
| 1459 | lParam)); | 
|---|
| 1460 |  | 
|---|
| 1461 | return (FALSE); | 
|---|
| 1462 | } | 
|---|
| 1463 | /***************************************************************************** | 
|---|
| 1464 | * Name      : BOOL WIN32API EnumWindowStationsW | 
|---|
| 1465 | * Purpose   : The EnumWindowStations function enumerates all windowstations | 
|---|
| 1466 | *             in the system by passing the name of each window station, in | 
|---|
| 1467 | *             turn, to an application-defined callback function. | 
|---|
| 1468 | * Parameters: | 
|---|
| 1469 | * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function | 
|---|
| 1470 | *             LPARAM         lParam     32-bit value to pass to the callback function | 
|---|
| 1471 | * Result    : If the function succeeds, the return value is TRUE. | 
|---|
| 1472 | *             If the function fails the return value is FALSE. To get extended | 
|---|
| 1473 | *             error information, call GetLastError. | 
|---|
| 1474 | * Remark    : | 
|---|
| 1475 | * Status    : UNTESTED STUB | 
|---|
| 1476 | * | 
|---|
| 1477 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1478 | *****************************************************************************/ | 
|---|
| 1479 | BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc, | 
|---|
| 1480 | LPARAM          lParam) | 
|---|
| 1481 | { | 
|---|
| 1482 | dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n", | 
|---|
| 1483 | lpEnumFunc, | 
|---|
| 1484 | lParam)); | 
|---|
| 1485 |  | 
|---|
| 1486 | return (FALSE); | 
|---|
| 1487 | } | 
|---|
| 1488 | /***************************************************************************** | 
|---|
| 1489 | * Name      : HWINSTA WIN32API GetProcessWindowStation | 
|---|
| 1490 | * Purpose   : The GetProcessWindowStation function returns a handle of the | 
|---|
| 1491 | *             window station associated with the calling process. | 
|---|
| 1492 | * Parameters: | 
|---|
| 1493 | * Variables : | 
|---|
| 1494 | * Result    : If the function succeeds, the return value is a handle of the | 
|---|
| 1495 | *               window station associated with the calling process. | 
|---|
| 1496 | *             If the function fails, the return value is NULL. This can occur | 
|---|
| 1497 | *               if the calling process is not an application written for Windows | 
|---|
| 1498 | *               NT. To get extended error information, call GetLastError. | 
|---|
| 1499 | * Remark    : | 
|---|
| 1500 | * Status    : UNTESTED STUB | 
|---|
| 1501 | * | 
|---|
| 1502 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1503 | *****************************************************************************/ | 
|---|
| 1504 | HWINSTA WIN32API GetProcessWindowStation(VOID) | 
|---|
| 1505 | { | 
|---|
| 1506 | dprintf(("USER32:GetProcessWindowStation () not implemented.\n")); | 
|---|
| 1507 |  | 
|---|
| 1508 | return (NULL); | 
|---|
| 1509 | } | 
|---|
| 1510 | /***************************************************************************** | 
|---|
| 1511 | * Name      : BOOL WIN32API GetUserObjectInformationA | 
|---|
| 1512 | * Purpose   : The GetUserObjectInformation function returns information about | 
|---|
| 1513 | *               a window station or desktop object. | 
|---|
| 1514 | * Parameters: HANDLE  hObj            handle of object to get information for | 
|---|
| 1515 | *             int     nIndex          type of information to get | 
|---|
| 1516 | *             PVOID   pvInfo          points to buffer that receives the information | 
|---|
| 1517 | *             DWORD   nLength         size, in bytes, of pvInfo buffer | 
|---|
| 1518 | *             LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer | 
|---|
| 1519 | * Variables : | 
|---|
| 1520 | * Result    : If the function succeeds, the return value is TRUE. | 
|---|
| 1521 | *             If the function fails, the return value is FALSE. To get extended | 
|---|
| 1522 | *             error information, call GetLastError. | 
|---|
| 1523 | * Remark    : | 
|---|
| 1524 | * Status    : UNTESTED STUB | 
|---|
| 1525 | * | 
|---|
| 1526 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1527 | *****************************************************************************/ | 
|---|
| 1528 | BOOL WIN32API GetUserObjectInformationA(HANDLE  hObj, | 
|---|
| 1529 | int     nIndex, | 
|---|
| 1530 | PVOID   pvInfo, | 
|---|
| 1531 | DWORD   nLength, | 
|---|
| 1532 | LPDWORD lpnLengthNeeded) | 
|---|
| 1533 | { | 
|---|
| 1534 | dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n", | 
|---|
| 1535 | hObj, | 
|---|
| 1536 | nIndex, | 
|---|
| 1537 | pvInfo, | 
|---|
| 1538 | nLength, | 
|---|
| 1539 | lpnLengthNeeded)); | 
|---|
| 1540 |  | 
|---|
| 1541 | return (FALSE); | 
|---|
| 1542 | } | 
|---|
| 1543 | /***************************************************************************** | 
|---|
| 1544 | * Name      : BOOL WIN32API GetUserObjectInformationW | 
|---|
| 1545 | * Purpose   : The GetUserObjectInformation function returns information about | 
|---|
| 1546 | *               a window station or desktop object. | 
|---|
| 1547 | * Parameters: HANDLE  hObj            handle of object to get information for | 
|---|
| 1548 | *             int     nIndex          type of information to get | 
|---|
| 1549 | *             PVOID   pvInfo          points to buffer that receives the information | 
|---|
| 1550 | *             DWORD   nLength         size, in bytes, of pvInfo buffer | 
|---|
| 1551 | *             LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer | 
|---|
| 1552 | * Variables : | 
|---|
| 1553 | * Result    : If the function succeeds, the return value is TRUE. | 
|---|
| 1554 | *             If the function fails, the return value is FALSE. To get extended | 
|---|
| 1555 | *             error information, call GetLastError. | 
|---|
| 1556 | * Remark    : | 
|---|
| 1557 | * Status    : UNTESTED STUB | 
|---|
| 1558 | * | 
|---|
| 1559 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1560 | *****************************************************************************/ | 
|---|
| 1561 | BOOL WIN32API GetUserObjectInformationW(HANDLE  hObj, | 
|---|
| 1562 | int     nIndex, | 
|---|
| 1563 | PVOID   pvInfo, | 
|---|
| 1564 | DWORD   nLength, | 
|---|
| 1565 | LPDWORD lpnLengthNeeded) | 
|---|
| 1566 | { | 
|---|
| 1567 | dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n", | 
|---|
| 1568 | hObj, | 
|---|
| 1569 | nIndex, | 
|---|
| 1570 | pvInfo, | 
|---|
| 1571 | nLength, | 
|---|
| 1572 | lpnLengthNeeded)); | 
|---|
| 1573 |  | 
|---|
| 1574 | return (FALSE); | 
|---|
| 1575 | } | 
|---|
| 1576 | /***************************************************************************** | 
|---|
| 1577 | * Name      : BOOL WIN32API GetUserObjectSecurity | 
|---|
| 1578 | * Purpose   : The GetUserObjectSecurity function retrieves security information | 
|---|
| 1579 | *             for the specified user object. | 
|---|
| 1580 | * Parameters: HANDLE                hObj            handle of user object | 
|---|
| 1581 | *             SECURITY_INFORMATION * pSIRequested    address of requested security information | 
|---|
| 1582 | *             LPSECURITY_DESCRIPTOR  pSID            address of security descriptor | 
|---|
| 1583 | *             DWORD                 nLength         size of buffer for security descriptor | 
|---|
| 1584 | *             LPDWORD               lpnLengthNeeded address of required size of buffer | 
|---|
| 1585 | * Variables : | 
|---|
| 1586 | * Result    : If the function succeeds, the return value is TRUE. | 
|---|
| 1587 | *             If the function fails, the return value is FALSE. To get extended | 
|---|
| 1588 | *               error information, call GetLastError. | 
|---|
| 1589 | * Remark    : | 
|---|
| 1590 | * Status    : UNTESTED STUB | 
|---|
| 1591 | * | 
|---|
| 1592 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1593 | *****************************************************************************/ | 
|---|
| 1594 | BOOL WIN32API GetUserObjectSecurity(HANDLE                hObj, | 
|---|
| 1595 | PSECURITY_INFORMATION pSIRequested, | 
|---|
| 1596 | PSECURITY_DESCRIPTOR  pSID, | 
|---|
| 1597 | DWORD                 nLength, | 
|---|
| 1598 | LPDWORD               lpnLengthNeeded) | 
|---|
| 1599 | { | 
|---|
| 1600 | dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n", | 
|---|
| 1601 | hObj, | 
|---|
| 1602 | pSIRequested, | 
|---|
| 1603 | pSID, | 
|---|
| 1604 | nLength, | 
|---|
| 1605 | lpnLengthNeeded)); | 
|---|
| 1606 |  | 
|---|
| 1607 | return (FALSE); | 
|---|
| 1608 | } | 
|---|
| 1609 | /***************************************************************************** | 
|---|
| 1610 | * Name      : HDESK WIN32API OpenDesktopA | 
|---|
| 1611 | * Purpose   : The OpenDesktop function returns a handle to an existing desktop. | 
|---|
| 1612 | *             A desktop is a secure object contained within a window station | 
|---|
| 1613 | *             object. A desktop has a logical display surface and contains | 
|---|
| 1614 | *             windows, menus and hooks. | 
|---|
| 1615 | * Parameters: LPCTSTR lpszDesktopName name of the desktop to open | 
|---|
| 1616 | *             DWORD dwFlags           flags to control interaction with other applications | 
|---|
| 1617 | *             BOOL fInherit           specifies whether returned handle is inheritable | 
|---|
| 1618 | *             DWORD dwDesiredAccess   specifies access of returned handle | 
|---|
| 1619 | * Variables : | 
|---|
| 1620 | * Result    : If the function succeeds, the return value is the handle to the | 
|---|
| 1621 | *               opened desktop. | 
|---|
| 1622 | *             If the function fails, the return value is NULL. To get extended | 
|---|
| 1623 | *               error information, call GetLastError. | 
|---|
| 1624 | * Remark    : | 
|---|
| 1625 | * Status    : UNTESTED STUB | 
|---|
| 1626 | * | 
|---|
| 1627 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1628 | *****************************************************************************/ | 
|---|
| 1629 | HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName, | 
|---|
| 1630 | DWORD   dwFlags, | 
|---|
| 1631 | BOOL    fInherit, | 
|---|
| 1632 | DWORD   dwDesiredAccess) | 
|---|
| 1633 | { | 
|---|
| 1634 | dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n", | 
|---|
| 1635 | lpszDesktopName, | 
|---|
| 1636 | dwFlags, | 
|---|
| 1637 | fInherit, | 
|---|
| 1638 | dwDesiredAccess)); | 
|---|
| 1639 |  | 
|---|
| 1640 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED); | 
|---|
| 1641 | return (NULL); | 
|---|
| 1642 | } | 
|---|
| 1643 | /***************************************************************************** | 
|---|
| 1644 | * Name      : HDESK WIN32API OpenDesktopW | 
|---|
| 1645 | * Purpose   : The OpenDesktop function returns a handle to an existing desktop. | 
|---|
| 1646 | *             A desktop is a secure object contained within a window station | 
|---|
| 1647 | *             object. A desktop has a logical display surface and contains | 
|---|
| 1648 | *             windows, menus and hooks. | 
|---|
| 1649 | * Parameters: LPCTSTR lpszDesktopName name of the desktop to open | 
|---|
| 1650 | *             DWORD dwFlags           flags to control interaction with other applications | 
|---|
| 1651 | *             BOOL fInherit           specifies whether returned handle is inheritable | 
|---|
| 1652 | *             DWORD dwDesiredAccess   specifies access of returned handle | 
|---|
| 1653 | * Variables : | 
|---|
| 1654 | * Result    : If the function succeeds, the return value is the handle to the | 
|---|
| 1655 | *               opened desktop. | 
|---|
| 1656 | *             If the function fails, the return value is NULL. To get extended | 
|---|
| 1657 | *               error information, call GetLastError. | 
|---|
| 1658 | * Remark    : | 
|---|
| 1659 | * Status    : UNTESTED STUB | 
|---|
| 1660 | * | 
|---|
| 1661 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1662 | *****************************************************************************/ | 
|---|
| 1663 | HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName, | 
|---|
| 1664 | DWORD   dwFlags, | 
|---|
| 1665 | BOOL    fInherit, | 
|---|
| 1666 | DWORD   dwDesiredAccess) | 
|---|
| 1667 | { | 
|---|
| 1668 | dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n", | 
|---|
| 1669 | lpszDesktopName, | 
|---|
| 1670 | dwFlags, | 
|---|
| 1671 | fInherit, | 
|---|
| 1672 | dwDesiredAccess)); | 
|---|
| 1673 |  | 
|---|
| 1674 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED); | 
|---|
| 1675 | return (NULL); | 
|---|
| 1676 | } | 
|---|
| 1677 | /***************************************************************************** | 
|---|
| 1678 | * Name      : HDESK WIN32API OpenInputDesktop | 
|---|
| 1679 | * Purpose   : The OpenInputDesktop function returns a handle to the desktop | 
|---|
| 1680 | *             that receives user input. The input desktop is a desktop on the | 
|---|
| 1681 | *             window station associated with the logged-on user. | 
|---|
| 1682 | * Parameters: DWORD dwFlags         flags to control interaction with other applications | 
|---|
| 1683 | *             BOOL  fInherit        specifies whether returned handle is inheritable | 
|---|
| 1684 | *             DWORD dwDesiredAccess specifies access of returned handle | 
|---|
| 1685 | * Variables : | 
|---|
| 1686 | * Result    : If the function succeeds, the return value is a handle of the | 
|---|
| 1687 | *               desktop that receives user input. | 
|---|
| 1688 | *             If the function fails, the return value is NULL. To get extended | 
|---|
| 1689 | *               error information, call GetLastError. | 
|---|
| 1690 | * Remark    : | 
|---|
| 1691 | * Status    : UNTESTED STUB | 
|---|
| 1692 | * | 
|---|
| 1693 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1694 | *****************************************************************************/ | 
|---|
| 1695 | HDESK WIN32API OpenInputDesktop(DWORD dwFlags, | 
|---|
| 1696 | BOOL  fInherit, | 
|---|
| 1697 | DWORD dwDesiredAccess) | 
|---|
| 1698 | { | 
|---|
| 1699 | dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n", | 
|---|
| 1700 | dwFlags, | 
|---|
| 1701 | fInherit, | 
|---|
| 1702 | dwDesiredAccess)); | 
|---|
| 1703 |  | 
|---|
| 1704 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED); | 
|---|
| 1705 | return (NULL); | 
|---|
| 1706 | } | 
|---|
| 1707 | /***************************************************************************** | 
|---|
| 1708 | * Name      : HWINSTA WIN32API OpenWindowStationA | 
|---|
| 1709 | * Purpose   : The OpenWindowStation function returns a handle to an existing | 
|---|
| 1710 | *               window station. | 
|---|
| 1711 | * Parameters: LPCTSTR lpszWinStaName name of the window station to open | 
|---|
| 1712 | *             BOOL fInherit          specifies whether returned handle is inheritable | 
|---|
| 1713 | *             DWORD dwDesiredAccess  specifies access of returned handle | 
|---|
| 1714 | * Variables : | 
|---|
| 1715 | * Result    : If the function succeeds, the return value is the handle to the | 
|---|
| 1716 | *               specified window station. | 
|---|
| 1717 | *             If the function fails, the return value is NULL. To get extended | 
|---|
| 1718 | *               error information, call GetLastError. | 
|---|
| 1719 | * Remark    : | 
|---|
| 1720 | * Status    : UNTESTED STUB | 
|---|
| 1721 | * | 
|---|
| 1722 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1723 | *****************************************************************************/ | 
|---|
| 1724 | HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName, | 
|---|
| 1725 | BOOL    fInherit, | 
|---|
| 1726 | DWORD   dwDesiredAccess) | 
|---|
| 1727 | { | 
|---|
| 1728 | dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n", | 
|---|
| 1729 | lpszWinStaName, | 
|---|
| 1730 | fInherit, | 
|---|
| 1731 | dwDesiredAccess)); | 
|---|
| 1732 |  | 
|---|
| 1733 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED); | 
|---|
| 1734 | return (NULL); | 
|---|
| 1735 | } | 
|---|
| 1736 | /***************************************************************************** | 
|---|
| 1737 | * Name      : HWINSTA WIN32API OpenWindowStationW | 
|---|
| 1738 | * Purpose   : The OpenWindowStation function returns a handle to an existing | 
|---|
| 1739 | *               window station. | 
|---|
| 1740 | * Parameters: LPCTSTR lpszWinStaName name of the window station to open | 
|---|
| 1741 | *             BOOL fInherit          specifies whether returned handle is inheritable | 
|---|
| 1742 | *             DWORD dwDesiredAccess  specifies access of returned handle | 
|---|
| 1743 | * Variables : | 
|---|
| 1744 | * Result    : If the function succeeds, the return value is the handle to the | 
|---|
| 1745 | *               specified window station. | 
|---|
| 1746 | *             If the function fails, the return value is NULL. To get extended | 
|---|
| 1747 | *               error information, call GetLastError. | 
|---|
| 1748 |  | 
|---|
| 1749 |  | 
|---|
| 1750 | * Remark    : | 
|---|
| 1751 | * Status    : UNTESTED STUB | 
|---|
| 1752 | * | 
|---|
| 1753 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1754 | *****************************************************************************/ | 
|---|
| 1755 | HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName, | 
|---|
| 1756 | BOOL    fInherit, | 
|---|
| 1757 | DWORD   dwDesiredAccess) | 
|---|
| 1758 | { | 
|---|
| 1759 | dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n", | 
|---|
| 1760 | lpszWinStaName, | 
|---|
| 1761 | fInherit, | 
|---|
| 1762 | dwDesiredAccess)); | 
|---|
| 1763 |  | 
|---|
| 1764 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED); | 
|---|
| 1765 | return (NULL); | 
|---|
| 1766 | } | 
|---|
| 1767 | /***************************************************************************** | 
|---|
| 1768 | * Name      : BOOL WIN32API SetProcessWindowStation | 
|---|
| 1769 | * Purpose   : The SetProcessWindowStation function assigns a window station | 
|---|
| 1770 | *             to the calling process. This enables the process to access | 
|---|
| 1771 | *             objects in the window station such as desktops, the clipboard, | 
|---|
| 1772 | *             and global atoms. All subsequent operations on the window station | 
|---|
| 1773 | *             use the access rights granted to hWinSta. | 
|---|
| 1774 | * Parameters: | 
|---|
| 1775 | * Variables : | 
|---|
| 1776 | * Result    : If the function succeeds, the return value is TRUE. | 
|---|
| 1777 | *             If the function fails, the return value is FALSE. To get extended | 
|---|
| 1778 | *               error information, call GetLastError. | 
|---|
| 1779 | * Remark    : | 
|---|
| 1780 | * Status    : UNTESTED STUB | 
|---|
| 1781 | * | 
|---|
| 1782 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1783 | *****************************************************************************/ | 
|---|
| 1784 | BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta) | 
|---|
| 1785 | { | 
|---|
| 1786 | dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n", | 
|---|
| 1787 | hWinSta)); | 
|---|
| 1788 |  | 
|---|
| 1789 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED); | 
|---|
| 1790 | return (FALSE); | 
|---|
| 1791 | } | 
|---|
| 1792 | /***************************************************************************** | 
|---|
| 1793 | * Name      : BOOL WIN32API SetThreadDesktop | 
|---|
| 1794 | * Purpose   : The SetThreadDesktop function assigns a desktop to the calling | 
|---|
| 1795 | *             thread. All subsequent operations on the desktop use the access | 
|---|
| 1796 | *             rights granted to hDesk. | 
|---|
| 1797 | * Parameters: HDESK hDesk handle of the desktop to assign to this thread | 
|---|
| 1798 | * Variables : | 
|---|
| 1799 | * Result    : If the function succeeds, the return value is TRUE. | 
|---|
| 1800 | *             If the function fails, the return value is FALSE. To get extended | 
|---|
| 1801 | *             error information, call GetLastError. | 
|---|
| 1802 | * Remark    : | 
|---|
| 1803 | * Status    : UNTESTED STUB | 
|---|
| 1804 | * | 
|---|
| 1805 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1806 | *****************************************************************************/ | 
|---|
| 1807 | BOOL WIN32API SetThreadDesktop(HDESK hDesktop) | 
|---|
| 1808 | { | 
|---|
| 1809 | dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n", | 
|---|
| 1810 | hDesktop)); | 
|---|
| 1811 |  | 
|---|
| 1812 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED); | 
|---|
| 1813 | return (FALSE); | 
|---|
| 1814 | } | 
|---|
| 1815 | /***************************************************************************** | 
|---|
| 1816 | * Name      : BOOL WIN32API SetUserObjectInformationA | 
|---|
| 1817 | * Purpose   : The SetUserObjectInformation function sets information about a | 
|---|
| 1818 | *             window station or desktop object. | 
|---|
| 1819 | * Parameters: HANDLE hObject handle of the object for which to set information | 
|---|
| 1820 | *             int    nIndex  type of information to set | 
|---|
| 1821 | *             PVOID  lpvInfo points to a buffer that contains the information | 
|---|
| 1822 | *             DWORD  cbInfo  size, in bytes, of lpvInfo buffer | 
|---|
| 1823 | * Variables : | 
|---|
| 1824 | * Result    : If the function succeeds, the return value is TRUE. | 
|---|
| 1825 | *             If the function fails the return value is FALSE. To get extended | 
|---|
| 1826 | *               error information, call GetLastError. | 
|---|
| 1827 | * Remark    : | 
|---|
| 1828 | * Status    : UNTESTED STUB | 
|---|
| 1829 | * | 
|---|
| 1830 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1831 | *****************************************************************************/ | 
|---|
| 1832 | BOOL WIN32API SetUserObjectInformationA(HANDLE hObject, | 
|---|
| 1833 | int    nIndex, | 
|---|
| 1834 | PVOID  lpvInfo, | 
|---|
| 1835 | DWORD  cbInfo) | 
|---|
| 1836 | { | 
|---|
| 1837 | dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n", | 
|---|
| 1838 | hObject, | 
|---|
| 1839 | nIndex, | 
|---|
| 1840 | lpvInfo, | 
|---|
| 1841 | cbInfo)); | 
|---|
| 1842 |  | 
|---|
| 1843 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED); | 
|---|
| 1844 | return (FALSE); | 
|---|
| 1845 | } | 
|---|
| 1846 | /***************************************************************************** | 
|---|
| 1847 | * Name      : BOOL WIN32API SetUserObjectInformationW | 
|---|
| 1848 | * Purpose   : The SetUserObjectInformation function sets information about a | 
|---|
| 1849 | *             window station or desktop object. | 
|---|
| 1850 | * Parameters: HANDLE hObject handle of the object for which to set information | 
|---|
| 1851 | *             int    nIndex  type of information to set | 
|---|
| 1852 | *             PVOID  lpvInfo points to a buffer that contains the information | 
|---|
| 1853 | *             DWORD  cbInfo  size, in bytes, of lpvInfo buffer | 
|---|
| 1854 | * Variables : | 
|---|
| 1855 | * Result    : If the function succeeds, the return value is TRUE. | 
|---|
| 1856 | *             If the function fails the return value is FALSE. To get extended | 
|---|
| 1857 | *               error information, call GetLastError. | 
|---|
| 1858 | * Remark    : | 
|---|
| 1859 | * Status    : UNTESTED STUB | 
|---|
| 1860 | * | 
|---|
| 1861 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1862 | *****************************************************************************/ | 
|---|
| 1863 | BOOL WIN32API SetUserObjectInformationW(HANDLE hObject, | 
|---|
| 1864 | int    nIndex, | 
|---|
| 1865 | PVOID  lpvInfo, | 
|---|
| 1866 | DWORD  cbInfo) | 
|---|
| 1867 | { | 
|---|
| 1868 | dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n", | 
|---|
| 1869 | hObject, | 
|---|
| 1870 | nIndex, | 
|---|
| 1871 | lpvInfo, | 
|---|
| 1872 | cbInfo)); | 
|---|
| 1873 |  | 
|---|
| 1874 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED); | 
|---|
| 1875 | return (FALSE); | 
|---|
| 1876 | } | 
|---|
| 1877 | /***************************************************************************** | 
|---|
| 1878 | * Name      : BOOL WIN32API SetUserObjectSecurity | 
|---|
| 1879 | * Purpose   : The SetUserObjectSecurity function sets the security of a user | 
|---|
| 1880 | *             object. This can be, for example, a window or a DDE conversation | 
|---|
| 1881 | * Parameters: HANDLE  hObject           handle of user object | 
|---|
| 1882 | *             SECURITY_INFORMATION * psi address of security information | 
|---|
| 1883 | *             LPSECURITY_DESCRIPTOR  psd address of security descriptor | 
|---|
| 1884 | * Variables : | 
|---|
| 1885 | * Result    : If the function succeeds, the return value is TRUE. | 
|---|
| 1886 | *             If the function fails, the return value is FALSE. To get extended | 
|---|
| 1887 | *             error information, call GetLastError. | 
|---|
| 1888 | * Remark    : | 
|---|
| 1889 | * Status    : UNTESTED STUB | 
|---|
| 1890 | * | 
|---|
| 1891 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1892 | *****************************************************************************/ | 
|---|
| 1893 | BOOL WIN32API SetUserObjectSecurity(HANDLE hObject, | 
|---|
| 1894 | PSECURITY_INFORMATION psi, | 
|---|
| 1895 | PSECURITY_DESCRIPTOR  psd) | 
|---|
| 1896 | { | 
|---|
| 1897 | dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n", | 
|---|
| 1898 | hObject, | 
|---|
| 1899 | psi, | 
|---|
| 1900 | psd)); | 
|---|
| 1901 |  | 
|---|
| 1902 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED); | 
|---|
| 1903 | return (FALSE); | 
|---|
| 1904 | } | 
|---|
| 1905 | /***************************************************************************** | 
|---|
| 1906 | * Name      : BOOL WIN32API SwitchDesktop | 
|---|
| 1907 | * Purpose   : The SwitchDesktop function makes a desktop visible and activates | 
|---|
| 1908 | *             it. This enables the desktop to receive input from the user. The | 
|---|
| 1909 | *             calling process must have DESKTOP_SWITCHDESKTOP access to the | 
|---|
| 1910 | *             desktop for the SwitchDesktop function to succeed. | 
|---|
| 1911 | * Parameters: | 
|---|
| 1912 | * Variables : | 
|---|
| 1913 | * Result    : If the function succeeds, the return value is TRUE. | 
|---|
| 1914 | *             If the function fails, the return value is FALSE. To get extended | 
|---|
| 1915 | *               error information, call GetLastError. | 
|---|
| 1916 | * Remark    : | 
|---|
| 1917 | * Status    : UNTESTED STUB | 
|---|
| 1918 | * | 
|---|
| 1919 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1920 | *****************************************************************************/ | 
|---|
| 1921 | BOOL WIN32API SwitchDesktop(HDESK hDesktop) | 
|---|
| 1922 | { | 
|---|
| 1923 | dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n", | 
|---|
| 1924 | hDesktop)); | 
|---|
| 1925 |  | 
|---|
| 1926 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED); | 
|---|
| 1927 | return (FALSE); | 
|---|
| 1928 | } | 
|---|
| 1929 |  | 
|---|
| 1930 | /* Debugging Functions */ | 
|---|
| 1931 |  | 
|---|
| 1932 | /***************************************************************************** | 
|---|
| 1933 | * Name      : VOID WIN32API SetDebugErrorLevel | 
|---|
| 1934 | * Purpose   : The SetDebugErrorLevel function sets the minimum error level at | 
|---|
| 1935 | *             which Windows will generate debugging events and pass them to a debugger. | 
|---|
| 1936 | * Parameters: DWORD dwLevel debugging error level | 
|---|
| 1937 | * Variables : | 
|---|
| 1938 | * Result    : | 
|---|
| 1939 | * Remark    : | 
|---|
| 1940 | * Status    : UNTESTED STUB | 
|---|
| 1941 | * | 
|---|
| 1942 | * Author    : Patrick Haller [Thu, 1998/02/26 11:55] | 
|---|
| 1943 | *****************************************************************************/ | 
|---|
| 1944 | VOID WIN32API SetDebugErrorLevel(DWORD dwLevel) | 
|---|
| 1945 | { | 
|---|
| 1946 | dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n", | 
|---|
| 1947 | dwLevel)); | 
|---|
| 1948 | } | 
|---|
| 1949 |  | 
|---|
| 1950 | /* Drag'n'drop */ | 
|---|
| 1951 |  | 
|---|
| 1952 | /***************************************************************************** | 
|---|
| 1953 | * Name      : BOOL WIN32API DragObject | 
|---|
| 1954 | * Purpose   : Unknown | 
|---|
| 1955 | * Parameters: Unknown | 
|---|
| 1956 | * Variables : | 
|---|
| 1957 | * Result    : | 
|---|
| 1958 | * Remark    : | 
|---|
| 1959 | * Status    : UNTESTED UNKNOWN STUB | 
|---|
| 1960 | * | 
|---|
| 1961 | * Author    : Patrick Haller [Wed, 1998/06/16 11:55] | 
|---|
| 1962 | *****************************************************************************/ | 
|---|
| 1963 | DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5) | 
|---|
| 1964 | { | 
|---|
| 1965 | dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n", | 
|---|
| 1966 | x1, | 
|---|
| 1967 | x2, | 
|---|
| 1968 | x3, | 
|---|
| 1969 | x4, | 
|---|
| 1970 | x5)); | 
|---|
| 1971 |  | 
|---|
| 1972 | return (FALSE); /* default */ | 
|---|
| 1973 | } | 
|---|
| 1974 |  | 
|---|
| 1975 | /* Unknown */ | 
|---|
| 1976 |  | 
|---|
| 1977 | /***************************************************************************** | 
|---|
| 1978 | * Name      : BOOL WIN32API SetShellWindow | 
|---|
| 1979 | * Purpose   : Unknown | 
|---|
| 1980 | * Parameters: Unknown | 
|---|
| 1981 | * Variables : | 
|---|
| 1982 | * Result    : | 
|---|
| 1983 | * Remark    : | 
|---|
| 1984 | * Status    : UNTESTED UNKNOWN STUB | 
|---|
| 1985 | * | 
|---|
| 1986 | * Author    : Patrick Haller [Wed, 1998/06/16 11:55] | 
|---|
| 1987 | *****************************************************************************/ | 
|---|
| 1988 | BOOL WIN32API SetShellWindow(DWORD x1) | 
|---|
| 1989 | { | 
|---|
| 1990 | dprintf(("USER32: SetShellWindow(%08x) not implemented.\n", | 
|---|
| 1991 | x1)); | 
|---|
| 1992 |  | 
|---|
| 1993 | return (FALSE); /* default */ | 
|---|
| 1994 | } | 
|---|
| 1995 | /***************************************************************************** | 
|---|
| 1996 | * Name      : BOOL WIN32API PlaySoundEvent | 
|---|
| 1997 | * Purpose   : Unknown | 
|---|
| 1998 | * Parameters: Unknown | 
|---|
| 1999 | * Variables : | 
|---|
| 2000 | * Result    : | 
|---|
| 2001 | * Remark    : | 
|---|
| 2002 | * Status    : UNTESTED UNKNOWN STUB | 
|---|
| 2003 | * | 
|---|
| 2004 | * Author    : Patrick Haller [Wed, 1998/06/16 11:55] | 
|---|
| 2005 | *****************************************************************************/ | 
|---|
| 2006 | BOOL WIN32API PlaySoundEvent(DWORD x1) | 
|---|
| 2007 | { | 
|---|
| 2008 | dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n", | 
|---|
| 2009 | x1)); | 
|---|
| 2010 |  | 
|---|
| 2011 | return (FALSE); /* default */ | 
|---|
| 2012 | } | 
|---|
| 2013 | /***************************************************************************** | 
|---|
| 2014 | * Name      : BOOL WIN32API SetSysColorsTemp | 
|---|
| 2015 | * Purpose   : Unknown | 
|---|
| 2016 | * Parameters: Unknown | 
|---|
| 2017 | * Variables : | 
|---|
| 2018 | * Result    : | 
|---|
| 2019 | * Remark    : | 
|---|
| 2020 | * Status    : UNTESTED UNKNOWN STUB | 
|---|
| 2021 | * | 
|---|
| 2022 | * Author    : Patrick Haller [Wed, 1998/06/16 11:55] | 
|---|
| 2023 | *****************************************************************************/ | 
|---|
| 2024 | BOOL WIN32API SetSysColorsTemp(void) | 
|---|
| 2025 | { | 
|---|
| 2026 | dprintf(("USER32: SetSysColorsTemp() not implemented.\n")); | 
|---|
| 2027 |  | 
|---|
| 2028 | return (FALSE); /* default */ | 
|---|
| 2029 | } | 
|---|
| 2030 | /***************************************************************************** | 
|---|
| 2031 | * Name      : BOOL WIN32API RegisterNetworkCapabilities | 
|---|
| 2032 | * Purpose   : Unknown | 
|---|
| 2033 | * Parameters: Unknown | 
|---|
| 2034 | * Variables : | 
|---|
| 2035 | * Result    : | 
|---|
| 2036 | * Remark    : | 
|---|
| 2037 | * Status    : UNTESTED UNKNOWN STUB | 
|---|
| 2038 | * | 
|---|
| 2039 | * Author    : Patrick Haller [Wed, 1998/06/16 11:55] | 
|---|
| 2040 | *****************************************************************************/ | 
|---|
| 2041 | BOOL WIN32API RegisterNetworkCapabilities(DWORD x1, | 
|---|
| 2042 | DWORD x2) | 
|---|
| 2043 | { | 
|---|
| 2044 | dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n", | 
|---|
| 2045 | x1, | 
|---|
| 2046 | x2)); | 
|---|
| 2047 |  | 
|---|
| 2048 | return (FALSE); /* default */ | 
|---|
| 2049 | } | 
|---|
| 2050 | /***************************************************************************** | 
|---|
| 2051 | * Name      : BOOL WIN32API EndTask | 
|---|
| 2052 | * Purpose   : Unknown | 
|---|
| 2053 | * Parameters: Unknown | 
|---|
| 2054 | * Variables : | 
|---|
| 2055 | * Result    : | 
|---|
| 2056 | * Remark    : | 
|---|
| 2057 | * Status    : UNTESTED UNKNOWN STUB | 
|---|
| 2058 | * | 
|---|
| 2059 | * Author    : Patrick Haller [Wed, 1998/06/16 11:55] | 
|---|
| 2060 | *****************************************************************************/ | 
|---|
| 2061 | BOOL WIN32API EndTask(DWORD x1, DWORD x2, DWORD x3) | 
|---|
| 2062 | { | 
|---|
| 2063 | dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n", | 
|---|
| 2064 | x1, | 
|---|
| 2065 | x2, | 
|---|
| 2066 | x3)); | 
|---|
| 2067 |  | 
|---|
| 2068 | return (FALSE); /* default */ | 
|---|
| 2069 | } | 
|---|
| 2070 | /***************************************************************************** | 
|---|
| 2071 | * Name      : BOOL WIN32API GetNextQueueWindow | 
|---|
| 2072 | * Purpose   : Unknown | 
|---|
| 2073 | * Parameters: Unknown | 
|---|
| 2074 | * Variables : | 
|---|
| 2075 | * Result    : | 
|---|
| 2076 | * Remark    : | 
|---|
| 2077 | * Status    : UNTESTED UNKNOWN STUB | 
|---|
| 2078 | * | 
|---|
| 2079 | * Author    : Patrick Haller [Wed, 1998/06/16 11:55] | 
|---|
| 2080 | *****************************************************************************/ | 
|---|
| 2081 | BOOL WIN32API GetNextQueueWindow(DWORD x1, DWORD x2) | 
|---|
| 2082 | { | 
|---|
| 2083 | dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n", | 
|---|
| 2084 | x1, | 
|---|
| 2085 | x2)); | 
|---|
| 2086 |  | 
|---|
| 2087 | return (FALSE); /* default */ | 
|---|
| 2088 | } | 
|---|
| 2089 | /***************************************************************************** | 
|---|
| 2090 | * Name      : BOOL WIN32API YieldTask | 
|---|
| 2091 | * Purpose   : Unknown | 
|---|
| 2092 | * Parameters: Unknown | 
|---|
| 2093 | * Variables : | 
|---|
| 2094 | * Result    : | 
|---|
| 2095 | * Remark    : | 
|---|
| 2096 | * Status    : UNTESTED UNKNOWN STUB | 
|---|
| 2097 | * | 
|---|
| 2098 | * Author    : Patrick Haller [Wed, 1998/06/16 11:55] | 
|---|
| 2099 | *****************************************************************************/ | 
|---|
| 2100 | BOOL WIN32API YieldTask(void) | 
|---|
| 2101 | { | 
|---|
| 2102 | dprintf(("USER32: YieldTask() not implemented.\n")); | 
|---|
| 2103 |  | 
|---|
| 2104 | return (FALSE); /* default */ | 
|---|
| 2105 | } | 
|---|
| 2106 | /***************************************************************************** | 
|---|
| 2107 | * Name      : BOOL WIN32API WinOldAppHackoMatic | 
|---|
| 2108 | * Purpose   : Unknown | 
|---|
| 2109 | * Parameters: Unknown | 
|---|
| 2110 | * Variables : | 
|---|
| 2111 | * Result    : | 
|---|
| 2112 | * Remark    : | 
|---|
| 2113 | * Status    : UNTESTED UNKNOWN STUB | 
|---|
| 2114 | * | 
|---|
| 2115 | * Author    : Patrick Haller [Wed, 1998/06/16 11:55] | 
|---|
| 2116 | *****************************************************************************/ | 
|---|
| 2117 | BOOL WIN32API WinOldAppHackoMatic(DWORD x1) | 
|---|
| 2118 | { | 
|---|
| 2119 | dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n", | 
|---|
| 2120 | x1)); | 
|---|
| 2121 |  | 
|---|
| 2122 | return (FALSE); /* default */ | 
|---|
| 2123 | } | 
|---|
| 2124 | /***************************************************************************** | 
|---|
| 2125 | * Name      : BOOL WIN32API RegisterSystemThread | 
|---|
| 2126 | * Purpose   : Unknown | 
|---|
| 2127 | * Parameters: Unknown | 
|---|
| 2128 | * Variables : | 
|---|
| 2129 | * Result    : | 
|---|
| 2130 | * Remark    : | 
|---|
| 2131 | * Status    : UNTESTED UNKNOWN STUB | 
|---|
| 2132 | * | 
|---|
| 2133 | * Author    : Patrick Haller [Wed, 1998/06/16 11:55] | 
|---|
| 2134 | *****************************************************************************/ | 
|---|
| 2135 | BOOL WIN32API RegisterSystemThread(DWORD x1, | 
|---|
| 2136 | DWORD x2) | 
|---|
| 2137 | { | 
|---|
| 2138 | dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n", | 
|---|
| 2139 | x1, | 
|---|
| 2140 | x2)); | 
|---|
| 2141 |  | 
|---|
| 2142 | return (FALSE); /* default */ | 
|---|
| 2143 | } | 
|---|
| 2144 | /***************************************************************************** | 
|---|
| 2145 | * Name      : BOOL WIN32API IsHungThread | 
|---|
| 2146 | * Purpose   : Unknown | 
|---|
| 2147 | * Parameters: Unknown | 
|---|
| 2148 | * Variables : | 
|---|
| 2149 | * Result    : | 
|---|
| 2150 | * Remark    : | 
|---|
| 2151 | * Status    : UNTESTED UNKNOWN STUB | 
|---|
| 2152 | * | 
|---|
| 2153 | * Author    : Patrick Haller [Wed, 1998/06/16 11:55] | 
|---|
| 2154 | *****************************************************************************/ | 
|---|
| 2155 | BOOL WIN32API IsHungThread(DWORD x1) | 
|---|
| 2156 | { | 
|---|
| 2157 | dprintf(("USER32: IsHungThread(%08xh) not implemented.\n", | 
|---|
| 2158 | x1)); | 
|---|
| 2159 |  | 
|---|
| 2160 | return (FALSE); /* default */ | 
|---|
| 2161 | } | 
|---|
| 2162 | /***************************************************************************** | 
|---|
| 2163 | * Name      : BOOL WIN32API UserSignalProc | 
|---|
| 2164 | * Purpose   : Unknown | 
|---|
| 2165 | * Parameters: Unknown | 
|---|
| 2166 | * Variables : | 
|---|
| 2167 | * Result    : | 
|---|
| 2168 | * Remark    : | 
|---|
| 2169 | * Status    : UNTESTED UNKNOWN STUB | 
|---|
| 2170 | * | 
|---|
| 2171 | * Author    : Patrick Haller [Wed, 1998/06/16 11:55] | 
|---|
| 2172 | *****************************************************************************/ | 
|---|
| 2173 | BOOL WIN32API UserSignalProc(DWORD x1, | 
|---|
| 2174 | DWORD x2, | 
|---|
| 2175 | DWORD x3, | 
|---|
| 2176 | DWORD x4) | 
|---|
| 2177 | { | 
|---|
| 2178 | dprintf(("USER32: UserSignalProc(%08xh,%08xh,%08xh,%08xh) not implemented.\n", | 
|---|
| 2179 | x1, | 
|---|
| 2180 | x2, | 
|---|
| 2181 | x3, | 
|---|
| 2182 | x4)); | 
|---|
| 2183 |  | 
|---|
| 2184 | return (FALSE); /* default */ | 
|---|
| 2185 | } | 
|---|
| 2186 | /***************************************************************************** | 
|---|
| 2187 | * Name      : BOOL WIN32API GetShellWindow | 
|---|
| 2188 | * Purpose   : Unknown | 
|---|
| 2189 | * Parameters: Unknown | 
|---|
| 2190 | * Variables : | 
|---|
| 2191 | * Result    : | 
|---|
| 2192 | * Remark    : | 
|---|
| 2193 | * Status    : UNTESTED UNKNOWN STUB | 
|---|
| 2194 | * | 
|---|
| 2195 | * Author    : Patrick Haller [Wed, 1998/06/16 11:55] | 
|---|
| 2196 | *****************************************************************************/ | 
|---|
| 2197 | HWND WIN32API GetShellWindow(void) | 
|---|
| 2198 | { | 
|---|
| 2199 | dprintf(("USER32: GetShellWindow() not implemented.\n")); | 
|---|
| 2200 |  | 
|---|
| 2201 | return (0); /* default */ | 
|---|
| 2202 | } | 
|---|
| 2203 | /*********************************************************************** | 
|---|
| 2204 | *           RegisterTasklist32                [USER32.436] | 
|---|
| 2205 | */ | 
|---|
| 2206 | DWORD WIN32API RegisterTasklist (DWORD x) | 
|---|
| 2207 | { | 
|---|
| 2208 | dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n", | 
|---|
| 2209 | x)); | 
|---|
| 2210 |  | 
|---|
| 2211 | return TRUE; | 
|---|
| 2212 | } | 
|---|
| 2213 | /*********************************************************************** | 
|---|
| 2214 | *           SetLogonNotifyWindow   (USER32.486) | 
|---|
| 2215 | */ | 
|---|
| 2216 | DWORD WIN32API SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd) | 
|---|
| 2217 | { | 
|---|
| 2218 | dprintf(("USER32: SetLogonNotifyWindow - empty stub!")); | 
|---|
| 2219 |  | 
|---|
| 2220 | return 1; | 
|---|
| 2221 | } | 
|---|
| 2222 |  | 
|---|
| 2223 |  | 
|---|
| 2224 | DWORD WIN32API GetGUIThreadInfo(DWORD arg1, DWORD arg2) | 
|---|
| 2225 | { | 
|---|
| 2226 | dprintf(("USER32: GetGUIThreadInfo %x %x - empty stub!!", arg1, arg2)); | 
|---|
| 2227 |  | 
|---|
| 2228 | return 0; | 
|---|
| 2229 | } | 
|---|