Merged r16363:16600 from trunk.
Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/api/process.c
Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/api/wapi.c
Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/csrss.xml
Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/include/conio.h
Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/init.c
Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/win32csr/conio.c
Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/win32csr/guiconsole.c
Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/win32csr/tuiconsole.c
Modified: branches/cache_manager_rewrite/reactos/subsys/smss/client.c
Modified: branches/cache_manager_rewrite/reactos/subsys/smss/debug.c
Modified: branches/cache_manager_rewrite/reactos/subsys/smss/init.c
Modified: branches/cache_manager_rewrite/reactos/subsys/smss/initss.c
Modified: branches/cache_manager_rewrite/reactos/subsys/smss/smapi.c
Modified: branches/cache_manager_rewrite/reactos/subsys/smss/smapiexec.c
Modified: branches/cache_manager_rewrite/reactos/subsys/smss/smss.h
Property changes on: branches/cache_manager_rewrite/reactos/subsys/csrss
___________________________________________________________________
Name: svn:ignore
   - csrss.coff
csrss.exe
csrss.nostrip.exe
*.d
*.o
*.a
*.sym
*.map
win32k.c
makefile
   + csrss.coff
csrss.exe
csrss.nostrip.exe
*.d
*.o
*.a
*.sym
*.map
win32k.c
*.gch
makefile

Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/api/process.c
--- branches/cache_manager_rewrite/reactos/subsys/csrss/api/process.c	2005-08-14 17:10:07 UTC (rev 17386)
+++ branches/cache_manager_rewrite/reactos/subsys/csrss/api/process.c	2005-08-14 17:12:10 UTC (rev 17387)
@@ -118,7 +118,7 @@
 NTSTATUS STDCALL CsrFreeProcessData(HANDLE Pid)
 {
   ULONG hash;
-  int c;
+  UINT c;
   PCSRSS_PROCESS_DATA pProcessData, pPrevProcessData = NULL;
 
   hash = (ULONG_PTR)Pid % (sizeof(ProcessData) / sizeof(*ProcessData));

Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/api/wapi.c
--- branches/cache_manager_rewrite/reactos/subsys/csrss/api/wapi.c	2005-08-14 17:10:07 UTC (rev 17386)
+++ branches/cache_manager_rewrite/reactos/subsys/csrss/api/wapi.c	2005-08-14 17:12:10 UTC (rev 17387)
@@ -165,7 +165,7 @@
     
     /* Close the port and exit the thread */
     NtClose(ServerPort);
-    NtTerminateThread(NtCurrentThread(), STATUS_SUCCESS);
+    RtlExitUserThread(STATUS_SUCCESS);
 }
 
 /**********************************************************************
@@ -237,8 +237,8 @@
 				     NULL,
 				     FALSE,
 				     0,
-				     NULL,
-				     NULL,
+				     0,
+				     0,
 				     (PTHREAD_START_ROUTINE)ClientConnectionThread,
 				     ServerPort,
 				     & ServerThread,

Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/csrss.xml
--- branches/cache_manager_rewrite/reactos/subsys/csrss/csrss.xml	2005-08-14 17:10:07 UTC (rev 17386)
+++ branches/cache_manager_rewrite/reactos/subsys/csrss/csrss.xml	2005-08-14 17:12:10 UTC (rev 17387)
@@ -4,7 +4,7 @@
 	<define name="__USE_W32API" />
 	<define name="_WIN32_WINNT">0x0600</define>
 	<define name="WINVER">0x0501</define>
-	<library>rosrtl</library>
+	<library>intrlck</library>
 	<library>ntdll</library>
 	<library>smdll</library>
 	<directory name="api">

Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/include/conio.h
--- branches/cache_manager_rewrite/reactos/subsys/csrss/include/conio.h	2005-08-14 17:10:07 UTC (rev 17386)
+++ branches/cache_manager_rewrite/reactos/subsys/csrss/include/conio.h	2005-08-14 17:12:10 UTC (rev 17387)
@@ -50,7 +50,7 @@
 typedef struct tagCSRSS_CONSOLE_VTBL
 {
   VOID (STDCALL *InitScreenBuffer)(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER ScreenBuffer);
-  VOID (STDCALL *WriteStream)(PCSRSS_CONSOLE Console, RECT *Block, UINT CursorStartX, UINT CursorStartY,
+  VOID (STDCALL *WriteStream)(PCSRSS_CONSOLE Console, RECT *Block, LONG CursorStartX, LONG CursorStartY,
                               UINT ScrolledLines, CHAR *Buffer, UINT Length);
   VOID (STDCALL *DrawRegion)(PCSRSS_CONSOLE Console, RECT *Region);
   BOOL (STDCALL *SetCursorInfo)(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER ScreenBuffer);

Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/init.c
--- branches/cache_manager_rewrite/reactos/subsys/csrss/init.c	2005-08-14 17:10:07 UTC (rev 17386)
+++ branches/cache_manager_rewrite/reactos/subsys/csrss/init.c	2005-08-14 17:12:10 UTC (rev 17387)
@@ -284,8 +284,8 @@
                                NULL,
                                FALSE,
                                0,
-                               NULL,
-                               NULL,
+                               0,
+                               0,
                                (PTHREAD_START_ROUTINE) ListenThread,
                                Port,
                                NULL,
@@ -476,7 +476,7 @@
 	UNICODE_STRING                ImagePath;
 	UNICODE_STRING                CommandLine;
 	PRTL_USER_PROCESS_PARAMETERS  ProcessParameters = NULL;
-	RTL_PROCESS_INFO              ProcessInfo;
+	RTL_USER_PROCESS_INFORMATION  ProcessInfo;
 
 
 	DPRINT("CSR: %s called\n", __FUNCTION__);
@@ -554,7 +554,7 @@
 	PWSTR *ArgumentArray
 	)
 {
-	INT       i = 0;
+	UINT       i = 0;
 	NTSTATUS  Status = STATUS_SUCCESS;
 
 	DPRINT("CSR: %s called\n", __FUNCTION__);
Property changes on: branches/cache_manager_rewrite/reactos/subsys/csrss/win32csr
___________________________________________________________________
Name: svn:ignore
   - win32csr.coff
win32csr.dll
win32csr.nostrip.dll
*.d
*.o
*.a
*.sym
*.map
makefile
   + win32csr.coff
win32csr.dll
win32csr.nostrip.dll
*.d
*.o
*.a
*.sym
*.map
*.gch
makefile

Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/win32csr/conio.c
--- branches/cache_manager_rewrite/reactos/subsys/csrss/win32csr/conio.c	2005-08-14 17:10:07 UTC (rev 17386)
+++ branches/cache_manager_rewrite/reactos/subsys/csrss/win32csr/conio.c	2005-08-14 17:12:10 UTC (rev 17387)
@@ -323,7 +323,7 @@
 ConioNextLine(PCSRSS_SCREEN_BUFFER Buff, RECT *UpdateRect, UINT *ScrolledLines)
 {
   /* slide the viewable screen */
