C# Class Hackery.MemoryManagement.VirtualProtectHandle

A handle to safely temporarily change memory protection.

The protection is reset when the handle is disposed.

Inheritance: IDisposable
显示文件 Open project: cartman300/Hackery

Public Methods

Method Description
Dispose ( ) : void

Resets the memory protection to its previous value.

VirtualProtectHandle ( IntPtr address, int size, MemProtection oldProtection ) : System

Creates a new VirtualProtectHandle instance with the given parameters.

Method Details

Dispose() public method

Resets the memory protection to its previous value.
public Dispose ( ) : void
return void

VirtualProtectHandle() public method

Creates a new VirtualProtectHandle instance with the given parameters.
public VirtualProtectHandle ( IntPtr address, int size, MemProtection oldProtection ) : System
address System.IntPtr The address of the first byte that had its protection changed.
size int The size of the memory range with changed protection.
oldProtection MemProtection The previous protection setting.
return System