[NTVDM]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 13 Mar 2015 23:26:33 +0000 (23:26 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Fri, 13 Mar 2015 23:26:33 +0000 (23:26 +0000)
- Export VDDInstallMemoryHook and VDDDeInstallMemoryHook.
- Stubplement and export VDDAllocMem, VDDFreeMem, VDDIncludeMem and VDDExcludeMem (undocumented).

svn path=/trunk/; revision=66670

reactos/include/ddk/nt_vdd.h
reactos/subsystems/mvdm/ntvdm/memory.c
reactos/subsystems/mvdm/ntvdm/ntvdm.h
reactos/subsystems/mvdm/ntvdm/ntvdm.spec

index b64c08b..1a9c1aa 100644 (file)
@@ -251,6 +251,42 @@ VDDDeInstallMemoryHook
     IN DWORD  dwCount
 );
 
+BOOL
+WINAPI
+VDDAllocMem
+(
+    IN HANDLE hVdd,
+    IN PVOID  Address,
+    IN ULONG  Size
+);
+
+BOOL
+WINAPI
+VDDFreeMem
+(
+    IN HANDLE hVdd,
+    IN PVOID  Address,
+    IN ULONG  Size
+);
+
+BOOL
+WINAPI
+VDDIncludeMem
+(
+    IN HANDLE hVdd,
+    IN PVOID  Address,
+    IN ULONG  Size
+);
+
+BOOL
+WINAPI
+VDDExcludeMem
+(
+    IN HANDLE hVdd,
+    IN PVOID  Address,
+    IN ULONG  Size
+);
+
 #ifdef __cplusplus
 }
 #endif
index 7b3074c..c838299 100644 (file)
@@ -425,6 +425,50 @@ VDDDeInstallMemoryHook(IN HANDLE hVdd,
     return TRUE;
 }
 
+BOOL
+WINAPI
+VDDAllocMem(IN HANDLE hVdd,
+            IN PVOID  Address,
+            IN ULONG  Size)
+{
+    // FIXME
+    UNIMPLEMENTED;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+VDDFreeMem(IN HANDLE hVdd,
+           IN PVOID  Address,
+           IN ULONG  Size)
+{
+    // FIXME
+    UNIMPLEMENTED;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+VDDIncludeMem(IN HANDLE hVdd,
+              IN PVOID  Address,
+              IN ULONG  Size)
+{
+    // FIXME
+    UNIMPLEMENTED;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+VDDExcludeMem(IN HANDLE hVdd,
+              IN PVOID  Address,
+              IN ULONG  Size)
+{
+    // FIXME
+    UNIMPLEMENTED;
+    return FALSE;
+}
+
 
 
 BOOLEAN
@@ -494,7 +538,8 @@ MemCleanup(VOID)
     SIZE_T MemorySize = MAX_ADDRESS;
     PLIST_ENTRY Pointer;
 
-    while (!IsListEmpty(&HookList))
+    // while (!IsListEmpty(&HookList))
+    while (HookList.Flink != &HookList)
     {
         Pointer = RemoveHeadList(&HookList);
         RtlFreeHeap(RtlGetProcessHeap(), 0, CONTAINING_RECORD(Pointer, MEM_HOOK, Entry));
index 1bfe64f..ffc7884 100644 (file)
@@ -38,6 +38,11 @@ DWORD WINAPI SetLastConsoleEventActive(VOID);
  */
 // #define STANDALONE
 
+/*
+ * Activate this line for Win2k compliancy
+ */
+// #define WIN2K_COMPLIANT
+
 /* FUNCTIONS ******************************************************************/
 
 #ifndef STANDALONE
index 4cd48a8..18adf3c 100644 (file)
 @ stdcall VdmMapFlat(long long long)
 ;@ stdcall VdmUnmapFlat(long long ptr long)  ; Not exported on x86
 
+@ stdcall VDDInstallMemoryHook(long ptr long ptr)
+@ stdcall VDDDeInstallMemoryHook(long ptr long)
+
+@ stdcall VDDAllocMem(long ptr long)
+@ stdcall VDDFreeMem(long ptr long)
+@ stdcall VDDIncludeMem(long ptr long)
+@ stdcall VDDExcludeMem(long ptr long)
+
 @ stdcall call_ica_hw_interrupt(long long long)
 @ stdcall VDDReserveIrqLine(long long)
 @ stdcall VDDReleaseIrqLine(long long)