internal bool EjectDll() { var extensionMethod = new EjectDll(); // Eject the dll return(extensionMethod.Eject(_process, _dllPath)); }
internal bool EjectDll() { using (var extensionMethod = new EjectDll(_process, _dllPath)) { // Eject the dll return(extensionMethod.Eject()); } }
internal InjectionManager(string processName, string dllPath, InjectionMethod injectionMethod, InjectionFlags injectionFlags) { _injectionWrapper = new InjectionWrapper(GetProcess(processName), dllPath, injectionMethod, injectionFlags); ValidationHandler.ValidateDllArchitecture(_injectionWrapper); _ejectDll = new EjectDll(_injectionWrapper); _hideDllFromPeb = new HideDllFromPeb(_injectionWrapper); _injectionMethod = InitialiseInjectionMethod(injectionMethod); }
internal InjectionManager(int processId, byte[] dllBytes, InjectionMethod injectionMethod, InjectionFlags injectionFlags) { _injectionWrapper = new InjectionWrapper(GetProcess(processId), dllBytes, injectionMethod, injectionFlags); ValidationHandler.ValidateDllArchitecture(_injectionWrapper); _ejectDll = new EjectDll(_injectionWrapper); _hideDllFromPeb = new HideDllFromPeb(_injectionWrapper); _injectionMethod = InitialiseInjectionMethod(injectionMethod); }