Returns a L{win32.MemoryBasicInformation} object using the data retrieved from the database. @type getMemoryDump: bool @param getMemoryDump: (Optional) If C{True} retrieve the memory dump. Defaults to C{False} since this may be a costly operation.
(self, getMemoryDump=False)
| 473 | return access |
| 474 | |
| 475 | def toMBI(self, getMemoryDump=False): |
| 476 | """ |
| 477 | Returns a L{win32.MemoryBasicInformation} object using the data |
| 478 | retrieved from the database. |
| 479 | |
| 480 | @type getMemoryDump: bool |
| 481 | @param getMemoryDump: (Optional) If C{True} retrieve the memory dump. |
| 482 | Defaults to C{False} since this may be a costly operation. |
| 483 | |
| 484 | @rtype: L{win32.MemoryBasicInformation} |
| 485 | @return: Memory block information. |
| 486 | """ |
| 487 | mbi = win32.MemoryBasicInformation() |
| 488 | mbi.BaseAddress = self.address |
| 489 | mbi.RegionSize = self.size |
| 490 | mbi.State = self._parse_state(self.state) |
| 491 | mbi.Protect = self._parse_access(self.access) |
| 492 | mbi.Type = self._parse_type(self.type) |
| 493 | if self.alloc_base is not None: |
| 494 | mbi.AllocationBase = self.alloc_base |
| 495 | else: |
| 496 | mbi.AllocationBase = mbi.BaseAddress |
| 497 | if self.alloc_access is not None: |
| 498 | mbi.AllocationProtect = self._parse_access(self.alloc_access) |
| 499 | else: |
| 500 | mbi.AllocationProtect = mbi.Protect |
| 501 | if self.filename is not None: |
| 502 | mbi.filename = self.filename |
| 503 | if getMemoryDump and self.content is not None: |
| 504 | mbi.content = self.content |
| 505 | return mbi |
| 506 | |
| 507 | @staticmethod |
| 508 | def _parse_state(state): |
no test coverage detected