2000-08-04 06:21:02 +02:00
|
|
|
/*
|
|
|
|
* Misc USER functions
|
|
|
|
*
|
|
|
|
* Copyright 1995 Thomas Sandford
|
|
|
|
* Copyright 1997 Marcus Meissner
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2000-08-04 06:21:02 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "wingdi.h"
|
|
|
|
#include "winuser.h"
|
|
|
|
#include "winerror.h"
|
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
2000-08-04 06:21:02 +02:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(win);
|
2000-08-04 06:21:02 +02:00
|
|
|
|
|
|
|
/**********************************************************************
|
2001-01-25 23:22:21 +01:00
|
|
|
* SetLastErrorEx [USER32.@] Sets the last-error code.
|
2000-08-04 06:21:02 +02:00
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* None.
|
|
|
|
*/
|
|
|
|
void WINAPI SetLastErrorEx(
|
|
|
|
DWORD error, /* [in] Per-thread error code */
|
|
|
|
DWORD type) /* [in] Error type */
|
|
|
|
{
|
|
|
|
TRACE("(0x%08lx, 0x%08lx)\n", error,type);
|
|
|
|
switch(type) {
|
|
|
|
case 0:
|
|
|
|
break;
|
|
|
|
case SLE_ERROR:
|
|
|
|
case SLE_MINORERROR:
|
|
|
|
case SLE_WARNING:
|
|
|
|
/* Fall through for now */
|
|
|
|
default:
|
|
|
|
FIXME("(error=%08lx, type=%08lx): Unhandled type\n", error,type);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
SetLastError( error );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-01-25 23:22:21 +01:00
|
|
|
* GetProcessWindowStation [USER32.@] Returns handle of window station
|
2000-08-04 06:21:02 +02:00
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* Docs say the return value is HWINSTA
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: Handle to window station associated with calling process
|
|
|
|
* Failure: NULL
|
|
|
|
*/
|
2001-01-09 21:56:06 +01:00
|
|
|
HWINSTA WINAPI GetProcessWindowStation(void)
|
2000-08-04 06:21:02 +02:00
|
|
|
{
|
|
|
|
FIXME("(void): stub\n");
|
2001-01-09 21:56:06 +01:00
|
|
|
return (HWINSTA)1;
|
2000-08-04 06:21:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-01-25 23:22:21 +01:00
|
|
|
* GetThreadDesktop [USER32.@] Returns handle to desktop
|
2000-08-04 06:21:02 +02:00
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* Docs say the return value is HDESK
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* dwThreadId [I] Thread identifier
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: Handle to desktop associated with specified thread
|
|
|
|
* Failure: NULL
|
|
|
|
*/
|
|
|
|
DWORD WINAPI GetThreadDesktop( DWORD dwThreadId )
|
|
|
|
{
|
|
|
|
FIXME("(%lx): stub\n",dwThreadId);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-01-25 23:22:21 +01:00
|
|
|
* SetDebugErrorLevel [USER32.@]
|
2000-08-04 06:21:02 +02:00
|
|
|
* Sets the minimum error level for generating debugging events
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* dwLevel [I] Debugging error level
|
|
|
|
*/
|
|
|
|
VOID WINAPI SetDebugErrorLevel( DWORD dwLevel )
|
|
|
|
{
|
|
|
|
FIXME("(%ld): stub\n", dwLevel);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-01-25 23:22:21 +01:00
|
|
|
* GetProcessDefaultLayout [USER32.@]
|
2000-08-04 06:21:02 +02:00
|
|
|
*
|
|
|
|
* Gets the default layout for parentless windows.
|
|
|
|
* Right now, just returns 0 (left-to-right).
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: Nonzero
|
|
|
|
* Failure: Zero
|
|
|
|
*
|
|
|
|
* BUGS
|
|
|
|
* No RTL
|
|
|
|
*/
|
|
|
|
BOOL WINAPI GetProcessDefaultLayout( DWORD *pdwDefaultLayout )
|
|
|
|
{
|
|
|
|
if ( !pdwDefaultLayout ) {
|
|
|
|
SetLastError( ERROR_INVALID_PARAMETER );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
FIXME( "( %p ): No BiDi\n", pdwDefaultLayout );
|
|
|
|
*pdwDefaultLayout = 0;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-01-25 23:22:21 +01:00
|
|
|
* SetProcessDefaultLayout [USER32.@]
|
2000-08-04 06:21:02 +02:00
|
|
|
*
|
|
|
|
* Sets the default layout for parentless windows.
|
|
|
|
* Right now, only accepts 0 (left-to-right).
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: Nonzero
|
|
|
|
* Failure: Zero
|
|
|
|
*
|
|
|
|
* BUGS
|
|
|
|
* No RTL
|
|
|
|
*/
|
|
|
|
BOOL WINAPI SetProcessDefaultLayout( DWORD dwDefaultLayout )
|
|
|
|
{
|
|
|
|
if ( dwDefaultLayout == 0 )
|
|
|
|
return TRUE;
|
|
|
|
FIXME( "( %08lx ): No BiDi\n", dwDefaultLayout );
|
|
|
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-01-25 23:22:21 +01:00
|
|
|
* OpenDesktopA [USER32.@]
|
2000-08-04 06:21:02 +02:00
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* Return type should be HDESK
|
|
|
|
*
|
|
|
|
* Not supported on Win9x - returns NULL and calls SetLastError.
|
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
HANDLE WINAPI OpenDesktopA( LPCSTR lpszDesktop, DWORD dwFlags,
|
2000-08-04 06:21:02 +02:00
|
|
|
BOOL fInherit, DWORD dwDesiredAccess )
|
|
|
|
{
|
|
|
|
FIXME("(%s,%lx,%i,%lx): stub\n",debugstr_a(lpszDesktop),dwFlags,
|
|
|
|
fInherit,dwDesiredAccess);
|
|
|
|
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-01-25 23:22:21 +01:00
|
|
|
* SetUserObjectInformationA (USER32.@)
|
2000-08-04 06:21:02 +02:00
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
BOOL WINAPI SetUserObjectInformationA( HANDLE hObj, INT nIndex,
|
2000-08-04 06:21:02 +02:00
|
|
|
LPVOID pvInfo, DWORD nLength )
|
|
|
|
{
|
|
|
|
FIXME("(%x,%d,%p,%lx): stub\n",hObj,nIndex,pvInfo,nLength);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2001-01-25 23:22:21 +01:00
|
|
|
* SetThreadDesktop (USER32.@)
|
2000-08-04 06:21:02 +02:00
|
|
|
*/
|
|
|
|
BOOL WINAPI SetThreadDesktop( HANDLE hDesktop )
|
|
|
|
{
|
|
|
|
FIXME("(%x): stub\n",hDesktop);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-01-25 23:22:21 +01:00
|
|
|
* RegisterShellHookWindow [USER32.@]
|
2000-08-04 06:21:02 +02:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI RegisterShellHookWindow ( DWORD u )
|
|
|
|
{
|
|
|
|
FIXME("0x%08lx stub\n",u);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-01-25 23:22:21 +01:00
|
|
|
* DeregisterShellHookWindow [USER32.@]
|
2000-08-04 06:21:02 +02:00
|
|
|
*/
|
|
|
|
HRESULT WINAPI DeregisterShellHookWindow ( DWORD u )
|
|
|
|
{
|
|
|
|
FIXME("0x%08lx stub\n",u);
|
|
|
|
return 0;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2000-08-04 06:21:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-01-25 23:22:21 +01:00
|
|
|
* RegisterTasklist [USER32.@]
|
2000-08-04 06:21:02 +02:00
|
|
|
*/
|
2000-11-25 22:43:04 +01:00
|
|
|
DWORD WINAPI RegisterTasklist (DWORD x)
|
2000-08-04 06:21:02 +02:00
|
|
|
{
|
|
|
|
FIXME("0x%08lx\n",x);
|
|
|
|
return TRUE;
|
|
|
|
}
|
2000-08-06 04:42:46 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* USER_489 (USER.489)
|
2000-08-06 04:42:46 +02:00
|
|
|
*/
|
|
|
|
LONG WINAPI stub_USER_489(void) { FIXME("stub\n"); return 0; }
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* USER_490 (USER.490)
|
2000-08-06 04:42:46 +02:00
|
|
|
*/
|
|
|
|
LONG WINAPI stub_USER_490(void) { FIXME("stub\n"); return 0; }
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* USER_492 (USER.492)
|
2000-08-06 04:42:46 +02:00
|
|
|
*/
|
|
|
|
LONG WINAPI stub_USER_492(void) { FIXME("stub\n"); return 0; }
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* USER_496 (USER.496)
|
2000-08-06 04:42:46 +02:00
|
|
|
*/
|
|
|
|
LONG WINAPI stub_USER_496(void) { FIXME("stub\n"); return 0; }
|