Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-30-2004, 18:44
Peter[Pan]
 
Posts: n/a
C++ Help (Hooking a function)

Say i have the sdk of a application with such a function defined.

Code:
void Check_Registration (
int Registered,
int Licenses,
int LicenseType,
int ChkSum,
int RESERVEDA,
int ( *Callback_CheckDate )( DATE *pDATE ),
void ( *Callback_NotifyOnline)( DATE *pDate, int ChkSum ) )
{

}
Now, i want to hook the NotifyOnline with my own function so i define.

Code:
typedef void (*NotifyOnlineOrig)(DATE *,int);
and my function:
Code:
void NotifyOnlineNew ( DATE *pDate, int ChkSum)
{
     NotifyOnlineOrig(pDate,ChkSum);
}
and try this inside the function.
Code:
void Check_Registration (
int Registered,
int Licenses,
int LicenseType,
int ChkSum,
int RESERVEDA,
int ( *Callback_CheckDate )( DATE *pDATE ),
void ( *Callback_NotifyOnline)( DATE *pDate, int ChkSum ) )
{
   NotifyOnlineOrig=Callback_NotifyOnline;
   Callback_NotifyOnline=NotifyOnlineNew;
}
of course the = parts dont work, how can i achive this, (its not a real sdk, so plz dont ask)

Thanks
Reply With Quote
 


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET dll hooking Avi_RE General Discussion 10 09-28-2023 07:09
API Hooking thomasantony General Discussion 5 04-22-2005 11:44
API-hooking MaRKuS-DJM General Discussion 11 03-25-2005 13:27


All times are GMT +8. The time now is 11:38.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )