示例#1
0
        internal bool RtlCreateUserThread()
        {
            var injectionMethod = new RtlCreateUserThread();

            // Inject the dll

            return(injectionMethod.Inject(_process, _dllPath));
        }
示例#2
0
        internal bool RtlCreateUserThread()
        {
            // Ensure the operating system supports RtlCreateUserThread

            var osVersion = Environment.Version;

            switch (osVersion.Major)
            {
            case 5:
            {
                throw new PlatformNotSupportedException("RtlCreateUserThread is not supported on Windows XP");
            }

            case 6:
            {
                switch (osVersion.Minor)
                {
                case 0:
                {
                    throw new PlatformNotSupportedException("RtlCreateUserThread is not supported on Windows Vista");
                }

                case 1:
                {
                    throw new PlatformNotSupportedException("RtlCreateUserThread is not supported on Windows 7");
                }
                }

                break;
            }
            }

            using (var injectionMethod = new RtlCreateUserThread(_process, _dllPath))
            {
                // Inject the dll

                return(injectionMethod.Inject());
            }
        }