C# Class Binarysharp.MemoryManagement.Memory.MemoryProtection

Class providing tools for manipulating memory protection.
Inheritance: IDisposable
Show file Open project: ZenLulz/MemorySharp

Public Methods

Method Description
Dispose ( ) : void

Restores the initial protection of the memory.

MemoryProtection ( MemorySharp memorySharp, IntPtr baseAddress, int size, MemoryProtectionFlags protection = MemoryProtectionFlags.ExecuteReadWrite, bool mustBeDisposed = true ) : System

Initializes a new instance of the MemoryProtection class.

ToString ( ) : string

Returns a string that represents the current object.

Method Details

Dispose() public method

Restores the initial protection of the memory.
public Dispose ( ) : void
return void

MemoryProtection() public method

Initializes a new instance of the MemoryProtection class.
public MemoryProtection ( MemorySharp memorySharp, IntPtr baseAddress, int size, MemoryProtectionFlags protection = MemoryProtectionFlags.ExecuteReadWrite, bool mustBeDisposed = true ) : System
memorySharp MemorySharp The reference of the object.
baseAddress System.IntPtr The base address of the memory to change the protection.
size int The size of the memory to change.
protection MemoryProtectionFlags The new protection to apply.
mustBeDisposed bool The resource will be automatically disposed when the finalizer collects the object.
return System

ToString() public method

Returns a string that represents the current object.
public ToString ( ) : string
return string