Registry entries for shell folders
[reactos.git] / reactos / subsys / ntvdm / ntvdm.c
index 44f7a1a..97accab 100644 (file)
@@ -1,5 +1,5 @@
 /* $Id$
- * 
+ *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
  * FILE:            subsys/ntvdm/ntvdm->c
  */
 
 /* INCLUDES *****************************************************************/
-
-#include <ntos.h>
+#define WIN32_NO_STATUS
 #include <windows.h>
 #include <stdio.h>
 #include <wchar.h>
 #include "resource.h"
 
+#define NTOS_MODE_USER
+#include <ndk/ntndk.h>
+
 #define NDEBUG
 #include <debug.h>
 
@@ -139,7 +141,7 @@ BOOL ReadConfigForVDM(PVDM_CONTROL_BLOCK vdm)
     BOOL result = TRUE;
     DWORD dwError;
     HANDLE hFile;
-    
+
     hFile = CreateFileW(L"\\system32\\config.nt",
                         GENERIC_READ,
                         FILE_SHARE_READ,
@@ -187,7 +189,7 @@ BOOL
 LoadConfigDriversForVDM(PVDM_CONFIG vdmConfig)
 {
     BOOL result = TRUE;
-       
+
        return result;
 }
 
@@ -195,7 +197,7 @@ BOOL
 SetConfigOptionsForVDM(PVDM_AUTOEXEC vdmAutoexec)
 {
     BOOL result = TRUE;
-       
+
        return result;
 }
 
@@ -225,9 +227,9 @@ CreateVDM(PVDM_CONTROL_BLOCK vdm)
             //SetLastError();
             return FALSE;
         }
-        
+
     }
+
     GetSystemInfo(&inf);
     vdm->hHeap = HeapCreate(0, inf.dwAllocationGranularity, 0);
     if (vdm->hHeap == NULL) {
@@ -276,12 +278,12 @@ WinMain(HINSTANCE hInstance,  HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho
     ULONG i;
     BOOL vdmStarted = FALSE;
 
-    TCHAR WelcomeMsg[RC_STRING_MAX_SIZE];
-    TCHAR PromptMsg[RC_STRING_MAX_SIZE];
+    WCHAR WelcomeMsg[RC_STRING_MAX_SIZE];
+    WCHAR PromptMsg[RC_STRING_MAX_SIZE];
     CHAR InputBuffer[255];
 
-       LoadString( GetModuleHandle(NULL), STRING_WelcomeMsg, WelcomeMsg,sizeof(WelcomeMsg));
-    LoadString( GetModuleHandle(NULL), STRING_PromptMsg, PromptMsg ,sizeof(PromptMsg));
+    LoadString( GetModuleHandle(NULL), STRING_WelcomeMsg,  (LPTSTR) WelcomeMsg,sizeof(WelcomeMsg) / sizeof(WelcomeMsg[0]));
+    LoadString( GetModuleHandle(NULL), STRING_PromptMsg,  (LPTSTR) PromptMsg ,sizeof(PromptMsg) / sizeof(PromptMsg[0]));
 
     AllocConsole();
     SetConsoleTitleW(L"ntvdm");
@@ -295,7 +297,7 @@ WinMain(HINSTANCE hInstance,  HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho
         //SetLastError();
         return 2;
     }
-       
+
        ReadConfigForVDM(&VdmCB);
 
     if (!LoadConfigDriversForVDM(&(VdmCB.vdmConfig))) {