Index: trunk/src/kernel32/KERNEL32.DEF
===================================================================
--- trunk/src/kernel32/KERNEL32.DEF	(revision 686)
+++ trunk/src/kernel32/KERNEL32.DEF	(revision 687)
@@ -1,3 +1,3 @@
-; $Id: KERNEL32.DEF,v 1.28 1999-08-23 13:54:43 sandervl Exp $
+; $Id: KERNEL32.DEF,v 1.29 1999-08-25 12:30:47 sandervl Exp $
 
 ;Created by BLAST for IBM's compiler
@@ -1004,4 +1004,4 @@
     HEAP_strdupW               = _HEAP_strdupW@12                 @1248
 
-    VIRTUAL_MapFileA           = _VIRTUAL_MapFileA@4              @1249
-    VIRTUAL_MapFileW           = _VIRTUAL_MapFileW@4              @1250
+    VIRTUAL_MapFileA           = _VIRTUAL_MapFileA@8              @1249
+    VIRTUAL_MapFileW           = _VIRTUAL_MapFileW@8              @1250
Index: trunk/src/kernel32/kernel32exp.def
===================================================================
--- trunk/src/kernel32/kernel32exp.def	(revision 686)
+++ trunk/src/kernel32/kernel32exp.def	(revision 687)
@@ -1,3 +1,3 @@
-; $Id: kernel32exp.def,v 1.14 1999-08-22 22:11:22 sandervl Exp $
+; $Id: kernel32exp.def,v 1.15 1999-08-25 12:30:47 sandervl Exp $
 
 ;Created by BLAST for IBM's compiler
@@ -849,6 +849,6 @@
    _CreateWin32Exe@4                       @1236
 
-_VIRTUAL_MapFileA@4              @1249
-_VIRTUAL_MapFileW@4              @1250
+_VIRTUAL_MapFileA@8              @1249
+_VIRTUAL_MapFileW@8              @1250
 
 ; HEAP Management (heap.cpp, heapstring.cpp)
Index: trunk/src/kernel32/makefile
===================================================================
--- trunk/src/kernel32/makefile	(revision 686)
+++ trunk/src/kernel32/makefile	(revision 687)
@@ -1,3 +1,3 @@
-# $Id: makefile,v 1.31 1999-08-25 11:40:18 sandervl Exp $
+# $Id: makefile,v 1.32 1999-08-25 12:30:48 sandervl Exp $
 
 #
@@ -309,5 +309,5 @@
 
 pefile.OBJ:    pefile.cpp $(PDWIN32_INCLUDE)\pefile.h
-winimage.OBJ:  winimage.cpp $(PDWIN32_INCLUDE)\winimage.h $(PDWIN32_INCLUDE)\windll.h $(PDWIN32_INCLUDE)\pefile.h $(PDWIN32_INCLUDE)\winres.h initterm.h
+winimage.OBJ:  winimage.cpp $(PDWIN32_INCLUDE)\winimage.h $(PDWIN32_INCLUDE)\windll.h $(PDWIN32_INCLUDE)\pefile.h $(PDWIN32_INCLUDE)\winres.h initterm.h $(PDWIN32_INCLUDE)\win\virtual.h
 winimgres.OBJ: winimgres.cpp $(PDWIN32_INCLUDE)\winimage.h $(PDWIN32_INCLUDE)\windll.h $(PDWIN32_INCLUDE)\pefile.h $(PDWIN32_INCLUDE)\winexe.h $(PDWIN32_INCLUDE)\winres.h
 windll.OBJ:    windll.cpp $(PDWIN32_INCLUDE)\winimage.h $(PDWIN32_INCLUDE)\windll.h
Index: trunk/src/kernel32/virtual.cpp
===================================================================
--- trunk/src/kernel32/virtual.cpp	(revision 686)
+++ trunk/src/kernel32/virtual.cpp	(revision 687)
@@ -1,3 +1,3 @@
-/* $Id: virtual.cpp,v 1.5 1999-08-25 11:40:18 sandervl Exp $ */
+/* $Id: virtual.cpp,v 1.6 1999-08-25 12:30:48 sandervl Exp $ */
 
 /*
@@ -197,8 +197,7 @@
  *  [RETURN] ptr		-	pointer to mapped file
  */
-LPVOID WINAPI VIRTUAL_MapFileW( LPCWSTR name )
-{
-    HANDLE hFile, hMapping;
-    LPVOID ptr = NULL;
+HANDLE WINAPI VIRTUAL_MapFileW( LPCWSTR name , LPVOID *lpMapping)
+{
+    HANDLE hFile, hMapping = 0;
 
     hFile = CreateFileW( name, GENERIC_READ, FILE_SHARE_READ, NULL, 
@@ -210,9 +209,8 @@
         if (hMapping)
         {
-            ptr = MapViewOfFile( hMapping, FILE_MAP_READ, 0, 0, 0 );
-            CloseHandle( hMapping );
+            *lpMapping = MapViewOfFile( hMapping, FILE_MAP_READ, 0, 0, 0 );
         }
     }
-    return ptr;
+    return hMapping;
 }
 
@@ -224,8 +222,7 @@
  *  [RETURN] ptr		-	pointer to mapped file
  */
-LPVOID WINAPI VIRTUAL_MapFileA( LPCSTR name )
-{
-    HANDLE hFile, hMapping;
-    LPVOID ptr = NULL;
+HANDLE WINAPI VIRTUAL_MapFileA( LPCSTR name , LPVOID *lpMapping)
+{
+    HANDLE hFile, hMapping = 0;
 
     hFile = CreateFileA(name, GENERIC_READ, FILE_SHARE_READ, NULL, 
@@ -237,8 +234,7 @@
         if (hMapping)
         {
-            ptr = MapViewOfFile( hMapping, FILE_MAP_READ, 0, 0, 0 );
-            CloseHandle( hMapping );
+            *lpMapping = MapViewOfFile( hMapping, FILE_MAP_READ, 0, 0, 0 );
         }
     }
-    return ptr;
-}
+    return hMapping;
+}
