Raised This Month: $ Target: $400
 0% 

DHooks (Dynamic Hooks - Dev Preview)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
nosoop
Veteran Member
Join Date: Aug 2014
Old 08-10-2018 , 22:42   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #11

Quote:
Originally Posted by Spirit_12 View Post
Hopefully you folks can help me here. I was just trying to recreate a function from Downtown to plugin using Dhooks Detours.

[...]

I'm assuming that either my return type is wrong or my add parameter needs a switch. Either that or function has no return value and if that's the case then how do I stop its execution.
The one thing that stands out for me is that the value it's spitting out isn't a handle.

Looking through the code, you specified a ThisPointerType of ThisPointer_Address but didn't use a callback prototype that references it like so:

Code:
function MRESReturn (Address pThis, Handle hReturn, Handle hParams);
If you don't need the this pointer, you should instantiate using ThisPointer_Ignore instead, which will omit pushing the this to your callback. (The extension has no way to see what the callback takes as its arguments; you only get the compile-time check that it matches one of the ones specified as a DHookCallback.)
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 08-10-2018 at 22:48.
nosoop is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:58.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode