ReactOS 0.4.15-dev-8127-g6338913
winsta.h
Go to the documentation of this file.
1#pragma once
2
3#define WINSTA_OBJ_DIR L"\\Windows\\WindowStations"
4#define SESSION_DIR L"\\Sessions"
5
6/* Window Station Status Flags */
7#define WSS_LOCKED (1)
8#define WSS_NOINTERACTIVE (2)
9#define WSS_NOIO (4)
10#define WSS_SHUTDOWN (8)
11#define WSS_DYING (16)
12#define WSS_REALSHUTDOWN (32)
13
14// See also: https://reactos.org/wiki/Techwiki:Win32k/WINDOWSTATION
15typedef struct _WINSTATION_OBJECT
16{
18
21
23 struct tagKL* spklList;
29 PCLIP pClipBase; // Not a clip object.
35
40
41 /* ReactOS-specific */
46
47#ifndef _WIN64
50C_ASSERT(offsetof(WINSTATION_OBJECT, ptiClipLock) == 0x18);
51C_ASSERT(offsetof(WINSTATION_OBJECT, ptiDrawingClipboard) == 0x1c);
52C_ASSERT(offsetof(WINSTATION_OBJECT, spwndClipOpen) == 0x20);
53C_ASSERT(offsetof(WINSTATION_OBJECT, spwndClipViewer) == 0x24);
54C_ASSERT(offsetof(WINSTATION_OBJECT, spwndClipOwner) == 0x28);
55#endif
56
58extern HANDLE gpidLogon;
59extern HWND hwndSAS;
61
62CODE_SEG("INIT")
66
70
75
80
85
89 HWINSTA WindowStation,
93 POBJECT_HANDLE_INFORMATION pObjectHandleInfo);
94
98 OUT HWINSTA* phWinSta,
101 IN KPROCESSOR_MODE OwnerMode,
102 IN ACCESS_MASK dwDesiredAccess,
103 DWORD Unknown2,
108
110BOOL FASTCALL UserSetProcessWindowStation(HWINSTA hWindowStation);
111
115
116/* EOF */
#define CODE_SEG(...)
PRTL_UNICODE_STRING_BUFFER PULONG PULONG Unknown4
LONG NTSTATUS
Definition: precomp.h:26
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD IN DWORD IN DWORD IN DWORD Unknown6
Definition: conport.c:40
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD IN DWORD IN DWORD Unknown5
Definition: conport.c:39
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD Unknown3
Definition: conport.c:37
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define C_ASSERT(e)
Definition: intsafe.h:73
struct atom_table ** PRTL_ATOM_TABLE
Definition: atom.c:43
#define _In_
Definition: ms_sal.h:308
ULONG ACCESS_MASK
Definition: nt_native.h:40
#define FASTCALL
Definition: nt_native.h:50
#define offsetof(TYPE, MEMBER)
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
Definition: clipboard.h:4
Definition: typedefs.h:120
INT fInDelayedRendering
Definition: winsta.h:34
DWORD cNumClipFormats
Definition: winsta.h:30
PWND spwndClipOwner
Definition: winsta.h:28
struct _DESKTOP * ActiveDesktop
Definition: winsta.h:42
DWORD dwSessionId
Definition: winsta.h:17
PWND spwndClipViewer
Definition: winsta.h:27
HANDLE ShellListView
Definition: winsta.h:44
INT iClipSerialNumber
Definition: winsta.h:31
PTHREADINFO ptiDrawingClipboard
Definition: winsta.h:25
PTHREADINFO ptiClipLock
Definition: winsta.h:24
HANDLE ShellWindow
Definition: winsta.h:43
PWND spwndClipboardListener
Definition: winsta.h:36
INT fClipboardChanged
Definition: winsta.h:33
PWND spwndClipOpen
Definition: winsta.h:26
PCLIP pClipBase
Definition: winsta.h:29
struct tagKL * spklList
Definition: winsta.h:23
LUID luidEndSession
Definition: winsta.h:37
INT iClipSequenceNumber
Definition: winsta.h:32
PRTL_ATOM_TABLE AtomTable
Definition: winsta.h:20
PVOID psidUser
Definition: winsta.h:39
LIST_ENTRY DesktopListHead
Definition: winsta.h:19
Definition: ntuser.h:694
Definition: input.h:27
#define NTAPI
Definition: typedefs.h:36
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2658
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:869
struct _WINSTATION_OBJECT WINSTATION_OBJECT
NTSTATUS NTAPI IntWinStaObjectDelete(_In_ PVOID Parameters)
Definition: winsta.c:106
WINSTATION_OBJECT * InputWindowStation
Definition: winsta.c:21
VOID FASTCALL IntEndDesktopGraphics(VOID)
Definition: winsta.c:358
NTSTATUS NTAPI IntWinStaOkToClose(_In_ PVOID Parameters)
Definition: winsta.c:203
UNICODE_STRING gustrWindowStationsDir
Definition: winsta.c:27
NTSTATUS NTAPI InitWindowStationImpl(VOID)
Definition: winsta.c:34
HWND hwndSAS
Definition: winsta.c:24
PWINSTATION_OBJECT FASTCALL IntGetProcessWindowStation(HWINSTA *phWinSta OPTIONAL)
Definition: winsta.c:400
struct _WINSTATION_OBJECT * PWINSTATION_OBJECT
BOOL FASTCALL CheckWinstaAttributeAccess(ACCESS_MASK)
Definition: winsta.c:377
HANDLE gpidLogon
Definition: simplecall.c:15
NTSTATUS FASTCALL IntCreateWindowStation(OUT HWINSTA *phWinSta, IN POBJECT_ATTRIBUTES ObjectAttributes, IN KPROCESSOR_MODE AccessMode, IN KPROCESSOR_MODE OwnerMode, IN ACCESS_MASK dwDesiredAccess, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4, DWORD Unknown5, DWORD Unknown6)
Definition: winsta.c:447
BOOL FASTCALL co_IntInitializeDesktopGraphics(VOID)
Definition: winsta.c:262
NTSTATUS FASTCALL IntValidateWindowStationHandle(HWINSTA WindowStation, KPROCESSOR_MODE AccessMode, ACCESS_MASK DesiredAccess, PWINSTATION_OBJECT *Object, POBJECT_HANDLE_INFORMATION pObjectHandleInfo)
Definition: winsta.c:232
NTSTATUS NTAPI UserCreateWinstaDirectory(VOID)
Definition: winsta.c:51
NTSTATUS NTAPI IntWinStaObjectParse(_In_ PVOID Parameters)
Definition: winsta.c:138
BOOL FASTCALL UserSetProcessWindowStation(HWINSTA hWindowStation)
Definition: winsta.c:1382
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
_In_ PEPROCESS _In_ KPROCESSOR_MODE AccessMode
Definition: mmfuncs.h:396