コード例 #1
0
ファイル: Injector.cs プロジェクト: RailsRoyale/Frame-Trapped
        /// <summary>
        /// Inject the "Injected" library into Street Fighter.
        /// </summary>
        public void Inject()
        {
            if (string.IsNullOrEmpty(channelName))
            {
                Process[] procs = Process.GetProcessesByName("SSFIV");
                int sf4Pid = procs[0].Id;

                SF4Interface = new SF4Interface();

                RemoteHooking.IpcCreateServer<SF4Interface>(
                    ref channelName,
                    WellKnownObjectMode.Singleton,
                    SF4Interface,
                    new[] { WellKnownSidType.LocalSid });

                RemoteHooking.Inject(
                    sf4Pid,
                    InjectionOptions.DoNotRequireStrongName,
                    "FrameTrapped.Injected.dll",
                    "FrameTrapped.Injected.dll",
                    channelName);
            }
        }
コード例 #2
0
        /// <summary>
        /// Inject the "Injected" library into Street Fighter.
        /// </summary>
        public void Inject()
        {
            if (string.IsNullOrEmpty(channelName))
            {
                Process[] procs  = Process.GetProcessesByName("SSFIV");
                int       sf4Pid = procs[0].Id;

                SF4Interface = new SF4Interface();

                RemoteHooking.IpcCreateServer <SF4Interface>(
                    ref channelName,
                    WellKnownObjectMode.Singleton,
                    SF4Interface,
                    new[] { WellKnownSidType.LocalSid });

                RemoteHooking.Inject(
                    sf4Pid,
                    InjectionOptions.DoNotRequireStrongName,
                    "FrameTrapped.Injected.dll",
                    "FrameTrapped.Injected.dll",
                    channelName);
            }
        }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Main"/> class.
        /// </summary>
        /// <param name="inContext">The remote hook context.</param>
        /// <param name="inChannelName">The channel name.</param>
        public Main(RemoteHooking.IContext inContext, string inChannelName)
        {
            _endsceneSkip = true;
            _frameNumber = 0;
            _endSceneCounter = 0;

            _interface = RemoteHooking.IpcConnectClient<SF4Interface>(inChannelName);
            _interface.WriteConsole("Dll successfully injected.");
        }