3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/ex/win32k.c
6 * PURPOSE: Executive Win32 subsystem support
8 * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) - Moved callbacks to win32k and cleanup.
9 * Casper S. Hornstrup (chorns@users.sourceforge.net)
14 #include <internal/debug.h>
16 #if defined (ALLOC_PRAGMA)
17 #pragma alloc_text(INIT, ExpWin32kInit)
20 /* DATA **********************************************************************/
22 POBJECT_TYPE ExWindowStationObjectType
= NULL
;
23 POBJECT_TYPE ExDesktopObjectType
= NULL
;
25 static GENERIC_MAPPING ExpWindowStationMapping
=
28 STANDARD_RIGHTS_WRITE
,
29 STANDARD_RIGHTS_EXECUTE
,
30 STANDARD_RIGHTS_REQUIRED
33 static GENERIC_MAPPING ExpDesktopMapping
=
36 STANDARD_RIGHTS_WRITE
,
37 STANDARD_RIGHTS_EXECUTE
,
38 STANDARD_RIGHTS_REQUIRED
41 OB_OPEN_METHOD ExpWindowStationObjectOpen
= NULL
;
42 OB_PARSE_METHOD ExpWindowStationObjectParse
= NULL
;
43 OB_DELETE_METHOD ExpWindowStationObjectDelete
= NULL
;
44 OB_FIND_METHOD ExpWindowStationObjectFind
= NULL
;
45 OB_CREATE_METHOD ExpDesktopObjectCreate
= NULL
;
46 OB_DELETE_METHOD ExpDesktopObjectDelete
= NULL
;
48 /* FUNCTIONS ****************************************************************/
52 ExpWinStaObjectOpen(OB_OPEN_REASON Reason
,
56 ACCESS_MASK GrantedAccess
)
58 /* Call the Registered Callback */
59 return ExpWindowStationObjectOpen(Reason
,
68 ExpWinStaObjectDelete(PVOID DeletedObject
)
70 /* Call the Registered Callback */
71 ExpWindowStationObjectDelete(DeletedObject
);
76 ExpWinStaObjectFind(PVOID WinStaObject
,
80 /* Call the Registered Callback */
81 return ExpWindowStationObjectFind(WinStaObject
,
88 ExpWinStaObjectParse(PVOID Object
,
90 PUNICODE_STRING FullPath
,
94 /* Call the Registered Callback */
95 return ExpWindowStationObjectParse(Object
,
104 ExpDesktopCreate(PVOID ObjectBody
,
107 struct _OBJECT_ATTRIBUTES
* ObjectAttributes
)
109 /* Call the Registered Callback */
110 return ExpDesktopObjectCreate(ObjectBody
,
118 ExpDesktopDelete(PVOID DeletedObject
)
120 /* Call the Registered Callback */
121 ExpDesktopObjectDelete(DeletedObject
);
129 OBJECT_TYPE_INITIALIZER ObjectTypeInitializer
;
132 DPRINT("Creating window station Object Type\n");
134 /* Create the window station Object Type */
135 RtlZeroMemory(&ObjectTypeInitializer
, sizeof(ObjectTypeInitializer
));
136 RtlInitUnicodeString(&Name
, L
"WindowStation");
137 ObjectTypeInitializer
.Length
= sizeof(ObjectTypeInitializer
);
138 ObjectTypeInitializer
.GenericMapping
= ExpWindowStationMapping
;
139 ObjectTypeInitializer
.PoolType
= NonPagedPool
;
140 ObjectTypeInitializer
.OpenProcedure
= ExpWinStaObjectOpen
;
141 ObjectTypeInitializer
.DeleteProcedure
= ExpWinStaObjectDelete
;
142 ObjectTypeInitializer
.ParseProcedure
= ExpWinStaObjectParse
;
143 ObpCreateTypeObject(&ObjectTypeInitializer
, &Name
, &ExWindowStationObjectType
);
145 /* Create desktop object type */
146 RtlInitUnicodeString(&Name
, L
"Desktop");
147 ObjectTypeInitializer
.GenericMapping
= ExpDesktopMapping
;
148 ObjectTypeInitializer
.OpenProcedure
= NULL
;
149 ObjectTypeInitializer
.DeleteProcedure
= ExpDesktopDelete
;
150 ObjectTypeInitializer
.ParseProcedure
= NULL
;
152 ObpCreateTypeObject(&ObjectTypeInitializer
, &Name
, &ExDesktopObjectType
);