00065 :
00066
00067 This function creates
the Win32 object
type descriptors at system
00068 initialization and stores
the address of
the object
type descriptor
00069 in local
static storage.
00070
00071 Arguments:
00072
00073 None.
00074
00075 Return Value:
00076
00077
A value of
TRUE is returned
if the Win32 object
type descriptors are
00078 successfully created. Otherwise a value of
FALSE is returned.
00079
00080 --*/
00081
00082 {
00083
00084
OBJECT_TYPE_INITIALIZER ObjectTypeInitializer;
00085
NTSTATUS Status;
00086 UNICODE_STRING TypeName;
00087
00088
00089
00090
00091
00092
RtlInitUnicodeString(&TypeName, L
"WindowStation");
00093
00094
00095
00096
00097
00098 RtlZeroMemory(&ObjectTypeInitializer,
sizeof(ObjectTypeInitializer));
00099 ObjectTypeInitializer.
Length =
sizeof(ObjectTypeInitializer);
00100 ObjectTypeInitializer.
GenericMapping =
ExpWindowStationMapping;
00101 ObjectTypeInitializer.
SecurityRequired =
TRUE;
00102 ObjectTypeInitializer.
PoolType =
NonPagedPool;
00103 ObjectTypeInitializer.
InvalidAttributes = OBJ_OPENLINK |
00104 OBJ_PERMANENT |
00105 OBJ_EXCLUSIVE;
00106 ObjectTypeInitializer.
ValidAccessMask = STANDARD_RIGHTS_REQUIRED;
00107
Status =
ObCreateObjectType(&TypeName,
00108 &ObjectTypeInitializer,
00109 (PSECURITY_DESCRIPTOR)NULL,
00110 &ExWindowStationObjectType);
00111
00112
00113
00114
00115
00116
00117
if (!
NT_SUCCESS(Status))
00118
return FALSE;
00119
00120
00121
00122
00123
00124
RtlInitUnicodeString(&TypeName, L
"Desktop");
00125
00126
00127
00128
00129
00130 ObjectTypeInitializer.
GenericMapping =
ExpDesktopMapping;
00131
Status =
ObCreateObjectType(&TypeName,
00132 &ObjectTypeInitializer,
00133 (PSECURITY_DESCRIPTOR)NULL,
00134 &ExDesktopObjectType);
00135
00136
00137
00138
00139
00140
00141
return (BOOLEAN)(
NT_SUCCESS(Status));
00142 }
}