Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

win32.c File Reference

#include "exp.h"

Go to the source code of this file.

Functions

BOOLEAN ExpWin32Initialization ()

Variables

POBJECT_TYPE ExWindowStationObjectType
POBJECT_TYPE ExDesktopObjectType
GENERIC_MAPPING ExpWindowStationMapping
GENERIC_MAPPING ExpDesktopMapping


Function Documentation

BOOLEAN ExpWin32Initialization  ) 
 

Definition at line 60 of file win32.c.

References ExDesktopObjectType, ExpDesktopMapping, ExpWindowStationMapping, ExWindowStationObjectType, FALSE, L, NonPagedPool, NT_SUCCESS, NTSTATUS(), NULL, ObCreateObjectType(), RtlInitUnicodeString(), Status, and TRUE.

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 // Initialize string descriptor. 00090 // 00091 00092 RtlInitUnicodeString(&TypeName, L"WindowStation"); 00093 00094 // 00095 // Create windowstation object type descriptor. 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 // If the windowstation object type descriptor was not successfully 00114 // created, then return a value of FALSE. 00115 // 00116 00117 if (!NT_SUCCESS(Status)) 00118 return FALSE; 00119 00120 // 00121 // Initialize string descriptor. 00122 // 00123 00124 RtlInitUnicodeString(&TypeName, L"Desktop"); 00125 00126 // 00127 // Create windowstation object type descriptor. 00128 // 00129 00130 ObjectTypeInitializer.GenericMapping = ExpDesktopMapping; 00131 Status = ObCreateObjectType(&TypeName, 00132 &ObjectTypeInitializer, 00133 (PSECURITY_DESCRIPTOR)NULL, 00134 &ExDesktopObjectType); 00135 00136 // 00137 // If the desktop object type descriptor was successfully created, then 00138 // return a value of TRUE. Otherwise return a value of FALSE. 00139 // 00140 00141 return (BOOLEAN)(NT_SUCCESS(Status)); 00142 } }


Variable Documentation

POBJECT_TYPE ExDesktopObjectType
 

Definition at line 33 of file win32.c.

Referenced by _GetUserObjectInformation(), _SetUserObjectInformation(), ExpWin32Initialization(), FreeDesktop(), LockObjectAssignment(), MapDesktop(), NtUserOpenInputDesktop(), OkayToCloseDesktop(), ParseDesktop(), ParseWindowStation(), UnlockObjectAssignment(), UnmapDesktop(), ValidateHdesk(), xxxCloseDesktop(), xxxConsoleControl(), xxxCreateDesktop(), xxxCreateDesktop2(), xxxCreateThreadInfo(), xxxGetThreadDesktop(), xxxOpenDesktop(), xxxResolveDesktop(), xxxSetCsrssThreadDesktop(), and zzzSetDesktop().

GENERIC_MAPPING ExpDesktopMapping
 

Initial value:

{ STANDARD_RIGHTS_READ, STANDARD_RIGHTS_WRITE, STANDARD_RIGHTS_EXECUTE, STANDARD_RIGHTS_REQUIRED }

Definition at line 48 of file win32.c.

Referenced by ExpWin32Initialization().

GENERIC_MAPPING ExpWindowStationMapping
 

Initial value:

{ STANDARD_RIGHTS_READ, STANDARD_RIGHTS_WRITE, STANDARD_RIGHTS_EXECUTE, STANDARD_RIGHTS_REQUIRED }

Definition at line 38 of file win32.c.

Referenced by ExpWin32Initialization().

POBJECT_TYPE ExWindowStationObjectType
 

Definition at line 32 of file win32.c.

Referenced by _GetUserObjectInformation(), _OpenWindowStation(), _SetUserObjectInformation(), DestroyWindowStation(), ExpWin32Initialization(), FreeWindowStation(), OkayToCloseWindowStation(), ParseDesktop(), ParseWindowStation(), ReferenceWindowStation(), ValidateHwinsta(), xxxCreateDesktop(), xxxCreateWindowStation(), xxxResolveDesktop(), and xxxSetProcessWindowStation().


Generated on Sat May 15 19:46:08 2004 for test by doxygen 1.3.7