-  if (((Buff->CurrentY - Buff->ShowY + Buff->MaxY) % Buff->MaxY) == Buff->MaxY - 1)
+  if (((Buff->CurrentY - Buff->ShowY + Buff->MaxY) % Buff->MaxY) == (ULONG)Buff->MaxY - 1)
     {
       if (++Buff->ShowY == Buff->MaxY)
         {
@@ -338,7 +338,7 @@
   ClearLineBuffer(Buff);
   UpdateRect->left = 0;
   UpdateRect->right = Buff->MaxX - 1;
-  if (UpdateRect->top == Buff->CurrentY)
+  if (UpdateRect->top == (LONG)Buff->CurrentY)
     {
       if (++UpdateRect->top == Buff->MaxY)
         {
@@ -352,7 +352,7 @@
 ConioWriteConsole(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER Buff,
                   CHAR *Buffer, DWORD Length, BOOL Attrib)
 {
-  int i;
+  UINT i;
   DWORD Offset;
   RECT UpdateRect;
   LONG CursorStartX, CursorStartY;
@@ -394,8 +394,8 @@
                         {
                           Buff->CurrentY--;
                         }
-                      if ((0 == UpdateRect.top && UpdateRect.bottom < Buff->CurrentY)
-                          || (0 != UpdateRect.top && Buff->CurrentY < UpdateRect.top))
+                      if ((0 == UpdateRect.top && UpdateRect.bottom < (LONG)Buff->CurrentY)
+                          || (0 != UpdateRect.top && (LONG)Buff->CurrentY < UpdateRect.top))
                         {
                           UpdateRect.top = Buff->CurrentY;
                         }
@@ -406,7 +406,7 @@
                     }
                   Offset = 2 * ((Buff->CurrentY * Buff->MaxX) + Buff->CurrentX);
                   SET_CELL_BUFFER(Buff, Offset, ' ', Buff->DefaultAttrib);
-                  UpdateRect.left = min(UpdateRect.left, Buff->CurrentX);
+                  UpdateRect.left = min(UpdateRect.left, (LONG) Buff->CurrentX);
                   UpdateRect.right = max(UpdateRect.right, (LONG) Buff->CurrentX);
                 }
                 continue;
@@ -415,7 +415,7 @@
           else if (Buffer[i] == '\r')
             {
               Buff->CurrentX = 0;
-              UpdateRect.left = min(UpdateRect.left, Buff->CurrentX);
+              UpdateRect.left = min(UpdateRect.left, (LONG) Buff->CurrentX);
               UpdateRect.right = max(UpdateRect.right, (LONG) Buff->CurrentX);
               continue;
             }
@@ -424,7 +424,7 @@
             {
               UINT EndX;
 
-              UpdateRect.left = min(UpdateRect.left, Buff->CurrentX);
+              UpdateRect.left = min(UpdateRect.left, (LONG)Buff->CurrentX);
               EndX = (Buff->CurrentX + 8) & ~7;
               if (EndX > Buff->MaxX)
                 {
@@ -453,7 +453,7 @@
               continue;
             }
         }
-      UpdateRect.left = min(UpdateRect.left, Buff->CurrentX);
+      UpdateRect.left = min(UpdateRect.left, (LONG)Buff->CurrentX);
       UpdateRect.right = max(UpdateRect.right, (LONG) Buff->CurrentX);
       Offset = 2 * (((Buff->CurrentY * Buff->MaxX)) + Buff->CurrentX);
       Buff->Buffer[Offset++] = Buffer[i];
@@ -495,7 +495,7 @@
   ConsoleInput *Input;
   PUCHAR Buffer;
   PWCHAR UnicodeBuffer;
-  int i;
+  ULONG i;
   ULONG nNumberOfCharsToRead, CharSize;
   PCSRSS_CONSOLE Console;
   NTSTATUS Status;
@@ -762,7 +762,7 @@
   DWORD SrcOffset;
   DWORD DstOffset;
   DWORD BytesPerLine;
-  ULONG i;
+  LONG i;
 
   DstY = DstRegion->top;
   BytesPerLine = ConioRectWidth(DstRegion) * 2;
@@ -811,7 +811,7 @@
   SHORT X, Y;
   DWORD Offset;
   DWORD Delta;
-  ULONG i;
+  LONG i;
   CHAR Char;
 
   if(bUnicode)
@@ -2273,8 +2273,8 @@
   BufferCoord = Request->Data.WriteConsoleOutputRequest.BufferCoord;
   CharInfo = Request->Data.WriteConsoleOutputRequest.CharInfo;
   if (((PVOID)CharInfo < ProcessData->CsrSectionViewBase) ||
-      (((PVOID)CharInfo + PSize) >
-       (ProcessData->CsrSectionViewBase + ProcessData->CsrSectionViewSize)))
+      (((ULONG_PTR)CharInfo + PSize) >
+       ((ULONG_PTR)ProcessData->CsrSectionViewBase + ProcessData->CsrSectionViewSize)))
     {
       ConioUnlockScreenBuffer(Buff);
       ConioUnlockConsole(Console);
@@ -2690,7 +2690,7 @@
   Size = Length * sizeof(INPUT_RECORD);
 
   if (((PVOID)InputRecord < ProcessData->CsrSectionViewBase)
-      || (((PVOID)InputRecord + Size) > (ProcessData->CsrSectionViewBase + ProcessData->CsrSectionViewSize)))
+      || (((ULONG_PTR)InputRecord + Size) > ((ULONG_PTR)ProcessData->CsrSectionViewBase + ProcessData->CsrSectionViewSize)))
     {
       ConioUnlockConsole(Console);
       Request->Status = STATUS_ACCESS_VIOLATION;
@@ -2748,7 +2748,8 @@
   COORD BufferCoord;
   RECT ReadRegion;
   RECT ScreenRect;
-  DWORD i, Y, X, Offset;
+  DWORD i, Offset;
+  LONG X, Y;
   UINT CodePage;
 
   DPRINT("CsrReadConsoleOutput\n");
@@ -2776,7 +2777,7 @@
   CodePage = ProcessData->Console->OutputCodePage;
 
   if (((PVOID)CharInfo < ProcessData->CsrSectionViewBase)
-      || (((PVOID)CharInfo + Size) > (ProcessData->CsrSectionViewBase + ProcessData->CsrSectionViewSize)))
+      || (((ULONG_PTR)CharInfo + Size) > ((ULONG_PTR)ProcessData->CsrSectionViewBase + ProcessData->CsrSectionViewSize)))
     {
       ConioUnlockScreenBuffer(Buff);
       Request->Status = STATUS_ACCESS_VIOLATION;
@@ -2856,7 +2857,7 @@
   Size = Length * sizeof(INPUT_RECORD);
 
   if (((PVOID)InputRecord < ProcessData->CsrSectionViewBase)
-      || (((PVOID)InputRecord + Size) > (ProcessData->CsrSectionViewBase + ProcessData->CsrSectionViewSize)))
+      || (((ULONG_PTR)InputRecord + Size) > ((ULONG_PTR)ProcessData->CsrSectionViewBase + ProcessData->CsrSectionViewSize)))
     {
       ConioUnlockConsole(Console);
       Request->Status = STATUS_ACCESS_VIOLATION;

Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/win32csr/guiconsole.c
--- branches/cache_manager_rewrite/reactos/subsys/csrss/win32csr/guiconsole.c	2005-08-14 17:10:07 UTC (rev 17386)
+++ branches/cache_manager_rewrite/reactos/subsys/csrss/win32csr/guiconsole.c	2005-08-14 17:12:10 UTC (rev 17387)
@@ -457,7 +457,7 @@
 }
 
 static VOID STDCALL
-GuiWriteStream(PCSRSS_CONSOLE Console, RECT *Region, UINT CursorStartX, UINT CursorStartY,
+GuiWriteStream(PCSRSS_CONSOLE Console, RECT *Region, LONG CursorStartX, LONG CursorStartY,
                UINT ScrolledLines, CHAR *Buffer, UINT Length)
 {
   PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA) Console->PrivateData;

Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/win32csr/tuiconsole.c
--- branches/cache_manager_rewrite/reactos/subsys/csrss/win32csr/tuiconsole.c	2005-08-14 17:10:07 UTC (rev 17386)
+++ branches/cache_manager_rewrite/reactos/subsys/csrss/win32csr/tuiconsole.c	2005-08-14 17:12:10 UTC (rev 17387)
@@ -54,7 +54,8 @@
 static void FASTCALL
 TuiCopyRect(char *Dest, PCSRSS_SCREEN_BUFFER Buff, RECT *Region)
 {
-  UINT SrcDelta, DestDelta, i;
+  UINT SrcDelta, DestDelta;
+  LONG i;
   PBYTE Src, SrcEnd;
 
   Src = Buff->Buffer + (((Region->top + Buff->ShowY) % Buff->MaxY) * Buff->MaxX
@@ -118,7 +119,7 @@
 }
 
 static VOID STDCALL
-TuiWriteStream(PCSRSS_CONSOLE Console, RECT *Region, UINT CursorStartX, UINT CursorStartY,
+TuiWriteStream(PCSRSS_CONSOLE Console, RECT *Region, LONG CursorStartX, LONG CursorStartY,
                UINT ScrolledLines, CHAR *Buffer, UINT Length)
 {
   DWORD BytesWritten;
@@ -293,7 +294,7 @@
                                0,
                                sizeof(COORD) + Title.MaximumLength);
       pos = (COORD *)Buffer;
-      Title.Buffer = Buffer + sizeof( COORD );
+      Title.Buffer = (PVOID)((ULONG_PTR)Buffer + sizeof( COORD ));
 
       RtlUnicodeStringToAnsiString(&Title, &SwapConsole->Title, FALSE);
       pos->Y = PhysicalConsoleSize.Y / 2;
Property changes on: branches/cache_manager_rewrite/reactos/subsys/smss
___________________________________________________________________
Name: svn:ignore
   - *.coff
*.exe
*.d
*.o
*.a
*.sym
*.map
makefile
   + *.coff
*.exe
*.d
*.o
*.a
*.sym
*.map
*.gch
makefile

Modified: branches/cache_manager_rewrite/reactos/subsys/smss/client.c
--- branches/cache_manager_rewrite/reactos/subsys/smss/client.c	2005-08-14 17:10:07 UTC (rev 17386)
+++ branches/cache_manager_rewrite/reactos/subsys/smss/client.c	2005-08-14 17:12:10 UTC (rev 17387)
@@ -283,7 +283,7 @@
  * 	NTSTATUS:
  */
 NTSTATUS STDCALL
-SmCreateClient (PRTL_PROCESS_INFO ProcessInfo, PWSTR ProgramName)
+SmCreateClient (PRTL_USER_PROCESS_INFORMATION ProcessInfo, PWSTR ProgramName)
 {
 	NTSTATUS Status = STATUS_SUCCESS;
 

Modified: branches/cache_manager_rewrite/reactos/subsys/smss/debug.c
--- branches/cache_manager_rewrite/reactos/subsys/smss/debug.c	2005-08-14 17:10:07 UTC (rev 17386)
+++ branches/cache_manager_rewrite/reactos/subsys/smss/debug.c	2005-08-14 17:12:10 UTC (rev 17387)
@@ -109,8 +109,8 @@
 			    NULL,
       			    FALSE,
       			    0,
-      			    NULL,
-      			    NULL,
+      			    0,
+      			    0,
       			    (PTHREAD_START_ROUTINE) procServingThread,
       			    hPort,
       			    & Thread,

Modified: branches/cache_manager_rewrite/reactos/subsys/smss/init.c
--- branches/cache_manager_rewrite/reactos/subsys/smss/init.c	2005-08-14 17:10:07 UTC (rev 17386)
+++ branches/cache_manager_rewrite/reactos/subsys/smss/init.c	2005-08-14 17:12:10 UTC (rev 17387)
@@ -95,7 +95,7 @@
 NTSTATUS
 InitSessionManager(VOID)
 {
-  INT i = 0;
+  UINT i = 0;
   NTSTATUS Status = STATUS_SUCCESS;
 
   for (i=0; i < (sizeof InitRoutine / sizeof InitRoutine[0]); i++)

Modified: branches/cache_manager_rewrite/reactos/subsys/smss/initss.c
--- branches/cache_manager_rewrite/reactos/subsys/smss/initss.c	2005-08-14 17:10:07 UTC (rev 17386)
+++ branches/cache_manager_rewrite/reactos/subsys/smss/initss.c	2005-08-14 17:12:10 UTC (rev 17387)
@@ -51,7 +51,7 @@
 SmpRegisterSmss(VOID)
 {
 	NTSTATUS Status = STATUS_SUCCESS;
-	RTL_PROCESS_INFO ProcessInfo;
+	RTL_USER_PROCESS_INFORMATION ProcessInfo;
 
 	
 	DPRINT("SM: %s called\n",__FUNCTION__);

Modified: branches/cache_manager_rewrite/reactos/subsys/smss/smapi.c
--- branches/cache_manager_rewrite/reactos/subsys/smss/smapi.c	2005-08-14 17:10:07 UTC (rev 17386)
+++ branches/cache_manager_rewrite/reactos/subsys/smss/smapi.c	2005-08-14 17:12:10 UTC (rev 17387)
@@ -282,8 +282,8 @@
 					     NULL,
 					     FALSE,
 					     0,
-					     NULL,
-					     NULL,
+					     0,
+					     0,
 					     (PTHREAD_START_ROUTINE) SmpApiConnectedThread,
 					     ClientDataApiPort,
 					     ClientDataApiPortThread,
@@ -383,8 +383,8 @@
 		      NULL,
 		      FALSE,
 		      0,
-		      NULL,
-		      NULL,
+		      0,
+		      0,
 		      (PTHREAD_START_ROUTINE)SmpApiThread,
 		      (PVOID)SmApiPort,
 		      NULL,

Modified: branches/cache_manager_rewrite/reactos/subsys/smss/smapiexec.c
--- branches/cache_manager_rewrite/reactos/subsys/smss/smapiexec.c	2005-08-14 17:10:07 UTC (rev 17386)
+++ branches/cache_manager_rewrite/reactos/subsys/smss/smapiexec.c	2005-08-14 17:12:10 UTC (rev 17387)
@@ -51,13 +51,13 @@
 		     LPWSTR CommandLine,
 		     BOOLEAN WaitForIt,
 		     PLARGE_INTEGER Timeout OPTIONAL,
-		     PRTL_PROCESS_INFO UserProcessInfo OPTIONAL)
+		     PRTL_USER_PROCESS_INFORMATION UserProcessInfo OPTIONAL)
 {
 	UNICODE_STRING			ImagePathString = {0};
 	UNICODE_STRING			CommandLineString = {0};
 	PRTL_USER_PROCESS_PARAMETERS	ProcessParameters = NULL;
-	RTL_PROCESS_INFO		ProcessInfo = {0};
-	PRTL_PROCESS_INFO		pProcessInfo = & ProcessInfo;
+	RTL_USER_PROCESS_INFORMATION		ProcessInfo = {0};
+	PRTL_USER_PROCESS_INFORMATION		pProcessInfo = & ProcessInfo;
 	NTSTATUS			Status = STATUS_SUCCESS;
 
 	DPRINT("SM: %s called\n", __FUNCTION__);
@@ -184,7 +184,7 @@
 			{
 				WCHAR ImagePath [MAX_PATH + 1] = {0};
 				PWCHAR CommandLine = ImagePath;
-				RTL_PROCESS_INFO ProcessInfo = {0};
+				RTL_USER_PROCESS_INFORMATION ProcessInfo = {0};
 
 				wcscpy (ImagePath, L"\\??\\");
 				wcscat (ImagePath, Data);

Modified: branches/cache_manager_rewrite/reactos/subsys/smss/smss.h
--- branches/cache_manager_rewrite/reactos/subsys/smss/smss.h	2005-08-14 17:10:07 UTC (rev 17386)
+++ branches/cache_manager_rewrite/reactos/subsys/smss/smss.h	2005-08-14 17:12:10 UTC (rev 17387)
@@ -62,7 +62,7 @@
 				     LPWSTR CommandLine,
 				     BOOLEAN WaitForIt,
 				     PLARGE_INTEGER Timeout OPTIONAL,
-				     PRTL_PROCESS_INFO UserProcessInfo OPTIONAL);
+				     PRTL_USER_PROCESS_INFORMATION UserProcessInfo OPTIONAL);
 NTSTATUS FASTCALL SmExecPgm(PSM_PORT_MESSAGE);
 
 /* smapicomp.c */
@@ -92,7 +92,7 @@
 
 } SM_CLIENT_DATA, *PSM_CLIENT_DATA;
 NTSTATUS SmInitializeClientManagement (VOID);
-NTSTATUS STDCALL SmCreateClient (PRTL_PROCESS_INFO,PWSTR);
+NTSTATUS STDCALL SmCreateClient (PRTL_USER_PROCESS_INFORMATION,PWSTR);
 NTSTATUS STDCALL SmDestroyClient (ULONG);
 NTSTATUS STDCALL SmBeginClientInitialization (PSM_PORT_MESSAGE,PSM_CLIENT_DATA*);
 NTSTATUS STDCALL SmCompleteClientInitialization (ULONG);