Set memory protection in the address space of the process. @see: U{http://msdn.microsoft.com/en-us/library/aa366899.aspx} @type lpAddress: int @param lpAddress: Address of memory to protect. @type dwSize: int @param dwSize: Number of bytes to pro
(self, lpAddress, dwSize, flNewProtect)
| 2443 | return win32.VirtualAllocEx(hProcess, lpAddress, dwSize) |
| 2444 | |
| 2445 | def mprotect(self, lpAddress, dwSize, flNewProtect): |
| 2446 | """ |
| 2447 | Set memory protection in the address space of the process. |
| 2448 | |
| 2449 | @see: U{http://msdn.microsoft.com/en-us/library/aa366899.aspx} |
| 2450 | |
| 2451 | @type lpAddress: int |
| 2452 | @param lpAddress: Address of memory to protect. |
| 2453 | |
| 2454 | @type dwSize: int |
| 2455 | @param dwSize: Number of bytes to protect. |
| 2456 | |
| 2457 | @type flNewProtect: int |
| 2458 | @param flNewProtect: New protect flags. |
| 2459 | |
| 2460 | @rtype: int |
| 2461 | @return: Old protect flags. |
| 2462 | |
| 2463 | @raise WindowsError: On error an exception is raised. |
| 2464 | """ |
| 2465 | hProcess = self.get_handle(win32.PROCESS_VM_OPERATION) |
| 2466 | return win32.VirtualProtectEx(hProcess, lpAddress, dwSize, flNewProtect) |
| 2467 | |
| 2468 | def mquery(self, lpAddress): |
| 2469 | """ |
no test coverage detected