Silence some warnings due to casts between pointer and integers of
[wine/multimedia.git] / dlls / user / misc.c
blob7c64997fd85152218c33b95ccbb004469f80eb15
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 "windef.h"
23 #include "winbase.h"
24 #include "wingdi.h"
25 #include "winuser.h"
26 #include "winerror.h"
28 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(win);
32 /**********************************************************************
33 * SetLastErrorEx [USER32.@] Sets the last-error code.
35 * RETURNS
36 * None.
38 void WINAPI SetLastErrorEx(
39 DWORD error, /* [in] Per-thread error code */
40 DWORD type) /* [in] Error type */
42 TRACE("(0x%08lx, 0x%08lx)\n", error,type);
43 switch(type) {
44 case 0:
45 break;
46 case SLE_ERROR:
47 case SLE_MINORERROR:
48 case SLE_WARNING:
49 /* Fall through for now */
50 default:
51 FIXME("(error=%08lx, type=%08lx): Unhandled type\n", error,type);
52 break;
54 SetLastError( error );
58 /******************************************************************************
59 * GetProcessWindowStation [USER32.@] Returns handle of window station
61 * NOTES
62 * Docs say the return value is HWINSTA
64 * RETURNS
65 * Success: Handle to window station associated with calling process
66 * Failure: NULL
68 HWINSTA WINAPI GetProcessWindowStation(void)
70 FIXME("(void): stub\n");
71 return (HWINSTA)1;
75 /******************************************************************************
76 * GetThreadDesktop [USER32.@] Returns handle to desktop
78 * NOTES
79 * Docs say the return value is HDESK
81 * PARAMS
82 * dwThreadId [I] Thread identifier
84 * RETURNS
85 * Success: Handle to desktop associated with specified thread
86 * Failure: NULL
88 DWORD WINAPI GetThreadDesktop( DWORD dwThreadId )
90 FIXME("(%lx): stub\n",dwThreadId);
91 return 1;
95 /******************************************************************************
96 * SetDebugErrorLevel [USER32.@]
97 * Sets the minimum error level for generating debugging events
99 * PARAMS
100 * dwLevel [I] Debugging error level
102 VOID WINAPI SetDebugErrorLevel( DWORD dwLevel )
104 FIXME("(%ld): stub\n", dwLevel);
108 /******************************************************************************
109 * GetProcessDefaultLayout [USER32.@]
111 * Gets the default layout for parentless windows.
112 * Right now, just returns 0 (left-to-right).
114 * RETURNS
115 * Success: Nonzero
116 * Failure: Zero
118 * BUGS
119 * No RTL
121 BOOL WINAPI GetProcessDefaultLayout( DWORD *pdwDefaultLayout )
123 if ( !pdwDefaultLayout ) {
124 SetLastError( ERROR_INVALID_PARAMETER );
125 return FALSE;
127 FIXME( "( %p ): No BiDi\n", pdwDefaultLayout );
128 *pdwDefaultLayout = 0;
129 return TRUE;
133 /******************************************************************************
134 * SetProcessDefaultLayout [USER32.@]
136 * Sets the default layout for parentless windows.
137 * Right now, only accepts 0 (left-to-right).
139 * RETURNS
140 * Success: Nonzero
141 * Failure: Zero
143 * BUGS
144 * No RTL
146 BOOL WINAPI SetProcessDefaultLayout( DWORD dwDefaultLayout )
148 if ( dwDefaultLayout == 0 )
149 return TRUE;
150 FIXME( "( %08lx ): No BiDi\n", dwDefaultLayout );
151 SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
152 return FALSE;
156 /******************************************************************************
157 * OpenDesktopA [USER32.@]
159 * NOTES
160 * Return type should be HDESK
162 * Not supported on Win9x - returns NULL and calls SetLastError.
164 HANDLE WINAPI OpenDesktopA( LPCSTR lpszDesktop, DWORD dwFlags,
165 BOOL fInherit, DWORD dwDesiredAccess )
167 FIXME("(%s,%lx,%i,%lx): stub\n",debugstr_a(lpszDesktop),dwFlags,
168 fInherit,dwDesiredAccess);
170 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
171 return 0;
175 /******************************************************************************
176 * SetUserObjectInformationA (USER32.@)
178 BOOL WINAPI SetUserObjectInformationA( HANDLE hObj, INT nIndex,
179 LPVOID pvInfo, DWORD nLength )
181 FIXME("(%x,%d,%p,%lx): stub\n",hObj,nIndex,pvInfo,nLength);
182 return TRUE;
185 /******************************************************************************
186 * SetThreadDesktop (USER32.@)
188 BOOL WINAPI SetThreadDesktop( HANDLE hDesktop )
190 FIXME("(%x): stub\n",hDesktop);
191 return TRUE;
195 /***********************************************************************
196 * RegisterShellHookWindow [USER32.@]
198 HRESULT WINAPI RegisterShellHookWindow ( DWORD u )
200 FIXME("0x%08lx stub\n",u);
201 return 0;
205 /***********************************************************************
206 * DeregisterShellHookWindow [USER32.@]
208 HRESULT WINAPI DeregisterShellHookWindow ( DWORD u )
210 FIXME("0x%08lx stub\n",u);
211 return 0;
216 /***********************************************************************
217 * RegisterTasklist [USER32.@]
219 DWORD WINAPI RegisterTasklist (DWORD x)
221 FIXME("0x%08lx\n",x);
222 return TRUE;
226 /***********************************************************************
227 * GetAppCompatFlags (USER32.@)
229 DWORD WINAPI GetAppCompatFlags( HTASK hTask )
231 FIXME("stub\n");
232 return 0;
236 /***********************************************************************
237 * USER_489 (USER.489)
239 LONG WINAPI stub_USER_489(void) { FIXME("stub\n"); return 0; }
241 /***********************************************************************
242 * USER_490 (USER.490)
244 LONG WINAPI stub_USER_490(void) { FIXME("stub\n"); return 0; }
246 /***********************************************************************
247 * USER_492 (USER.492)
249 LONG WINAPI stub_USER_492(void) { FIXME("stub\n"); return 0; }
251 /***********************************************************************
252 * USER_496 (USER.496)
254 LONG WINAPI stub_USER_496(void) { FIXME("stub\n"); return 0; }