コード例 #1
0
ファイル: Inviter.cs プロジェクト: Bluefissure/Inviter
        private void InitUi()
        {
            GetUIModule = Marshal.GetDelegateForFunctionPointer <GetUIModuleDelegate>(getUIModulePtr);
            uiModule    = GetUIModule(Marshal.ReadIntPtr(uiModulePtr));
            if (uiModule == IntPtr.Zero)
            {
                throw new ApplicationException("uiModule was null");
            }
            IntPtr step2 = Marshal.ReadIntPtr(uiModule) + 264;

            PluginLog.Log($"step2:0x{step2:X}");
            if (step2 == IntPtr.Zero)
            {
                throw new ApplicationException("step2 was null");
            }
            IntPtr step3 = Marshal.ReadIntPtr(step2);

            PluginLog.Log($"step3:0x{step3:X}");
            if (step3 == IntPtr.Zero)
            {
                throw new ApplicationException("step3 was null");
            }
            IntPtr step4 = Marshal.GetDelegateForFunctionPointer <GetMagicUIDelegate>(step3)(uiModule) + 6528;

            PluginLog.Log($"step4:0x{step4:X}");
            if (step4 == (IntPtr.Zero + 6528))
            {
                throw new ApplicationException("step4 was null");
            }
            uiInvite = Marshal.ReadInt64(step4);
            PluginLog.Log($"uiInvite:{uiInvite:X}");
        }
コード例 #2
0
ファイル: GameFunctions.cs プロジェクト: goaaats/dalamudvox
        public GameFunctions(SigScanner scanner)
        {
            var getUiModulePtr          = scanner.ScanText("E8 ?? ?? ?? ?? 48 83 7F ?? 00 48 8B F0");
            var easierProcessChatBoxPtr = scanner.ScanText("48 89 5C 24 ?? 57 48 83 EC 20 48 8B FA 48 8B D9 45 84 C9");

            this.uiModulePtr          = scanner.GetStaticAddressFromSig("48 8B 0D ?? ?? ?? ?? 48 8D 54 24 ?? 48 83 C1 10 E8 ?? ?? ?? ??");
            this.getUiModule          = Marshal.GetDelegateForFunctionPointer <GetUIModuleDelegate>(getUiModulePtr);
            this.easierProcessChatBox = Marshal.GetDelegateForFunctionPointer <EasierProcessChatBoxDelegate>(easierProcessChatBoxPtr);
        }
コード例 #3
0
        private void InitCommands(object sender = null, EventArgs e = null)
        {
            try
            {
                var getUIModulePtr          = pluginInterface.TargetModuleScanner.ScanText("E8 ?? ?? ?? ?? 48 83 7F ?? 00 48 8B F0");
                var easierProcessChatBoxPtr = pluginInterface.TargetModuleScanner.ScanText("48 89 5C 24 ?? 57 48 83 EC 20 48 8B FA 48 8B D9 45 84 C9");
                uiModulePtr = pluginInterface.TargetModuleScanner.GetStaticAddressFromSig("48 8B 0D ?? ?? ?? ?? 48 8D 54 24 ?? 48 83 C1 10 E8 ?? ?? ?? ??");

                GetUIModule           = Marshal.GetDelegateForFunctionPointer <GetUIModuleDelegate>(getUIModulePtr);
                _EasierProcessChatBox = Marshal.GetDelegateForFunctionPointer <EasierProcessChatBoxDelegate>(easierProcessChatBoxPtr);
            }
            catch
            {
                var chat = pluginInterface.Framework.Gui.Chat;
                chat.PrintChat(new XivChatEntry {
                    MessageBytes = Encoding.UTF8.GetBytes("[QoLBar] Error with loading signatures")
                });
            }
        }