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 /* DATA **********************************************************************/
18 POBJECT_TYPE EXPORTED ExWindowStationObjectType
= NULL
;
19 POBJECT_TYPE EXPORTED ExDesktopObjectType
= NULL
;
21 static GENERIC_MAPPING ExpWindowStationMapping
=
24 STANDARD_RIGHTS_WRITE
,
25 STANDARD_RIGHTS_EXECUTE
,
26 STANDARD_RIGHTS_REQUIRED
29 static GENERIC_MAPPING ExpDesktopMapping
=
32 STANDARD_RIGHTS_WRITE
,
33 STANDARD_RIGHTS_EXECUTE
,
34 STANDARD_RIGHTS_REQUIRED
37 OB_OPEN_METHOD ExpWindowStationObjectOpen
= NULL
;
38 OB_PARSE_METHOD ExpWindowStationObjectParse
= NULL
;
39 OB_DELETE_METHOD ExpWindowStationObjectDelete
= NULL
;
40 OB_FIND_METHOD ExpWindowStationObjectFind
= NULL
;
41 OB_CREATE_METHOD ExpDesktopObjectCreate
= NULL
;
42 OB_DELETE_METHOD ExpDesktopObjectDelete
= NULL
;
44 /* FUNCTIONS ****************************************************************/
48 ExpWinStaObjectOpen(OB_OPEN_REASON Reason
,
52 ACCESS_MASK GrantedAccess
)
54 /* Call the Registered Callback */
55 return ExpWindowStationObjectOpen(Reason
,
64 ExpWinStaObjectDelete(PVOID DeletedObject
)
66 /* Call the Registered Callback */
67 ExpWindowStationObjectDelete(DeletedObject
);
72 ExpWinStaObjectFind(PVOID WinStaObject
,
76 /* Call the Registered Callback */
77 return ExpWindowStationObjectFind(WinStaObject
,
84 ExpWinStaObjectParse(PVOID Object
,
86 PUNICODE_STRING FullPath
,
90 /* Call the Registered Callback */
91 return ExpWindowStationObjectParse(Object
,
100 ExpDesktopCreate(PVOID ObjectBody
,
103 struct _OBJECT_ATTRIBUTES
* ObjectAttributes
)
105 /* Call the Registered Callback */
106 return ExpDesktopObjectCreate(ObjectBody
,
114 ExpDesktopDelete(PVOID DeletedObject
)
116 /* Call the Registered Callback */
117 ExpDesktopObjectDelete(DeletedObject
);
125 OBJECT_TYPE_INITIALIZER ObjectTypeInitializer
;
128 DPRINT("Creating window station Object Type\n");
130 /* Create the window station Object Type */
131 RtlZeroMemory(&ObjectTypeInitializer
, sizeof(ObjectTypeInitializer
));
132 RtlInitUnicodeString(&Name
, L
"WindowStation");
133 ObjectTypeInitializer
.Length
= sizeof(ObjectTypeInitializer
);
134 ObjectTypeInitializer
.GenericMapping
= ExpWindowStationMapping
;
135 ObjectTypeInitializer
.PoolType
= NonPagedPool
;
136 ObjectTypeInitializer
.UseDefaultObject
= TRUE
;
137 ObjectTypeInitializer
.OpenProcedure
= ExpWinStaObjectOpen
;
138 ObjectTypeInitializer
.DeleteProcedure
= ExpWinStaObjectDelete
;
139 ObjectTypeInitializer
.ParseProcedure
= ExpWinStaObjectParse
;
140 ObpCreateTypeObject(&ObjectTypeInitializer
, &Name
, &ExWindowStationObjectType
);
142 /* Create desktop object type */
143 RtlInitUnicodeString(&Name
, L
"Desktop");
144 ObjectTypeInitializer
.GenericMapping
= ExpDesktopMapping
;
145 ObjectTypeInitializer
.OpenProcedure
= NULL
;
146 ObjectTypeInitializer
.DeleteProcedure
= ExpDesktopDelete
;
147 ObjectTypeInitializer
.ParseProcedure
= NULL
;
149 ObpCreateTypeObject(&ObjectTypeInitializer
, &Name
, &ExDesktopObjectType
);