3 * initobdir.c - Session Manager object directories
5 * ReactOS Operating System
7 * --------------------------------------------------------------------
9 * This software is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
14 * This software is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this software; see the file COPYING.LIB. If not, write
21 * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
24 * --------------------------------------------------------------------
31 static NTSTATUS STDCALL
32 SmpObjectDirectoryQueryRoutine(PWSTR ValueName
,
39 OBJECT_ATTRIBUTES ObjectAttributes
;
40 UNICODE_STRING UnicodeString
;
41 HANDLE WindowsDirectory
;
42 NTSTATUS Status
= STATUS_SUCCESS
;
44 DPRINT("ValueName '%S' Type %lu Length %lu\n", ValueName
, ValueType
, ValueLength
);
45 DPRINT("ValueData '%S'\n", (PWSTR
)ValueData
);
46 if (ValueType
!= REG_SZ
)
48 return(STATUS_SUCCESS
);
51 RtlInitUnicodeString(&UnicodeString
,
54 InitializeObjectAttributes(&ObjectAttributes
,
60 Status
= ZwCreateDirectoryObject(&WindowsDirectory
,
69 SmCreateObjectDirectories(VOID
)
71 RTL_QUERY_REGISTRY_TABLE QueryTable
[2];
74 RtlZeroMemory(&QueryTable
,
77 QueryTable
[0].Name
= L
"ObjectDirectories";
78 QueryTable
[0].QueryRoutine
= SmpObjectDirectoryQueryRoutine
;
80 Status
= RtlQueryRegistryValues(RTL_REGISTRY_CONTROL
,
81 SM_REGISTRY_ROOT_NAME
,