Reloaded-Project / Reloaded.Injector

C# DLL Injection Library capable of injecting x86 DLLs to x86 process from x64 processes.
GNU Lesser General Public License v3.0
160 stars 32 forks source link

Allow to set bigger size for circular buffer #11

Open TechInterMezzo opened 2 years ago

TechInterMezzo commented 2 years ago

At the moment the circular buffer size is hardcoded to 4096: https://github.com/Reloaded-Project/Reloaded.Injector/blob/master/Source/Reloaded.Injector/Injector.cs#L40

Would it be possible to make that an optional parameter for the Injector constructor? I want to use a struct as a remote call argument that is too big for the current circular buffer.

EDIT: And maybe it would be good to check parameterPtr after this line: https://github.com/Reloaded-Project/Reloaded.Injector/blob/master/Source/Reloaded.Injector/Injector.cs#L115 If it is zero then the parameter struct couldn't be fit into the circular buffer and an exception should be thrown.

Sewer56 commented 2 years ago

I don't mind adding an API for that as it's a simple change.

Just please note that I don't maintain this specific library (only this library) anymore (also am on vacation).