Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
enkomio committed Dec 20, 2018
1 parent 56d0704 commit 3c4ac4f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,21 @@ This project implements a .NET Assembly injection library. The method used to in
- [Download binary][2]

## Usage
When you want to inject an assembly in a remote project you have to consider the following aspects:
When you want to inject an assembly in a remote process you have to consider the following aspects:

* The project currently supports only 32 bit process
* The ManagedInjector project currently supports only 32 bit process
* The remote process must be a windows application (it must process messages in a message loop)
* If the CLR version is different, you will not be able to use reflection to inspect the loaded assemblies

If the above pre-conditions are satisfiedm you can inject an assembly and invoke an activation method. There are three possibilities to invoke the activation method:
If the above pre-conditions are satisfied you can inject an assembly and invoke an activation method. There are three possibilities to invoke the activation method:

* You have to specify the full method name to invoke (eg. _this.is.my.namespace.class.method_)
* You can inject an executable that defines an _EntryPoint_ method to execute
* You must specify the full method name to invoke (eg. _this.is.my.namespace.class.method_)
* You can inject an executable that defines an _EntryPoint_ method to execute (like a _Console_ project)
* You can define a method with the following signatue: _<public|private> static void Inject()_

For practical examples see the <a href="https://github.com/enkomio/ManagedInjector/blob/master/Src/Examples/TestRunner/Program.cs">TestRunner project</a>.

### Adding dependencies
If the injected assembly has any dependencies on not standard .NET Assembly, you can add those dependencies with the ``AddDependency`` method.
If the injected assembly has any dependencies on not standard .NET assemblies, you can add those dependencies with the ``AddDependency`` method.

### Adding external files
If the injected assembly needs to load some external file in order to work correctly (like a configuration file) you can specify them with the ``AddFile`` method. This method will copy the specified file in the working directory of the injected process.
Expand Down

0 comments on commit 3c4ac4f

Please sign in to comment.