strange glitches for GetGuidByKeyword menu

User Tag List

Results 1 to 6 of 6
  1. #1
    WBR's Avatar Member
    Reputation
    1
    Join Date
    Dec 2014
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    strange glitches for GetGuidByKeyword

    Today i got troubles with detouring GetGuidByKeyword function for C#
    PHP Code:
                [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
                public 
    delegate int GetGuidByKeywordDelegate(string tokenref int128 guidint unkint unk2); // int128 = struct with 2 ulong
                
    public static GetGuidByKeywordDelegate GetGuidByKeywordHandler;
                private static 
    Detour GetGuidByKeywordDetour;
         
                
    GetGuidByKeywordDetour Memory.Instance.Detours.CreateAndApply(GetGuidByKeywordHandler, new GetGuidByKeywordDelegate((string tokenref int128 guidint unk1int unk2) =>
                {
                        
    int ret = (int)GetGuidByKeywordDetour.CallOriginal(tokenguidunk1unk2); // object ret = _targetDelegate.DynamicInvoke(args); where  params object[] args
                        
    return ret;
                }), 
    "GetGuidByKeywordDetour"); 
    just hook and call original. It dont crash the game but return guid as null, and all functions using unit return 0.
    What i doing wrong?
    Want to pass pointer for lua functions

    strange glitches for GetGuidByKeyword
  2. #2
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You cannot pass a value by ref to CallOriginal since it's using a params list.

    Change 'ref int128 guid' to 'IntPtr' and try that instead.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  3. #3
    WBR's Avatar Member
    Reputation
    1
    Join Date
    Dec 2014
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ty for response, but i was trying with IntPtr for any params in function, with same results. it would be simple, but...

  4. #4
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
        internal delegate bool GetGuidByKeyWord(IntPtr pkeyword, IntPtr guid, bool unk0, bool unk1);
    
    
                Memory.Detours.CreateAndApply(getGuidByKeyword, _getGuidByKeyWord = GetGuidByKeywordDetour, "GetGuidByKeyWord");
    
            private static bool GetGuidByKeywordDetour(IntPtr keywordPtr, IntPtr guidPtr, bool unk0, bool unk1)
            {
                return (bool) Memory.Detours["GetGuidByKeyWord"].CallOriginal(keywordPtr, guidPtr, unk0, unk1);
            }
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  5. #5
    Wildbreath's Avatar Contributor
    Reputation
    162
    Join Date
    Feb 2012
    Posts
    121
    Thanks G/R
    2/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Robske View Post
    Code:
        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
        internal delegate bool GetGuidByKeyWord(IntPtr pkeyword, IntPtr guid, bool unk0, bool unk1);
    
    
                Memory.Detours.CreateAndApply(getGuidByKeyword, _getGuidByKeyWord = GetGuidByKeywordDetour, "GetGuidByKeyWord");
    
            private static bool GetGuidByKeywordDetour(IntPtr keywordPtr, IntPtr guidPtr, bool unk0, bool unk1)
            {
                return (bool) Memory.Detours["GetGuidByKeyWord"].CallOriginal(keywordPtr, guidPtr, unk0, unk1);
            }
    thanks!
    will test tonight, _getGuidByKeyWord = GetGuidByKeywordDetour as param - new for me.
    getGuidByKeyword - pointer or delegate?

  6. #6
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Wildbreath View Post
    thanks!
    will test tonight, _getGuidByKeyWord = GetGuidByKeywordDetour as param - new for me.
    getGuidByKeyword - pointer or delegate?
    static member of the GetGuidByKeyword delegate type, I don't even know why anymore, it's been a few years.
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

Similar Threads

  1. a few WSG blink glitches/bugs .. and an eots glitch for any class
    By Anndy in forum World of Warcraft Exploits
    Replies: 11
    Last Post: 07-03-2010, 12:56 PM
  2. [Misc] Shoupz WoW Haste Glitch For Leveling Server.
    By Habitat in forum WoW EMU Exploits & Bugs
    Replies: 24
    Last Post: 07-02-2010, 08:13 PM
  3. Strange Statistics for a Youtube video
    By Phygar in forum Community Chat
    Replies: 5
    Last Post: 03-01-2010, 12:12 AM
  4. Flying Glitch for quest Leave no goblin behind (Druids online)
    By davies19uk in forum World of Warcraft Exploration
    Replies: 5
    Last Post: 01-31-2009, 06:35 AM
  5. Can some pple tell me emu glitches for extra dmg ect.ect.
    By damianpeterodendaal in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 12-15-2007, 04:56 PM
All times are GMT -5. The time now is 08:10 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search