[TRANSLATION][CLIPBRD] Italian translation implemented (#344)
[reactos.git] / base / system / smss / smutil.c
index e50f2ff..f3d5da0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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
  */
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 
 #include "smss.h"
+
+#include <ndk/sefuncs.h>
+
 #define NDEBUG
 #include <debug.h>
 
@@ -213,14 +216,14 @@ SmpParseToken(IN PUNICODE_STRING Input,
         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;
 }
@@ -256,7 +259,7 @@ SmpParseCommandLine(IN PUNICODE_STRING CommandLine,
                  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 */
@@ -308,7 +311,7 @@ SmpParseCommandLine(IN PUNICODE_STRING CommandLine,
     Length = PAGE_SIZE;
     RtlInitEmptyUnicodeString(&PathString,
                               RtlAllocateHeap(SmpHeap, SmBaseTag, Length),
-                              Length);
+                              (USHORT)Length);
     if (!PathString.Buffer)
     {
         /* Fail if we have no memory for this */
@@ -329,7 +332,7 @@ SmpParseCommandLine(IN PUNICODE_STRING CommandLine,
         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 */
@@ -533,7 +536,7 @@ SmpRestoreBootStatusData(IN BOOLEAN BootOkay,
     Status = RtlLockBootStatusData(&BootState);
     if (NT_SUCCESS(Status))
     {
-        /* Write the bootokay and bootshudown values */
+        /* Write the bootokay and bootshutdown values */
         RtlGetSetBootStatusData(BootState,
                                 FALSE,
                                 RtlBsdItemBootGood,