/* $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>
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;
}
SYSTEM_INFO inf;
MEMORYSTATUS stat;
+
GlobalMemoryStatus(&stat);
if (stat.dwLength != sizeof(MEMORYSTATUS)) {
printf("WARNING: GlobalMemoryStatus() returned unknown structure version, size %ld, expected %d.\n", stat.dwLength, sizeof(stat));
//SetLastError();
return FALSE;
}
+
}
-
+
GetSystemInfo(&inf);
vdm->hHeap = HeapCreate(0, inf.dwAllocationGranularity, 0);
if (vdm->hHeap == NULL) {
ULONG i;
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))) {