Index: /trunk/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp	(revision 29472)
+++ /trunk/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp	(revision 29473)
@@ -59,7 +59,7 @@
 /**
  * Registers a new module with the VMM
- * @param   dwProcessId     Process id
- */
-void VBoxServicePageSharingRegisterModule(HANDLE hProcess, PKNOWN_MODULE pModule)
+ * @param   pModule     Module ptr
+ */
+void VBoxServicePageSharingRegisterModule(PKNOWN_MODULE pModule)
 {
     VMMDEVSHAREDREGIONDESC   aRegions[VMMDEVSHAREDREGIONDESC_MAX];
@@ -131,5 +131,5 @@
         MEMORY_BASIC_INFORMATION MemInfo;
 
-        SIZE_T ret = VirtualQueryEx(hProcess, pBaseAddress, &MemInfo, sizeof(MemInfo));
+        SIZE_T ret = VirtualQuery(pBaseAddress, &MemInfo, sizeof(MemInfo));
         Assert(ret);
         if (!ret)
@@ -147,8 +147,21 @@
             case PAGE_EXECUTE_READ:
             case PAGE_READONLY:
+            {
+                char *pRegion = (char *)MemInfo.BaseAddress;
+
+                /* Touch all pages. */
+                while (pRegion < (char *)MemInfo.BaseAddress + MemInfo.RegionSize)
+                {
+                    char dummy;
+
+                    memcpy(&dummy, pRegion, 1);
+                    pRegion += PAGE_SIZE;
+                }
                 aRegions[idxRegion].GCRegionAddr = (RTGCPTR64)MemInfo.BaseAddress;
                 aRegions[idxRegion].cbRegion     = MemInfo.RegionSize;
                 idxRegion++;
+
                 break;
+            }
 
             default:
@@ -220,4 +233,9 @@
     do
     {
+        char *pszDot = strrchr(ModuleInfo.szModule, '.');
+        if (    pszDot 
+            &&  (pszDot[1] == 'e' || pszDot[1] == 'E'))
+            continue;   /* ignore executables for now. */
+
         /* Found it before? */
         PAVLPVNODECORE pRec = RTAvlPVGet(ppNewTree, ModuleInfo.modBaseAddr);
@@ -237,5 +255,5 @@
                 pModule->hModule  = LoadLibraryEx(ModuleInfo.szExePath, 0, DONT_RESOLVE_DLL_REFERENCES);
                 if (pModule->hModule)
-                    VBoxServicePageSharingRegisterModule(hProcess, pModule);
+                    VBoxServicePageSharingRegisterModule(pModule);
 
                 pRec = &pModule->Core;
