Changeset 29473 in vbox
- Timestamp:
- May 14, 2010 2:20:01 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp
r29472 r29473 59 59 /** 60 60 * Registers a new module with the VMM 61 * @param dwProcessId Process id62 */ 63 void VBoxServicePageSharingRegisterModule( HANDLE hProcess,PKNOWN_MODULE pModule)61 * @param pModule Module ptr 62 */ 63 void VBoxServicePageSharingRegisterModule(PKNOWN_MODULE pModule) 64 64 { 65 65 VMMDEVSHAREDREGIONDESC aRegions[VMMDEVSHAREDREGIONDESC_MAX]; … … 131 131 MEMORY_BASIC_INFORMATION MemInfo; 132 132 133 SIZE_T ret = VirtualQuery Ex(hProcess,pBaseAddress, &MemInfo, sizeof(MemInfo));133 SIZE_T ret = VirtualQuery(pBaseAddress, &MemInfo, sizeof(MemInfo)); 134 134 Assert(ret); 135 135 if (!ret) … … 147 147 case PAGE_EXECUTE_READ: 148 148 case PAGE_READONLY: 149 { 150 char *pRegion = (char *)MemInfo.BaseAddress; 151 152 /* Touch all pages. */ 153 while (pRegion < (char *)MemInfo.BaseAddress + MemInfo.RegionSize) 154 { 155 char dummy; 156 157 memcpy(&dummy, pRegion, 1); 158 pRegion += PAGE_SIZE; 159 } 149 160 aRegions[idxRegion].GCRegionAddr = (RTGCPTR64)MemInfo.BaseAddress; 150 161 aRegions[idxRegion].cbRegion = MemInfo.RegionSize; 151 162 idxRegion++; 163 152 164 break; 165 } 153 166 154 167 default: … … 220 233 do 221 234 { 235 char *pszDot = strrchr(ModuleInfo.szModule, '.'); 236 if ( pszDot 237 && (pszDot[1] == 'e' || pszDot[1] == 'E')) 238 continue; /* ignore executables for now. */ 239 222 240 /* Found it before? */ 223 241 PAVLPVNODECORE pRec = RTAvlPVGet(ppNewTree, ModuleInfo.modBaseAddr); … … 237 255 pModule->hModule = LoadLibraryEx(ModuleInfo.szExePath, 0, DONT_RESOLVE_DLL_REFERENCES); 238 256 if (pModule->hModule) 239 VBoxServicePageSharingRegisterModule( hProcess,pModule);257 VBoxServicePageSharingRegisterModule(pModule); 240 258 241 259 pRec = &pModule->Core;
Note:
See TracChangeset
for help on using the changeset viewer.