-/* $Id: ntvdm.c,v 1.3 2003/08/07 04:03:24 royce Exp $
- *
+/* $Id$
+ *
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: subsys/ntvdm/ntvdm->c
/* INCLUDES *****************************************************************/
-#include <ntos.h>
#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>
BOOL result = TRUE;
DWORD dwError;
HANDLE hFile;
-
+
hFile = CreateFileW(L"\\system32\\config.nt",
GENERIC_READ,
FILE_SHARE_READ,
LoadConfigDriversForVDM(PVDM_CONFIG vdmConfig)
{
BOOL result = TRUE;
-
+
return result;
}
SetConfigOptionsForVDM(PVDM_AUTOEXEC vdmAutoexec)
{
BOOL result = TRUE;
-
+
return result;
}
// BOOL result = TRUE;
SYSTEM_INFO inf;
MEMORYSTATUS stat;
- PVOID lpMem = NULL;
+
GlobalMemoryStatus(&stat);
if (stat.dwLength != sizeof(MEMORYSTATUS)) {
//SetLastError();
return FALSE;
}
+
}
-
+
GetSystemInfo(&inf);
vdm->hHeap = HeapCreate(0, inf.dwAllocationGranularity, 0);
if (vdm->hHeap == NULL) {
{
VDM_CONTROL_BLOCK VdmCB;
DWORD Result;
- BOOL Success;
ULONG i;
- NTSTATUS Status;
BOOL vdmStarted = FALSE;
- WCHAR WelcomeMsg[] = L"ReactOS Virtual DOS Machine support.\n";
- WCHAR PromptMsg[] = L"Type r<cr> to run, s<cr> to shutdown or q<cr> to quit now.";
+ WCHAR WelcomeMsg[RC_STRING_MAX_SIZE];
+ WCHAR PromptMsg[RC_STRING_MAX_SIZE];
CHAR InputBuffer[255];
-
+
+ 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");
//SetLastError();
return 2;
}
-
+
ReadConfigForVDM(&VdmCB);
if (!LoadConfigDriversForVDM(&(VdmCB.vdmConfig))) {