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