Fixed header dependencies to be fully compatible with the Windows
[wine/multimedia.git] / dlls / user / misc.c
blobbec20ff7d5da05a941ffdb66e6df7426d67d5386
1 /*
2 * Misc USER functions
4 * Copyright 1995 Thomas Sandford
5 * Copyright 1997 Marcus Meissner
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include <stdarg.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "wingdi.h"
27 #include "winuser.h"
28 #include "winerror.h"
30 #include "wine/debug.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(win);
34 /**********************************************************************
35 * SetLastErrorEx [USER32.@] Sets the last-error code.
37 * RETURNS
38 * None.
40 void WINAPI SetLastErrorEx(
41 DWORD error, /* [in] Per-thread error code */
42 DWORD type) /* [in] Error type */
44 TRACE("(0x%08lx, 0x%08lx)\n", error,type);
45 switch(type) {
46 case 0:
47 break;
48 case SLE_ERROR:
49 case SLE_MINORERROR:
50 case SLE_WARNING:
51 /* Fall through for now */
52 default:
53 FIXME("(error=%08lx, type=%08lx): Unhandled type\n", error,type);
54 break;
56 SetLastError( error );
60 /******************************************************************************
61 * GetProcessWindowStation [USER32.@] Returns handle of window station
63 * NOTES
64 * Docs say the return value is HWINSTA
66 * RETURNS
67 * Success: Handle to window station associated with calling process
68 * Failure: NULL
70 HWINSTA WINAPI GetProcessWindowStation(void)
72 FIXME("(void): stub\n");
73 return (HWINSTA)1;
77 /******************************************************************************
78 * GetThreadDesktop [USER32.@] Returns handle to desktop
80 * NOTES
81 * Docs say the return value is HDESK
83 * PARAMS
84 * dwThreadId [I] Thread identifier
86 * RETURNS
87 * Success: Handle to desktop associated with specified thread
88 * Failure: NULL
90 DWORD WINAPI GetThreadDesktop( DWORD dwThreadId )
92 FIXME("(%lx): stub\n",dwThreadId);
93 return 1;
97 /******************************************************************************
98 * SetDebugErrorLevel [USER32.@]
99 * Sets the minimum error level for generating debugging events
101 * PARAMS
102 * dwLevel [I] Debugging error level
104 VOID WINAPI SetDebugErrorLevel( DWORD dwLevel )
106 FIXME("(%ld): stub\n", dwLevel);
110 /******************************************************************************
111 * GetProcessDefaultLayout [USER32.@]
113 * Gets the default layout for parentless windows.
114 * Right now, just returns 0 (left-to-right).
116 * RETURNS
117 * Success: Nonzero
118 * Failure: Zero
120 * BUGS
121 * No RTL
123 BOOL WINAPI GetProcessDefaultLayout( DWORD *pdwDefaultLayout )
125 if ( !pdwDefaultLayout ) {
126 SetLastError( ERROR_INVALID_PARAMETER );
127 return FALSE;
129 FIXME( "( %p ): No BiDi\n", pdwDefaultLayout );
130 *pdwDefaultLayout = 0;
131 return TRUE;
135 /******************************************************************************
136 * SetProcessDefaultLayout [USER32.@]
138 * Sets the default layout for parentless windows.
139 * Right now, only accepts 0 (left-to-right).
141 * RETURNS
142 * Success: Nonzero
143 * Failure: Zero
145 * BUGS
146 * No RTL
148 BOOL WINAPI SetProcessDefaultLayout( DWORD dwDefaultLayout )
150 if ( dwDefaultLayout == 0 )
151 return TRUE;
152 FIXME( "( %08lx ): No BiDi\n", dwDefaultLayout );
153 SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
154 return FALSE;
158 /******************************************************************************
159 * OpenDesktopA [USER32.@]
161 * NOTES
162 * Return type should be HDESK
164 * Not supported on Win9x - returns NULL and calls SetLastError.
166 HANDLE WINAPI OpenDesktopA( LPCSTR lpszDesktop, DWORD dwFlags,
167 BOOL fInherit, DWORD dwDesiredAccess )
169 FIXME("(%s,%lx,%i,%lx): stub\n",debugstr_a(lpszDesktop),dwFlags,
170 fInherit,dwDesiredAccess);
172 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
173 return 0;
177 /******************************************************************************
178 * SetUserObjectInformationA (USER32.@)
180 BOOL WINAPI SetUserObjectInformationA( HANDLE hObj, INT nIndex,
181 LPVOID pvInfo, DWORD nLength )
183 FIXME("(%p,%d,%p,%lx): stub\n",hObj,nIndex,pvInfo,nLength);
184 return TRUE;
187 /******************************************************************************
188 * SetThreadDesktop (USER32.@)
190 BOOL WINAPI SetThreadDesktop( HANDLE hDesktop )
192 FIXME("(%p): stub\n",hDesktop);
193 return TRUE;
197 /***********************************************************************
198 * RegisterShellHookWindow [USER32.@]
200 BOOL WINAPI RegisterShellHookWindow ( HWND hWnd )
202 FIXME("(%p): stub\n", hWnd);
203 return 0;
207 /***********************************************************************
208 * DeregisterShellHookWindow [USER32.@]
210 HRESULT WINAPI DeregisterShellHookWindow ( DWORD u )
212 FIXME("0x%08lx stub\n",u);
213 return 0;
218 /***********************************************************************
219 * RegisterTasklist [USER32.@]
221 DWORD WINAPI RegisterTasklist (DWORD x)
223 FIXME("0x%08lx\n",x);
224 return TRUE;
228 /***********************************************************************
229 * GetAppCompatFlags (USER32.@)
231 DWORD WINAPI GetAppCompatFlags( HTASK hTask )
233 FIXME("stub\n");
234 return 0;
238 /***********************************************************************
239 * AlignRects (USER32.@)
241 BOOL WINAPI AlignRects(LPRECT rect, DWORD b, DWORD c, DWORD d)
243 FIXME("(%p, %ld, %ld, %ld): stub\n", rect, b, c, d);
244 if (rect)
245 FIXME("rect: [[%ld, %ld], [%ld, %ld]]\n", rect->left, rect->top, rect->right, rect->bottom);
246 /* Calls OffsetRect */
247 return FALSE;
251 /***********************************************************************
252 * USER_489 (USER.489)
254 LONG WINAPI stub_USER_489(void) { FIXME("stub\n"); return 0; }
256 /***********************************************************************
257 * USER_490 (USER.490)
259 LONG WINAPI stub_USER_490(void) { FIXME("stub\n"); return 0; }
261 /***********************************************************************
262 * USER_492 (USER.492)
264 LONG WINAPI stub_USER_492(void) { FIXME("stub\n"); return 0; }
266 /***********************************************************************
267 * USER_496 (USER.496)
269 LONG WINAPI stub_USER_496(void) { FIXME("stub\n"); return 0; }