Commit 1bf96e09 authored by Alexandre Julliard's avatar Alexandre Julliard

Beginnings of support for window stations and desktops.

parent 36bc2976
......@@ -62,6 +62,7 @@ C_SRCS = \
winhelp.c \
winpos.c \
winproc.c \
winstation.c \
wsprintf.c
C_SRCS16 = \
......
......@@ -135,33 +135,6 @@ WORD WINAPI UserSignalProc( UINT uCode, DWORD dwThreadOrProcessID,
}
/* callback to allow EnumDesktopsA to use EnumDesktopsW */
typedef struct {
DESKTOPENUMPROCA lpEnumFunc;
LPARAM lParam;
} ENUMDESKTOPS_LPARAM;
/* EnumDesktopsA passes this callback function to EnumDesktopsW.
* It simply converts the string to ASCII and calls the callback
* function provided by the original caller
*/
static BOOL CALLBACK EnumDesktopProcWtoA(LPWSTR lpszDesktop, LPARAM lParam)
{
LPSTR buffer;
INT len;
BOOL ret;
ENUMDESKTOPS_LPARAM *data = (ENUMDESKTOPS_LPARAM *)lParam;
len = WideCharToMultiByte(CP_ACP, 0, lpszDesktop, -1, NULL, 0, NULL, NULL);
if (!(buffer = HeapAlloc( GetProcessHeap(), 0, len))) return FALSE;
WideCharToMultiByte(CP_ACP, 0, lpszDesktop, -1, buffer, len, NULL, NULL);
ret = data->lpEnumFunc(buffer, data->lParam);
HeapFree(GetProcessHeap(), 0, buffer);
return ret;
}
/**********************************************************************
* SetLastErrorEx [USER32.@]
*
......@@ -208,44 +181,6 @@ BOOL WINAPI GetAltTabInfoW(HWND hwnd, int iItem, PALTTABINFO pati, LPWSTR pszIte
}
/******************************************************************************
* GetProcessWindowStation [USER32.@]
*
* Returns handle of window station
*
* NOTES
* Docs say the return value is HWINSTA
*
* RETURNS
* Success: Handle to window station associated with calling process
* Failure: NULL
*/
HWINSTA WINAPI GetProcessWindowStation(void)
{
FIXME("(void): stub\n");
return (HWINSTA)1;
}
/******************************************************************************
* GetThreadDesktop [USER32.@]
*
* Returns handle to desktop
*
* PARAMS
* dwThreadId [I] Thread identifier
*
* RETURNS
* Success: Handle to desktop associated with specified thread
* Failure: NULL
*/
HDESK WINAPI GetThreadDesktop( DWORD dwThreadId )
{
FIXME("(%lx): stub\n",dwThreadId);
return (HDESK)1;
}
/******************************************************************************
* SetDebugErrorLevel [USER32.@]
* Sets the minimum error level for generating debugging events
*
......@@ -307,118 +242,6 @@ BOOL WINAPI SetProcessDefaultLayout( DWORD dwDefaultLayout )
/***********************************************************************
* CreateDesktopA (USER32.@)
*/
HDESK WINAPI CreateDesktopA( LPSTR lpszDesktop,LPSTR lpszDevice,LPDEVMODEA pDevmode,
DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa )
{
FIXME("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n", lpszDesktop,lpszDevice,pDevmode,
dwFlags,dwDesiredAccess,lpsa );
return (HDESK)0xcafedead;
}
/***********************************************************************
* CreateDesktopW (USER32.@)
*/
HDESK WINAPI CreateDesktopW( LPWSTR lpszDesktop,LPWSTR lpszDevice,LPDEVMODEW pDevmode,
DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa)
{
FIXME("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n",
debugstr_w(lpszDesktop),debugstr_w(lpszDevice),pDevmode,
dwFlags,dwDesiredAccess,lpsa );
return (HDESK)0xcafedead;
}
/******************************************************************************
* OpenDesktopA [USER32.@]
*
* Not supported on Win9x - returns NULL and calls SetLastError.
*/
HDESK WINAPI OpenDesktopA( LPCSTR lpszDesktop, DWORD dwFlags,
BOOL fInherit, DWORD dwDesiredAccess )
{
FIXME("(%s,%lx,%i,%lx): stub\n",debugstr_a(lpszDesktop),dwFlags,
fInherit,dwDesiredAccess);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/******************************************************************************
* OpenInputDesktop [USER32.@]
*
* Not supported on Win9x - returns NULL and calls SetLastError.
*/
HDESK WINAPI OpenInputDesktop( DWORD dwFlags, BOOL fInherit, ACCESS_MASK dwDesiredAccess )
{
FIXME("(%lx,%i,%lx): stub\n",dwFlags, fInherit,dwDesiredAccess);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/***********************************************************************
* CloseDesktop (USER32.@)
*/
BOOL WINAPI CloseDesktop(HDESK hDesk)
{
FIXME("(%p)\n", hDesk);
return TRUE;
}
/******************************************************************************
* EnumDesktopsA [USER32.@]
*/
BOOL WINAPI EnumDesktopsA( HWINSTA hwinsta, DESKTOPENUMPROCA lpEnumFunc,
LPARAM lParam )
{
ENUMDESKTOPS_LPARAM caller_data;
caller_data.lpEnumFunc = lpEnumFunc;
caller_data.lParam = lParam;
return EnumDesktopsW(hwinsta, EnumDesktopProcWtoA, (LPARAM) &caller_data);
}
/******************************************************************************
* EnumDesktopsW [USER32.@]
*/
BOOL WINAPI EnumDesktopsW( HWINSTA hwinsta, DESKTOPENUMPROCW lpEnumFunc,
LPARAM lParam )
{
FIXME("%p,%p,%lx): stub\n",hwinsta,lpEnumFunc,lParam);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* EnumDesktopWindows (USER32.@)
*/
BOOL WINAPI EnumDesktopWindows( HDESK hDesktop, WNDENUMPROC lpfn, LPARAM lParam )
{
FIXME("(%p, %p, 0x%08lx), stub!\n", hDesktop, lpfn, lParam );
return TRUE;
}
/***********************************************************************
* CreateWindowStationW (USER32.@)
*/
HWINSTA WINAPI CreateWindowStationW( LPWSTR winstation,DWORD res1,DWORD desiredaccess,
LPSECURITY_ATTRIBUTES lpsa )
{
FIXME("(%s,0x%08lx,0x%08lx,%p),stub!\n",debugstr_w(winstation), res1,desiredaccess,lpsa );
return (HWINSTA)0xdeadcafe;
}
/***********************************************************************
* CloseWindowStation (USER32.@)
*/
BOOL WINAPI CloseWindowStation(HWINSTA hWinSta)
{
FIXME("(%p)\n", hWinSta);
return TRUE;
}
/***********************************************************************
* SetWindowStationUser (USER32.@)
*/
DWORD WINAPI SetWindowStationUser(DWORD x1,DWORD x2)
......@@ -428,92 +251,6 @@ DWORD WINAPI SetWindowStationUser(DWORD x1,DWORD x2)
}
/***********************************************************************
* SetProcessWindowStation (USER32.@)
*/
BOOL WINAPI SetProcessWindowStation(HWINSTA hWinSta)
{
FIXME("(%p),stub!\n",hWinSta);
return TRUE;
}
/******************************************************************************
* EnumWindowStationsA [USER32.@]
*/
BOOL WINAPI EnumWindowStationsA( WINSTAENUMPROCA lpEnumFunc, LPARAM lParam)
{
FIXME("%p,%lx): stub\n",lpEnumFunc,lParam);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/******************************************************************************
* EnumWindowStationsW [USER32.@]
*/
BOOL WINAPI EnumWindowStationsW( WINSTAENUMPROCW lpEnumFunc, LPARAM lParam)
{
FIXME("%p,%lx): stub\n",lpEnumFunc,lParam);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* GetUserObjectInformationA (USER32.@)
*/
BOOL WINAPI GetUserObjectInformationA( HANDLE hObj, INT nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen )
{
FIXME("(%p %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen );
return TRUE;
}
/***********************************************************************
* GetUserObjectInformationW (USER32.@)
*/
BOOL WINAPI GetUserObjectInformationW( HANDLE hObj, INT nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen )
{
FIXME("(%p %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen );
return TRUE;
}
/******************************************************************************
* SetUserObjectInformationA (USER32.@)
*/
BOOL WINAPI SetUserObjectInformationA( HANDLE hObj, INT nIndex,
LPVOID pvInfo, DWORD nLength )
{
FIXME("(%p,%d,%p,%lx): stub\n",hObj,nIndex,pvInfo,nLength);
return TRUE;
}
/***********************************************************************
* GetUserObjectSecurity (USER32.@)
*/
BOOL WINAPI GetUserObjectSecurity(HANDLE hObj, PSECURITY_INFORMATION pSIRequested,
PSECURITY_DESCRIPTOR pSID, DWORD nLength, LPDWORD lpnLengthNeeded)
{
FIXME("(%p %p %p len=%ld %p),stub!\n", hObj, pSIRequested, pSID, nLength, lpnLengthNeeded);
return TRUE;
}
/***********************************************************************
* SetUserObjectSecurity (USER32.@)
*/
BOOL WINAPI SetUserObjectSecurity( HANDLE hObj, PSECURITY_INFORMATION pSIRequested,
PSECURITY_DESCRIPTOR pSID )
{
FIXME("(%p,%p,%p),stub!\n",hObj,pSIRequested,pSID);
return TRUE;
}
/******************************************************************************
* SetThreadDesktop (USER32.@)
*/
BOOL WINAPI SetThreadDesktop( HANDLE hDesktop )
{
FIXME("(%p): stub\n",hDesktop);
return TRUE;
}
/***********************************************************************
* RegisterLogonProcess (USER32.@)
*/
DWORD WINAPI RegisterLogonProcess(HANDLE hprocess,BOOL x)
......
......@@ -16,4 +16,5 @@ sysparams.ok
testlist.c
text.ok
win.ok
winstation.ok
wsprintf.ok
......@@ -21,6 +21,7 @@ CTESTS = \
sysparams.c \
text.c \
win.c \
winstation.c \
wsprintf.c
RC_SRCS = resource.rc
......
/*
* Unit tests for window stations and desktops
*
* Copyright 2002 Alexandre Julliard
*
* 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
*/
#include "wine/test.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#define DESKTOP_ALL_ACCESS 0x01ff
static void print_object( HANDLE obj )
{
char buffer[100];
DWORD size;
strcpy( buffer, "foobar" );
if (!GetUserObjectInformationA( obj, UOI_NAME, buffer, sizeof(buffer), &size ))
trace( "could not get info for %p\n", obj );
else
trace( "obj %p name '%s'\n", obj, buffer );
strcpy( buffer, "foobar" );
if (!GetUserObjectInformationA( obj, UOI_TYPE, buffer, sizeof(buffer), &size ))
trace( "could not get type for %p\n", obj );
else
trace( "obj %p type '%s'\n", obj, buffer );
}
static DWORD CALLBACK thread( LPVOID arg )
{
HDESK d1, d2;
HWND hwnd = CreateWindowExA(0,"BUTTON","test",WS_POPUP,0,0,100,100,GetDesktopWindow(),0,0,0);
ok( hwnd != 0, "CreateWindow failed\n" );
d1 = GetThreadDesktop(GetCurrentThreadId());
trace( "thread %p desktop: %p\n", arg, d1 );
if (0) /* FIXME: this should be todo_wine but it would break the rest of the test */
{
SetLastError( 0xdeadbeef );
ok( !CloseHandle( d1 ), "CloseHandle succeeded\n" );
ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() );
}
SetLastError( 0xdeadbeef );
ok( !CloseDesktop( d1 ), "CloseDesktop succeeded\n" );
ok( GetLastError() == ERROR_BUSY, "bad last error %ld\n", GetLastError() );
print_object( d1 );
d2 = CreateDesktop( "foobar2", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL );
trace( "created desktop %p\n", d2 );
ok( d2 != 0, "CreateDesktop failed\n" );
todo_wine
{
SetLastError( 0xdeadbeef );
ok( !SetThreadDesktop( d2 ), "set thread desktop succeeded with existing window\n" );
ok( GetLastError() == ERROR_BUSY, "bad last error %ld\n", GetLastError() );
}
DestroyWindow( hwnd );
ok( SetThreadDesktop( d2 ), "set thread desktop failed\n" );
d1 = GetThreadDesktop(GetCurrentThreadId());
ok( d1 == d2, "GetThreadDesktop did not return set desktop %p/%p\n", d1, d2 );
print_object( d2 );
if (arg < (LPVOID)5)
{
HANDLE hthread = CreateThread( NULL, 0, thread, (char *)arg + 1, 0, NULL );
Sleep(1000);
WaitForSingleObject( hthread, INFINITE );
}
return 0;
}
static void test_handles(void)
{
HWINSTA w1, w2, w3;
HDESK d1, d2, d3;
HANDLE hthread;
DWORD id, flags;
/* win stations */
w1 = GetProcessWindowStation();
ok( GetProcessWindowStation() == w1, "GetProcessWindowStation returned different handles\n" );
ok( !CloseWindowStation(w1), "closing process win station succeeded\n" );
SetLastError( 0xdeadbeef );
ok( !CloseHandle(w1), "closing process win station handle succeeded\n" );
ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() );
print_object( w1 );
flags = 0;
ok( GetHandleInformation( w1, &flags ), "GetHandleInformation failed\n" );
todo_wine ok( !(flags & HANDLE_FLAG_PROTECT_FROM_CLOSE), "handle %p PROTECT_FROM_CLOSE set\n", w1 );
ok( DuplicateHandle( GetCurrentProcess(), w1, GetCurrentProcess(), (PHANDLE)&w2, 0,
TRUE, DUPLICATE_SAME_ACCESS ), "DuplicateHandle failed\n" );
ok( CloseWindowStation(w2), "closing dup win station failed\n" );
ok( DuplicateHandle( GetCurrentProcess(), w1, GetCurrentProcess(), (PHANDLE)&w2, 0,
TRUE, DUPLICATE_SAME_ACCESS ), "DuplicateHandle failed\n" );
ok( CloseHandle(w2), "closing dup win station handle failed\n" );
w2 = CreateWindowStation("WinSta0", 0, WINSTA_ALL_ACCESS, NULL );
ok( w2 != 0, "CreateWindowStation failed\n" );
ok( w2 != w1, "CreateWindowStation returned default handle\n" );
SetLastError( 0xdeadbeef );
ok( !CloseDesktop( (HDESK)w2 ), "CloseDesktop succeeded on win station\n" );
ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() );
ok( CloseWindowStation( w2 ), "CloseWindowStation failed\n" );
w2 = CreateWindowStation("WinSta0", 0, WINSTA_ALL_ACCESS, NULL );
ok( CloseHandle( w2 ), "CloseHandle failed\n" );
w2 = OpenWindowStation("winsta0", TRUE, WINSTA_ALL_ACCESS );
ok( w2 != 0, "OpenWindowStation failed\n" );
ok( w2 != w1, "OpenWindowStation returned default handle\n" );
ok( CloseWindowStation( w2 ), "CloseWindowStation failed\n" );
w2 = OpenWindowStation("dummy name", TRUE, WINSTA_ALL_ACCESS );
ok( !w2, "open dummy win station succeeded\n" );
CreateMutexA( NULL, 0, "foobar" );
w2 = CreateWindowStation("foobar", 0, WINSTA_ALL_ACCESS, NULL );
ok( w2 != 0, "create foobar station failed\n" );
w3 = OpenWindowStation("foobar", TRUE, WINSTA_ALL_ACCESS );
ok( w3 != 0, "open foobar station failed\n" );
ok( w3 != w2, "open foobar station returned same handle\n" );
ok( CloseWindowStation( w2 ), "CloseWindowStation failed\n" );
ok( CloseWindowStation( w3 ), "CloseWindowStation failed\n" );
w3 = OpenWindowStation("foobar", TRUE, WINSTA_ALL_ACCESS );
ok( !w3, "open foobar station succeeded\n" );
/* desktops */
d1 = GetThreadDesktop(GetCurrentThreadId());
ok( GetThreadDesktop(GetCurrentThreadId()) == d1,
"GetThreadDesktop returned different handles\n" );
flags = 0;
ok( GetHandleInformation( d1, &flags ), "GetHandleInformation failed\n" );
ok( !(flags & HANDLE_FLAG_PROTECT_FROM_CLOSE), "handle %p PROTECT_FROM_CLOSE set\n", d1 );
SetLastError( 0xdeadbeef );
ok( !CloseDesktop(d1), "closing thread desktop succeeded\n" );
ok( GetLastError() == ERROR_BUSY, "bad last error %ld\n", GetLastError() );
if (0) /* FIXME: this should be todo_wine but it would break the rest of the test */
{
SetLastError( 0xdeadbeef );
ok( !CloseHandle(d1), "closing thread desktop handle failed\n" );
ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() );
}
ok( DuplicateHandle( GetCurrentProcess(), d1, GetCurrentProcess(), (PHANDLE)&d2, 0,
TRUE, DUPLICATE_SAME_ACCESS ), "DuplicateHandle failed\n" );
ok( CloseDesktop(d2), "closing dup desktop failed\n" );
ok( DuplicateHandle( GetCurrentProcess(), d1, GetCurrentProcess(), (PHANDLE)&d2, 0,
TRUE, DUPLICATE_SAME_ACCESS ), "DuplicateHandle failed\n" );
ok( CloseHandle(d2), "closing dup desktop handle failed\n" );
d2 = OpenDesktop( "dummy name", 0, TRUE, DESKTOP_ALL_ACCESS );
ok( !d2, "open dummy desktop succeeded\n" );
d2 = CreateDesktop( "foobar", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL );
ok( d2 != 0, "create foobar desktop failed\n" );
SetLastError( 0xdeadbeef );
ok( !CloseWindowStation( (HWINSTA)d2 ), "CloseWindowStation succeeded on desktop\n" );
ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %ld\n", GetLastError() );
d3 = OpenDesktop( "foobar", 0, TRUE, DESKTOP_ALL_ACCESS );
ok( d3 != 0, "open foobar desktop failed\n" );
ok( d3 != d2, "open foobar desktop returned same handle\n" );
ok( CloseDesktop( d2 ), "CloseDesktop failed\n" );
ok( CloseDesktop( d3 ), "CloseDesktop failed\n" );
d3 = OpenDesktop( "foobar", 0, TRUE, DESKTOP_ALL_ACCESS );
ok( !d3, "open foobar desktop succeeded\n" );
if (0) /* FIXME: this should be todo_wine but it would break the rest of the test */
{
ok( !CloseHandle(d1), "closing thread desktop handle succeeded\n" );
d2 = GetThreadDesktop(GetCurrentThreadId());
ok( d1 == d2, "got different handles after close\n" );
}
trace( "thread 1 desktop: %p\n", d2 );
print_object( d2 );
hthread = CreateThread( NULL, 0, thread, (LPVOID)2, 0, &id );
Sleep(1000);
trace( "get other thread desktop: %p\n", GetThreadDesktop(id) );
WaitForSingleObject( hthread, INFINITE );
}
START_TEST(winstation)
{
test_handles();
}
......@@ -87,7 +87,7 @@
@ stdcall CreatePopupMenu()
@ stdcall CreateWindowExA(long str str long long long long long long long long ptr)
@ stdcall CreateWindowExW(long wstr wstr long long long long long long long long ptr)
@ stub CreateWindowStationA
@ stdcall CreateWindowStationA(str long long ptr)
@ stdcall CreateWindowStationW(wstr long long ptr)
@ stdcall DdeAbandonTransaction(long long long)
@ stdcall DdeAccessData(long ptr)
......@@ -436,11 +436,11 @@
@ stdcall OffsetRect(ptr long long)
@ stdcall OpenClipboard(long)
@ stdcall OpenDesktopA(str long long long)
@ stub OpenDesktopW
@ stdcall OpenDesktopW(wstr long long long)
@ stdcall OpenIcon(long)
@ stdcall OpenInputDesktop(long long long)
@ stub OpenWindowStationA
@ stub OpenWindowStationW
@ stdcall OpenWindowStationA(str long long)
@ stdcall OpenWindowStationW(wstr long long)
@ stdcall PackDDElParam(long long long)
@ stdcall PaintDesktop(long)
@ stdcall PeekMessageA(ptr long long long long)
......@@ -547,8 +547,8 @@
@ stdcall SetSystemTimer(long long long ptr)
@ stdcall SetThreadDesktop(long)
@ stdcall SetTimer(long long long ptr)
@ stdcall SetUserObjectInformationA(long long long long)
@ stub SetUserObjectInformationW
@ stdcall SetUserObjectInformationA(long long ptr long)
@ stdcall SetUserObjectInformationW(long long ptr long)
@ stdcall SetUserObjectSecurity(long ptr ptr)
@ stdcall SetWindowContextHelpId(long long)
@ stub SetWindowFullScreenState
......
......@@ -2877,6 +2877,160 @@ struct get_window_properties_reply
struct create_winstation_request
{
struct request_header __header;
unsigned int flags;
unsigned int access;
int inherit;
/* VARARG(name,unicode_str); */
};
struct create_winstation_reply
{
struct reply_header __header;
obj_handle_t handle;
};
struct open_winstation_request
{
struct request_header __header;
unsigned int access;
int inherit;
/* VARARG(name,unicode_str); */
};
struct open_winstation_reply
{
struct reply_header __header;
obj_handle_t handle;
};
struct close_winstation_request
{
struct request_header __header;
obj_handle_t handle;
};
struct close_winstation_reply
{
struct reply_header __header;
};
struct get_process_winstation_request
{
struct request_header __header;
};
struct get_process_winstation_reply
{
struct reply_header __header;
obj_handle_t handle;
};
struct set_process_winstation_request
{
struct request_header __header;
obj_handle_t handle;
};
struct set_process_winstation_reply
{
struct reply_header __header;
};
struct create_desktop_request
{
struct request_header __header;
unsigned int flags;
unsigned int access;
int inherit;
/* VARARG(name,unicode_str); */
};
struct create_desktop_reply
{
struct reply_header __header;
obj_handle_t handle;
};
struct open_desktop_request
{
struct request_header __header;
unsigned int flags;
unsigned int access;
int inherit;
/* VARARG(name,unicode_str); */
};
struct open_desktop_reply
{
struct reply_header __header;
obj_handle_t handle;
};
struct close_desktop_request
{
struct request_header __header;
obj_handle_t handle;
};
struct close_desktop_reply
{
struct reply_header __header;
};
struct get_thread_desktop_request
{
struct request_header __header;
thread_id_t tid;
};
struct get_thread_desktop_reply
{
struct reply_header __header;
obj_handle_t handle;
};
struct set_thread_desktop_request
{
struct request_header __header;
obj_handle_t handle;
};
struct set_thread_desktop_reply
{
struct reply_header __header;
};
struct set_user_object_info_request
{
struct request_header __header;
obj_handle_t handle;
unsigned int flags;
unsigned int obj_flags;
};
struct set_user_object_info_reply
{
struct reply_header __header;
int is_desktop;
unsigned int old_obj_flags;
/* VARARG(name,unicode_str); */
};
#define SET_USER_OBJECT_FLAGS 1
struct attach_thread_input_request
{
struct request_header __header;
......@@ -3568,6 +3722,17 @@ enum request
REQ_remove_window_property,
REQ_get_window_property,
REQ_get_window_properties,
REQ_create_winstation,
REQ_open_winstation,
REQ_close_winstation,
REQ_get_process_winstation,
REQ_set_process_winstation,
REQ_create_desktop,
REQ_open_desktop,
REQ_close_desktop,
REQ_get_thread_desktop,
REQ_set_thread_desktop,
REQ_set_user_object_info,
REQ_attach_thread_input,
REQ_get_thread_input,
REQ_get_last_input_time,
......@@ -3768,6 +3933,17 @@ union generic_request
struct remove_window_property_request remove_window_property_request;
struct get_window_property_request get_window_property_request;
struct get_window_properties_request get_window_properties_request;
struct create_winstation_request create_winstation_request;
struct open_winstation_request open_winstation_request;
struct close_winstation_request close_winstation_request;
struct get_process_winstation_request get_process_winstation_request;
struct set_process_winstation_request set_process_winstation_request;
struct create_desktop_request create_desktop_request;
struct open_desktop_request open_desktop_request;
struct close_desktop_request close_desktop_request;
struct get_thread_desktop_request get_thread_desktop_request;
struct set_thread_desktop_request set_thread_desktop_request;
struct set_user_object_info_request set_user_object_info_request;
struct attach_thread_input_request attach_thread_input_request;
struct get_thread_input_request get_thread_input_request;
struct get_last_input_time_request get_last_input_time_request;
......@@ -3966,6 +4142,17 @@ union generic_reply
struct remove_window_property_reply remove_window_property_reply;
struct get_window_property_reply get_window_property_reply;
struct get_window_properties_reply get_window_properties_reply;
struct create_winstation_reply create_winstation_reply;
struct open_winstation_reply open_winstation_reply;
struct close_winstation_reply close_winstation_reply;
struct get_process_winstation_reply get_process_winstation_reply;
struct set_process_winstation_reply set_process_winstation_reply;
struct create_desktop_reply create_desktop_reply;
struct open_desktop_reply open_desktop_reply;
struct close_desktop_reply close_desktop_reply;
struct get_thread_desktop_reply get_thread_desktop_reply;
struct set_thread_desktop_reply set_thread_desktop_reply;
struct set_user_object_info_reply set_user_object_info_reply;
struct attach_thread_input_reply attach_thread_input_reply;
struct get_thread_input_reply get_thread_input_reply;
struct get_last_input_time_reply get_last_input_time_reply;
......@@ -3998,6 +4185,6 @@ union generic_reply
struct set_mailslot_info_reply set_mailslot_info_reply;
};
#define SERVER_PROTOCOL_VERSION 177
#define SERVER_PROTOCOL_VERSION 178
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
......@@ -104,6 +104,29 @@ typedef struct tagUSEROBJECTFLAGS {
DWORD dwFlags;
} USEROBJECTFLAGS, *PUSEROBJECTFLAGS;
/* Window stations */
#define WINSTA_ENUMDESKTOPS 0x0001
#define WINSTA_READATTRIBUTES 0x0002
#define WINSTA_ACCESSCLIPBOARD 0x0004
#define WINSTA_CREATEDESKTOP 0x0008
#define WINSTA_WRITEATTRIBUTES 0x0010
#define WINSTA_ACCESSGLOBALATOMS 0x0020
#define WINSTA_EXITWINDOWS 0x0040
#define WINSTA_ENUMERATE 0x0100
#define WINSTA_READSCREEN 0x0200
#define WINSTA_ALL_ACCESS 0x037f
/* Desktops */
#define DESKTOP_READOBJECTS 0x0001
#define DESKTOP_CREATEWINDOW 0x0002
#define DESKTOP_CREATEMENU 0x0004
#define DESKTOP_HOOKCONTROL 0x0008
#define DESKTOP_JOURNALRECORD 0x0010
#define DESKTOP_JOURNALPLAYBACK 0x0020
#define DESKTOP_ENUMERATE 0x0040
#define DESKTOP_WRITEOBJECTS 0x0080
#define DESKTOP_SWITCHDESKTOP 0x0100
/* flags for FILTERKEYS dwFlags field */
#define FKF_AVAILABLE 0x00000002
......@@ -3868,6 +3891,9 @@ LONG WINAPI ChangeDisplaySettingsW(LPDEVMODEW,DWORD);
LONG WINAPI ChangeDisplaySettingsExA(LPCSTR,LPDEVMODEA,HWND,DWORD,LPVOID);
LONG WINAPI ChangeDisplaySettingsExW(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID);
#define ChangeDisplaySettingsEx WINELIB_NAME_AW(ChangeDisplaySettingsEx)
HDESK WINAPI CreateDesktopA(LPCSTR,LPCSTR,LPDEVMODEA,DWORD,ACCESS_MASK,LPSECURITY_ATTRIBUTES);
HDESK WINAPI CreateDesktopW(LPCWSTR,LPCWSTR,LPDEVMODEW,DWORD,ACCESS_MASK,LPSECURITY_ATTRIBUTES);
#define CreateDesktop WINELIB_NAME_AW(CreateDesktop)
BOOL WINAPI EnumDisplayDevicesA(LPVOID,DWORD,LPDISPLAY_DEVICEA,DWORD);
BOOL WINAPI EnumDisplayDevicesW(LPVOID,DWORD,LPDISPLAY_DEVICEW,DWORD);
#define EnumDisplayDevices WINELIB_NAME_AW(EnumDisplayDevices)
......@@ -4109,8 +4135,8 @@ HWND WINAPI CreateWindowExA(DWORD,LPCSTR,LPCSTR,DWORD,INT,INT,
HWND WINAPI CreateWindowExW(DWORD,LPCWSTR,LPCWSTR,DWORD,INT,INT,
INT,INT,HWND,HMENU,HINSTANCE,LPVOID);
#define CreateWindowEx WINELIB_NAME_AW(CreateWindowEx)
HWINSTA WINAPI CreateWindowStationA(LPSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
HWINSTA WINAPI CreateWindowStationW(LPWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES);
HWINSTA WINAPI CreateWindowStationA(LPCSTR,DWORD,ACCESS_MASK,LPSECURITY_ATTRIBUTES);
HWINSTA WINAPI CreateWindowStationW(LPCWSTR,DWORD,ACCESS_MASK,LPSECURITY_ATTRIBUTES);
#define CreateWindowStation WINELIB_NAME_AW(CreateWindowStation)
HWND WINAPI CreateMDIWindowA(LPCSTR,LPCSTR,DWORD,INT,INT,
INT,INT,HWND,HINSTANCE,LPARAM);
......@@ -4321,9 +4347,10 @@ DWORD WINAPI GetTabbedTextExtentA(HDC,LPCSTR,INT,INT,const INT*);
DWORD WINAPI GetTabbedTextExtentW(HDC,LPCWSTR,INT,INT,const INT*);
#define GetTabbedTextExtent WINELIB_NAME_AW(GetTabbedTextExtent)
BOOL WINAPI GetTitleBarInfo(HWND,PTITLEBARINFO);
HWND WINAPI GetTopWindow(HWND);
BOOL WINAPI GetUpdateRect(HWND,LPRECT,BOOL);
INT WINAPI GetUpdateRgn(HWND,HRGN,BOOL);
HDESK WINAPI GetThreadDesktop(DWORD);
HWND WINAPI GetTopWindow(HWND);
BOOL WINAPI GetUpdateRect(HWND,LPRECT,BOOL);
INT WINAPI GetUpdateRgn(HWND,HRGN,BOOL);
BOOL WINAPI GetUserObjectInformationA(HANDLE,INT,LPVOID,DWORD,LPDWORD);
BOOL WINAPI GetUserObjectInformationW(HANDLE,INT,LPVOID,DWORD,LPDWORD);
#define GetUserObjectInformation WINELIB_NAME_AW(GetUserObjectInformation)
......@@ -4460,10 +4487,13 @@ BOOL WINAPI OemToCharBuffW(LPCSTR,LPWSTR,DWORD);
#define OemToCharBuff WINELIB_NAME_AW(OemToCharBuff)
BOOL WINAPI OffsetRect(LPRECT,INT,INT);
BOOL WINAPI OpenClipboard(HWND);
BOOL WINAPI OpenIcon(HWND);
HDESK WINAPI OpenInputDesktop(DWORD,BOOL,ACCESS_MASK);
HWINSTA WINAPI OpenWindowStationA(LPSTR,BOOL,ACCESS_MASK);
HWINSTA WINAPI OpenWindowStationW(LPWSTR,BOOL,ACCESS_MASK);
HDESK WINAPI OpenDesktopA(LPCSTR,DWORD,BOOL,ACCESS_MASK);
HDESK WINAPI OpenDesktopW(LPCWSTR,DWORD,BOOL,ACCESS_MASK);
#define OpenDesktop WINELIB_NAME_AW(OpenDesktop)
BOOL WINAPI OpenIcon(HWND);
HDESK WINAPI OpenInputDesktop(DWORD,BOOL,ACCESS_MASK);
HWINSTA WINAPI OpenWindowStationA(LPCSTR,BOOL,ACCESS_MASK);
HWINSTA WINAPI OpenWindowStationW(LPCWSTR,BOOL,ACCESS_MASK);
#define OpenWindowStation WINELIB_NAME_AW(OpenWindowStation)
BOOL WINAPI PeekMessageA(LPMSG,HWND,UINT,UINT,UINT);
BOOL WINAPI PeekMessageW(LPMSG,HWND,UINT,UINT,UINT);
......@@ -4560,16 +4590,20 @@ HWND WINAPI SetParent(HWND,HWND);
BOOL WINAPI SetPropA(HWND,LPCSTR,HANDLE);
BOOL WINAPI SetPropW(HWND,LPCWSTR,HANDLE);
#define SetProp WINELIB_NAME_AW(SetProp)
BOOL WINAPI SetRect(LPRECT,INT,INT,INT,INT);
BOOL WINAPI SetRectEmpty(LPRECT);
INT WINAPI SetScrollInfo(HWND,INT,const SCROLLINFO*,BOOL);
INT WINAPI SetScrollPos(HWND,INT,INT,BOOL);
BOOL WINAPI SetScrollRange(HWND,INT,INT,INT,BOOL);
BOOL WINAPI SetRect(LPRECT,INT,INT,INT,INT);
BOOL WINAPI SetRectEmpty(LPRECT);
INT WINAPI SetScrollInfo(HWND,INT,const SCROLLINFO*,BOOL);
INT WINAPI SetScrollPos(HWND,INT,INT,BOOL);
BOOL WINAPI SetScrollRange(HWND,INT,INT,INT,BOOL);
#define SetSysModalWindow(hwnd) ((HWND)0)
BOOL WINAPI SetSystemCursor(HCURSOR,DWORD);
BOOL WINAPI SetSystemMenu(HWND,HMENU);
UINT_PTR WINAPI SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
UINT_PTR WINAPI SetTimer(HWND,UINT_PTR,UINT,TIMERPROC);
BOOL WINAPI SetSystemCursor(HCURSOR,DWORD);
BOOL WINAPI SetSystemMenu(HWND,HMENU);
UINT_PTR WINAPI SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
BOOL WINAPI SetThreadDesktop(HDESK);
UINT_PTR WINAPI SetTimer(HWND,UINT_PTR,UINT,TIMERPROC);
BOOL WINAPI SetUserObjectInformationA(HANDLE,INT,LPVOID,DWORD);
BOOL WINAPI SetUserObjectInformationW(HANDLE,INT,LPVOID,DWORD);
#define SetUserObjectInformation WINELIB_NAME_AW(SetUserObjectInformation)
BOOL WINAPI SetUserObjectSecurity(HANDLE,PSECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
LONG WINAPI SetWindowLongA(HWND,INT,LONG);
LONG WINAPI SetWindowLongW(HWND,INT,LONG);
......
......@@ -44,7 +44,8 @@ C_SRCS = \
trace.c \
unicode.c \
user.c \
window.c
window.c \
winstation.c
PROGRAMS = wineserver
......
......@@ -129,6 +129,15 @@ static void set_object_name( struct namespace *namespace,
obj->name = ptr;
}
/* get the name of an existing object */
const WCHAR *get_object_name( struct object *obj, size_t *len )
{
struct object_name *ptr = obj->name;
if (!ptr) return NULL;
*len = ptr->len;
return ptr->name;
}
/* allocate and initialize an object */
void *alloc_object( const struct object_ops *ops )
{
......
......@@ -88,6 +88,7 @@ struct wait_queue_entry
extern void *mem_alloc( size_t size ); /* malloc wrapper */
extern void *memdup( const void *data, size_t len );
extern void *alloc_object( const struct object_ops *ops );
extern const WCHAR *get_object_name( struct object *obj, size_t *len );
extern void dump_object_name( struct object *obj );
extern void *create_named_object( struct namespace *namespace, const struct object_ops *ops,
const WCHAR *name, size_t len );
......
......@@ -280,6 +280,7 @@ struct thread *create_process( int fd )
process->queue = NULL;
process->peb = NULL;
process->ldt_copy = NULL;
process->winstation = 0;
process->exe.file = NULL;
process->exe.dbg_offset = 0;
process->exe.dbg_size = 0;
......@@ -376,6 +377,10 @@ static struct startup_info *init_process( struct init_process_reply *reply )
return NULL;
}
/* connect to the window station and desktop */
connect_process_winstation( process, NULL, 0 );
connect_thread_desktop( current, NULL, 0 );
/* set the process console */
if (!set_process_console( process, parent_thread, info, reply )) return NULL;
......
......@@ -72,6 +72,7 @@ struct process
struct startup_info *startup_info; /* startup info while init is in progress */
struct event *idle_event; /* event for input idle */
struct msg_queue *queue; /* main message queue */
obj_handle_t winstation; /* main handle to process window station */
struct token *token; /* security token associated with this process */
struct process_dll exe; /* main exe file */
struct list dlls; /* list of loaded dlls */
......
......@@ -2023,6 +2023,101 @@ enum message_type
@END
/* Create a window station */
@REQ(create_winstation)
unsigned int flags; /* window station flags */
unsigned int access; /* wanted access rights */
int inherit; /* inherit flag */
VARARG(name,unicode_str); /* object name */
@REPLY
obj_handle_t handle; /* handle to the window station */
@END
/* Open a handle to a window station */
@REQ(open_winstation)
unsigned int access; /* wanted access rights */
int inherit; /* inherit flag */
VARARG(name,unicode_str); /* object name */
@REPLY
obj_handle_t handle; /* handle to the window station */
@END
/* Close a window station */
@REQ(close_winstation)
obj_handle_t handle; /* handle to the window station */
@END
/* Get the process current window station */
@REQ(get_process_winstation)
@REPLY
obj_handle_t handle; /* handle to the window station */
@END
/* Set the process current window station */
@REQ(set_process_winstation)
obj_handle_t handle; /* handle to the window station */
@END
/* Create a desktop */
@REQ(create_desktop)
unsigned int flags; /* desktop flags */
unsigned int access; /* wanted access rights */
int inherit; /* inherit flag */
VARARG(name,unicode_str); /* object name */
@REPLY
obj_handle_t handle; /* handle to the desktop */
@END
/* Open a handle to a desktop */
@REQ(open_desktop)
unsigned int flags; /* desktop flags */
unsigned int access; /* wanted access rights */
int inherit; /* inherit flag */
VARARG(name,unicode_str); /* object name */
@REPLY
obj_handle_t handle; /* handle to the desktop */
@END
/* Close a desktop */
@REQ(close_desktop)
obj_handle_t handle; /* handle to the desktop */
@END
/* Get the thread current desktop */
@REQ(get_thread_desktop)
thread_id_t tid; /* thread id */
@REPLY
obj_handle_t handle; /* handle to the desktop */
@END
/* Set the thread current desktop */
@REQ(set_thread_desktop)
obj_handle_t handle; /* handle to the desktop */
@END
/* Get/set information about a user object (window station or desktop) */
@REQ(set_user_object_info)
obj_handle_t handle; /* handle to the object */
unsigned int flags; /* information to set */
unsigned int obj_flags; /* new object flags */
@REPLY
int is_desktop; /* is object a desktop? */
unsigned int old_obj_flags; /* old object flags */
VARARG(name,unicode_str); /* object name */
@END
#define SET_USER_OBJECT_FLAGS 1
/* Attach (or detach) thread inputs */
@REQ(attach_thread_input)
thread_id_t tid_from; /* thread to be attached */
......
......@@ -266,6 +266,17 @@ DECL_HANDLER(set_window_property);
DECL_HANDLER(remove_window_property);
DECL_HANDLER(get_window_property);
DECL_HANDLER(get_window_properties);
DECL_HANDLER(create_winstation);
DECL_HANDLER(open_winstation);
DECL_HANDLER(close_winstation);
DECL_HANDLER(get_process_winstation);
DECL_HANDLER(set_process_winstation);
DECL_HANDLER(create_desktop);
DECL_HANDLER(open_desktop);
DECL_HANDLER(close_desktop);
DECL_HANDLER(get_thread_desktop);
DECL_HANDLER(set_thread_desktop);
DECL_HANDLER(set_user_object_info);
DECL_HANDLER(attach_thread_input);
DECL_HANDLER(get_thread_input);
DECL_HANDLER(get_last_input_time);
......@@ -465,6 +476,17 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(req_handler)req_remove_window_property,
(req_handler)req_get_window_property,
(req_handler)req_get_window_properties,
(req_handler)req_create_winstation,
(req_handler)req_open_winstation,
(req_handler)req_close_winstation,
(req_handler)req_get_process_winstation,
(req_handler)req_set_process_winstation,
(req_handler)req_create_desktop,
(req_handler)req_open_desktop,
(req_handler)req_close_desktop,
(req_handler)req_get_thread_desktop,
(req_handler)req_set_thread_desktop,
(req_handler)req_set_user_object_info,
(req_handler)req_attach_thread_input,
(req_handler)req_get_thread_input,
(req_handler)req_get_last_input_time,
......
......@@ -137,6 +137,7 @@ inline static void init_thread_structure( struct thread *thread )
thread->priority = THREAD_PRIORITY_NORMAL;
thread->affinity = 1;
thread->suspend = 0;
thread->desktop = 0;
thread->creation_time = time(NULL);
thread->exit_time = 0;
......@@ -213,6 +214,7 @@ static void cleanup_thread( struct thread *thread )
free_msg_queue( thread );
cleanup_clipboard_thread(thread);
destroy_thread_windows( thread );
close_thread_desktop( thread );
for (i = 0; i < MAX_INFLIGHT_FDS; i++)
{
if (thread->inflight[i].client != -1)
......@@ -226,6 +228,7 @@ static void cleanup_thread( struct thread *thread )
thread->request_fd = NULL;
thread->reply_fd = NULL;
thread->wait_fd = NULL;
thread->desktop = 0;
if (thread == booting_thread) /* killing booting thread */
{
......@@ -831,6 +834,7 @@ DECL_HANDLER(new_thread)
if ((thread = create_thread( request_fd, current->process )))
{
if (req->suspend) thread->suspend++;
thread->desktop = current->desktop;
reply->tid = get_thread_id( thread );
if ((reply->handle = alloc_handle( current->process, thread,
THREAD_ALL_ACCESS, req->inherit )))
......
......@@ -82,6 +82,7 @@ struct thread
int priority; /* priority level */
int affinity; /* affinity mask */
int suspend; /* suspend count */
obj_handle_t desktop; /* desktop handle */
time_t creation_time; /* Thread creation time */
time_t exit_time; /* Thread exit time */
struct token *token; /* security token associated with this thread */
......
......@@ -2515,6 +2515,115 @@ static void dump_get_window_properties_reply( const struct get_window_properties
dump_varargs_properties( cur_size );
}
static void dump_create_winstation_request( const struct create_winstation_request *req )
{
fprintf( stderr, " flags=%08x,", req->flags );
fprintf( stderr, " access=%08x,", req->access );
fprintf( stderr, " inherit=%d,", req->inherit );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
static void dump_create_winstation_reply( const struct create_winstation_reply *req )
{
fprintf( stderr, " handle=%p", req->handle );
}
static void dump_open_winstation_request( const struct open_winstation_request *req )
{
fprintf( stderr, " access=%08x,", req->access );
fprintf( stderr, " inherit=%d,", req->inherit );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
static void dump_open_winstation_reply( const struct open_winstation_reply *req )
{
fprintf( stderr, " handle=%p", req->handle );
}
static void dump_close_winstation_request( const struct close_winstation_request *req )
{
fprintf( stderr, " handle=%p", req->handle );
}
static void dump_get_process_winstation_request( const struct get_process_winstation_request *req )
{
}
static void dump_get_process_winstation_reply( const struct get_process_winstation_reply *req )
{
fprintf( stderr, " handle=%p", req->handle );
}
static void dump_set_process_winstation_request( const struct set_process_winstation_request *req )
{
fprintf( stderr, " handle=%p", req->handle );
}
static void dump_create_desktop_request( const struct create_desktop_request *req )
{
fprintf( stderr, " flags=%08x,", req->flags );
fprintf( stderr, " access=%08x,", req->access );
fprintf( stderr, " inherit=%d,", req->inherit );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
static void dump_create_desktop_reply( const struct create_desktop_reply *req )
{
fprintf( stderr, " handle=%p", req->handle );
}
static void dump_open_desktop_request( const struct open_desktop_request *req )
{
fprintf( stderr, " flags=%08x,", req->flags );
fprintf( stderr, " access=%08x,", req->access );
fprintf( stderr, " inherit=%d,", req->inherit );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
static void dump_open_desktop_reply( const struct open_desktop_reply *req )
{
fprintf( stderr, " handle=%p", req->handle );
}
static void dump_close_desktop_request( const struct close_desktop_request *req )
{
fprintf( stderr, " handle=%p", req->handle );
}
static void dump_get_thread_desktop_request( const struct get_thread_desktop_request *req )
{
fprintf( stderr, " tid=%04x", req->tid );
}
static void dump_get_thread_desktop_reply( const struct get_thread_desktop_reply *req )
{
fprintf( stderr, " handle=%p", req->handle );
}
static void dump_set_thread_desktop_request( const struct set_thread_desktop_request *req )
{
fprintf( stderr, " handle=%p", req->handle );
}
static void dump_set_user_object_info_request( const struct set_user_object_info_request *req )
{
fprintf( stderr, " handle=%p,", req->handle );
fprintf( stderr, " flags=%08x,", req->flags );
fprintf( stderr, " obj_flags=%08x", req->obj_flags );
}
static void dump_set_user_object_info_reply( const struct set_user_object_info_reply *req )
{
fprintf( stderr, " is_desktop=%d,", req->is_desktop );
fprintf( stderr, " old_obj_flags=%08x,", req->old_obj_flags );
fprintf( stderr, " name=" );
dump_varargs_unicode_str( cur_size );
}
static void dump_attach_thread_input_request( const struct attach_thread_input_request *req )
{
fprintf( stderr, " tid_from=%04x,", req->tid_from );
......@@ -3106,6 +3215,17 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_remove_window_property_request,
(dump_func)dump_get_window_property_request,
(dump_func)dump_get_window_properties_request,
(dump_func)dump_create_winstation_request,
(dump_func)dump_open_winstation_request,
(dump_func)dump_close_winstation_request,
(dump_func)dump_get_process_winstation_request,
(dump_func)dump_set_process_winstation_request,
(dump_func)dump_create_desktop_request,
(dump_func)dump_open_desktop_request,
(dump_func)dump_close_desktop_request,
(dump_func)dump_get_thread_desktop_request,
(dump_func)dump_set_thread_desktop_request,
(dump_func)dump_set_user_object_info_request,
(dump_func)dump_attach_thread_input_request,
(dump_func)dump_get_thread_input_request,
(dump_func)dump_get_last_input_time_request,
......@@ -3302,6 +3422,17 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_remove_window_property_reply,
(dump_func)dump_get_window_property_reply,
(dump_func)dump_get_window_properties_reply,
(dump_func)dump_create_winstation_reply,
(dump_func)dump_open_winstation_reply,
(dump_func)0,
(dump_func)dump_get_process_winstation_reply,
(dump_func)0,
(dump_func)dump_create_desktop_reply,
(dump_func)dump_open_desktop_reply,
(dump_func)0,
(dump_func)dump_get_thread_desktop_reply,
(dump_func)0,
(dump_func)dump_set_user_object_info_reply,
(dump_func)0,
(dump_func)dump_get_thread_input_reply,
(dump_func)dump_get_last_input_time_reply,
......@@ -3498,6 +3629,17 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"remove_window_property",
"get_window_property",
"get_window_properties",
"create_winstation",
"open_winstation",
"close_winstation",
"get_process_winstation",
"set_process_winstation",
"create_desktop",
"open_desktop",
"close_desktop",
"get_thread_desktop",
"set_thread_desktop",
"set_user_object_info",
"attach_thread_input",
"get_thread_input",
"get_last_input_time",
......
......@@ -118,4 +118,10 @@ extern void release_class( struct window_class *class );
extern atom_t get_class_atom( struct window_class *class );
extern void *get_class_client_ptr( struct window_class *class );
/* windows station functions */
extern void connect_process_winstation( struct process *process, const WCHAR *name, size_t len );
extern void connect_thread_desktop( struct thread *thread, const WCHAR *name, size_t len );
extern void close_thread_desktop( struct thread *thread );
#endif /* __WINE_SERVER_USER_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment