/*
* PROJECT: ReactOS Windows-Compatible Session Manager
* LICENSE: BSD 2-Clause License
- * FILE: base/system/smss/smss.c
+ * FILE: base/system/smss/smutil.c
* PURPOSE: Main SMSS Code
* PROGRAMMERS: Alex Ionescu
*/
/* INCLUDES *******************************************************************/
#include "smss.h"
+
+#include <ndk/sefuncs.h>
+
#define NDEBUG
#include <debug.h>
if (!Token->Buffer) return STATUS_NO_MEMORY;
/* Fill in the unicode string to hold it */
- Token->MaximumLength = TokenLength + sizeof(UNICODE_NULL);
- Token->Length = TokenLength;
+ Token->MaximumLength = (USHORT)(TokenLength + sizeof(UNICODE_NULL));
+ Token->Length = (USHORT)TokenLength;
RtlCopyMemory(Token->Buffer, p, TokenLength);
Token->Buffer[TokenLength / sizeof(WCHAR)] = UNICODE_NULL;
}
/* Modify the input string with the position of where the next token begins */
- Input->Length -= (ULONG_PTR)pp - (ULONG_PTR)Input->Buffer;
+ Input->Length -= (USHORT)((ULONG_PTR)pp - (ULONG_PTR)Input->Buffer);
Input->Buffer = pp;
return STATUS_SUCCESS;
}
sizeof(L"\\system32;");
RtlInitEmptyUnicodeString(&FullPathString,
RtlAllocateHeap(SmpHeap, SmBaseTag, Length),
- Length);
+ (USHORT)Length);
if (FullPathString.Buffer)
{
/* Append the root, system32;, and then the current library path */
Length = PAGE_SIZE;
RtlInitEmptyUnicodeString(&PathString,
RtlAllocateHeap(SmpHeap, SmBaseTag, Length),
- Length);
+ (USHORT)Length);
if (!PathString.Buffer)
{
/* Fail if we have no memory for this */
Length = PathString.Length + sizeof(UNICODE_NULL);
RtlInitEmptyUnicodeString(&PathString,
RtlAllocateHeap(SmpHeap, SmBaseTag, Length),
- Length);
+ (USHORT)Length);
if (!PathString.Buffer)
{
/* Fail if we have no memory for this */
Status = RtlLockBootStatusData(&BootState);
if (NT_SUCCESS(Status))
{
- /* Write the bootokay and bootshudown values */
+ /* Write the bootokay and bootshutdown values */
RtlGetSetBootStatusData(BootState,
FALSE,
RtlBsdItemBootGood,