C# Class Binarysharp.MemoryManagement.Modules.ModuleFactory

Class providing tools for manipulating modules and libraries.
Inheritance: IFactory
Show file Open project: ZenLulz/MemorySharp

Protected Properties

Property Type Description
InternalInjectedModules List
MemorySharp MemorySharp

Private Properties

Property Type Description
FetchModule RemoteModule
ModuleFactory System

Public Methods

Method Description
Dispose ( ) : void

Releases all resources used by the ModuleFactory object.

Eject ( RemoteModule module ) : void

Frees the loaded dynamic-link library (DLL) module and, if necessary, decrements its reference count.

Eject ( string moduleName ) : void

Frees the loaded dynamic-link library (DLL) module and, if necessary, decrements its reference count.

Inject ( string path, bool mustBeDisposed = true ) : InjectedModule

Injects the specified module into the address space of the remote process.

this ( string moduleName ) : RemoteModule

Gets the specified module in the remote process.

this ( IntPtr address ) : RemotePointer

Gets a pointer from the remote process.

Protected Methods

Method Description
FetchModule ( string moduleName ) : RemoteModule

Fetches a module from the remote process.

Private Methods

Method Description
FetchModule ( ProcessModule module ) : RemoteModule

Fetches a module from the remote process.

ModuleFactory ( MemorySharp memorySharp ) : System

Initializes a new instance of the ModuleFactory class.

Method Details

Dispose() public method

Releases all resources used by the ModuleFactory object.
public Dispose ( ) : void
return void

Eject() public method

Frees the loaded dynamic-link library (DLL) module and, if necessary, decrements its reference count.
public Eject ( RemoteModule module ) : void
module RemoteModule The module to eject.
return void

Eject() public method

Frees the loaded dynamic-link library (DLL) module and, if necessary, decrements its reference count.
public Eject ( string moduleName ) : void
moduleName string The name of module to eject.
return void

FetchModule() protected method

Fetches a module from the remote process.
protected FetchModule ( string moduleName ) : RemoteModule
moduleName string A module name (not case sensitive). If the file name extension is omitted, the default library extension .dll is appended.
return RemoteModule

Inject() public method

Injects the specified module into the address space of the remote process.
public Inject ( string path, bool mustBeDisposed = true ) : InjectedModule
path string The path of the module. This can be either a library module (a .dll file) or an executable module (an .exe file).
mustBeDisposed bool The module will be ejected when the finalizer collects the object.
return InjectedModule

this() public method

Gets the specified module in the remote process.
public this ( string moduleName ) : RemoteModule
moduleName string The name of module (not case sensitive).
return RemoteModule

this() public method

Gets a pointer from the remote process.
public this ( IntPtr address ) : RemotePointer
address System.IntPtr The address of the pointer.
return RemotePointer

Property Details

InternalInjectedModules protected property

The list containing all injected modules (writable).
protected List InternalInjectedModules
return List

MemorySharp protected property

The reference of the MemoryManagement.MemorySharp object.
protected MemorySharp MemorySharp
return MemorySharp