[SMSS2]: Use SMSS2's environment when creating SMSS.
svn path=/trunk/; revision=55455
RtlLeaveCriticalSection (& SmpClientDirectory.Lock);
return Status;
}
-
+#if 0
/* === Utilities for SmQryInfo === */
/**********************************************************************
RtlLeaveCriticalSection (& SmpClientDirectory.Lock);
return Status;
}
-
+#endif
/* EOF */
#define NDEBUG
#include <debug.h>
+#if 0
/* GLOBALS ***********************************************************/
return STATUS_SUCCESS;
}
+#endif
+
/* EOF */
// {TRUE, SmInitDosDevices, "create dos device links"},
// {TRUE, SmRunBootApplications, "run boot applications"},
// {TRUE, SmProcessFileRenameList, "process the file rename list"},
- {FALSE, SmUpdateEnvironment, "update environment variables"},
+// {FALSE, SmUpdateEnvironment, "update environment variables"},
// {FALSE, SmLoadKnownDlls, "preload system DLLs"},
// {TRUE, SmCreatePagingFiles, "create paging files"},
// {TRUE, SmInitializeRegistry, "initialize the registry"},
#define NDEBUG
#include <debug.h>
+#if 0
+
static NTSTATUS NTAPI
SmpDosDevicesQueryRoutine(PWSTR ValueName,
ULONG ValueType,
return(Status);
}
+#endif
+
/* EOF */
NTSTATUS
SmCreateEnvironment(VOID)
{
- return RtlCreateEnvironment(FALSE, &SmSystemEnvironment);
+ return RtlCreateEnvironment(TRUE, &SmSystemEnvironment);
}
+#if 0
+
static NTSTATUS
SmpSetEnvironmentVariable(IN PVOID Context,
IN PWSTR ValueName,
return SmpSetEnvironmentVariable(Context,ValueName,(PWSTR)ValueData);
}
-
NTSTATUS
SmSetEnvironmentVariables(VOID)
{
return Status;
}
-
/**********************************************************************
* Set environment variables from registry
*/
NTSTATUS
SmUpdateEnvironment(VOID)
{
- RTL_QUERY_REGISTRY_TABLE QueryTable[2];
+ //RTL_QUERY_REGISTRY_TABLE QueryTable[2];
WCHAR ValueBuffer[MAX_PATH];
NTSTATUS Status;
#ifndef NDEBUG
return Status;
}
-
+#endif
/* EOF */
#define NDEBUG
#include <debug.h>
+#if 0
/* FUNCTIONS *****************************************************************/
return (STATUS_SUCCESS);
}
+#endif
+
/* EOF */
#define NDEBUG
#include <debug.h>
+#if 0
static NTSTATUS NTAPI
SmpObjectDirectoryQueryRoutine(PWSTR ValueName,
ULONG ValueType,
return(Status);
}
+#endif
/* EOF */
#define NDEBUG
#include <debug.h>
+#if 0
+
#define GIGABYTE (1024 * 1024 * 1024) /* One Gigabyte */
static NTSTATUS NTAPI
return Status;
}
-
+#endif
/* EOF */
#define NDEBUG
#include <debug.h>
+#if 0
NTSTATUS
SmInitializeRegistry(VOID)
{
/* Load remaining registry hives */
return NtInitializeRegistry(CM_BOOT_FLAG_SMSS);
}
+#endif
/* EOF */
#define NDEBUG
#include <debug.h>
+#if 0
//HANDLE Children[2] = {0, 0}; /* csrss, winlogon */
return(Status);
}
-
+#endif
/* EOF */
#define NDEBUG
#include <debug.h>
+#if 0
static NTSTATUS NTAPI
SmpKnownDllsQueryRoutine(PWSTR ValueName,
ULONG ValueType,
return Status;
}
-
+#endif
/* EOF */
#define NDEBUG
#include <debug.h>
+#if 0
VOID NTAPI DisplayString(LPCWSTR lpwString)
{
UNICODE_STRING us;
NtDisplayString(&UnicodeString);
RtlFreeUnicodeString (&UnicodeString);
}
+#endif
/* EOF */
SmInvalid, /* obsolete */
SmInvalid, /* unknown */
SmExecPgm, /* smapiexec.c */
- SmQryInfo /* smapyqry.c */
+ SmInvalid /* smapyqry.c */
};
/* TODO: optimize this address computation (it should be done
else
{
/*
- * OK, the definition is empty, but check
- * if it is the name of an embedded subsystem.
+ * Badly defined subsystem. Check the registry!
*/
- if(0 == _wcsicmp(L"DEBUG", Name))
- {
- /*
- * Initialize the embedded DBGSS.
- */
- Request->SmHeader.Status = SmInitializeDbgSs();
- }
- else
- {
- /*
- * Badly defined subsystem. Check the registry!
- */
- Request->SmHeader.Status = STATUS_NOT_FOUND;
- }
+ Request->SmHeader.Status = STATUS_NOT_FOUND;
}
} else {
/* It couldn't lookup the Name! */
#define NDEBUG
#include <debug.h>
-
+#if 0
/**********************************************************************
* SmQryInfo/1 API
*/
}
return Status;
}
-
+#endif
/* EOF */
SIZE_T Size;
PWSTR p;
UNICODE_STRING NullString = RTL_CONSTANT_STRING(L"");
- UNICODE_STRING SmssName, Environment, SystemDriveString, DebugString;
+ UNICODE_STRING SmssName, DebugString;
PVOID EnvironmentPtr = NULL;
PRTL_USER_PROCESS_INFORMATION ProcessInformation;
PRTL_USER_PROCESS_PARAMETERS ProcessParams = NULL;
NtInitialUserProcessBuffer);
/* Create the environment string */
- RtlInitEmptyUnicodeString(&Environment,
- ProcessParams->Environment,
- (USHORT)Size);
-
- /* Append the DLL path to it */
- RtlAppendUnicodeToString(&Environment, L"Path=");
- RtlAppendUnicodeStringToString(&Environment, &ProcessParams->DllPath);
- RtlAppendUnicodeStringToString(&Environment, &NullString);
-
- /* Create the system drive string */
- SystemDriveString = SmpSystemRoot;
- SystemDriveString.Length = 2 * sizeof(WCHAR);
-
- /* Append it to the environment */
- RtlAppendUnicodeToString(&Environment, L"SystemDrive=");
- RtlAppendUnicodeStringToString(&Environment, &SystemDriveString);
- RtlAppendUnicodeStringToString(&Environment, &NullString);
-
- /* Append the system root to the environment */
- RtlAppendUnicodeToString(&Environment, L"SystemRoot=");
- RtlAppendUnicodeStringToString(&Environment, &SmpSystemRoot);
- RtlAppendUnicodeStringToString(&Environment, &NullString);
+ ProcessParams->Environment = SmpDefaultEnvironment;
/* Create SMSS process */
SmssName = ProcessParams->ImagePathName;