FunctionPointer menu

User Tag List

Results 1 to 1 of 1
  1. #1
    shadowKD's Avatar Member
    Reputation
    1
    Join Date
    Jul 2017
    Posts
    24
    Thanks G/R
    7/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    FunctionPointer

    Hi, I have a strange error when RegisterDelegate

    Code:
    _castSpell = maga.RegisterDelegate<CastSpellDelegate>((uint)Process.GetCurrentProcess().MainModule.BaseAddress + CastSpellPtr);

    I'm just trying to get a callback when someone casts a spell

    Code:
            [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
            private delegate bool CastSpellDelegate(int spellId, int unk, ulong targetGuid, int unk1, int unk2);
            private static CastSpellDelegate _castSpell;
    Code:
           public static void CastSpell(int spellId, ulong target)
            {
                Console.WriteLine(1);
            }

    I just started to understand the callbacks, tell me the right direction)

    FunctionPointer
All times are GMT -5. The time now is 09:14 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search