internal InjectionManager(InjectionMethod injectionMethod, string processName, string dllPath) { _injectionContext = new InjectionContext(); _injectionWrapper = new InjectionWrapper(injectionMethod, processName, dllPath); _injectionExtensionCache = new Dictionary <string, IInjectionExtension> { { "EjectDll", new EjectDll(_injectionWrapper) }, { "HideDllFromPeb", new HideDllFromPeb(_injectionWrapper) }, { "RandomiseDllHeaders", new RandomiseDllHeaders(_injectionWrapper) } }; var injectionMethodType = Type.GetType(string.Concat("Bleak.Injection.Methods.", injectionMethod.ToString())); _injectionMethod = (IInjectionMethod)Activator.CreateInstance(injectionMethodType, _injectionWrapper); // Ensure the architecture of the DLL is valid ValidationHandler.ValidateDllArchitecture(_injectionWrapper); }