internal bool SetThreadContext() { var injectionMethod = new SetThreadContext(); // Inject the dll return(injectionMethod.Inject(_process, _dllPath)); }
internal bool SetThreadContext() { // Ensure the operating system supports SetThreadContext var osVersion = Environment.Version; if (osVersion.Major == 5) { throw new PlatformNotSupportedException("SetThreadContext is not supported on Windows XP"); } using (var injectionMethod = new SetThreadContext(_process, _dllPath)) { // Inject the dll return(injectionMethod.Inject()); } }