Important alert: (current site time 5/27/2015 9:16:22 AM EDT)

winzip icon


Submitted on: 1/29/2006 2:23:30 AM
By: .::Anubis::. 
Level: Advanced
User Rating: By 3 Users
Compatibility: C, C++ (general), Microsoft Visual C++, Borland C++
Views: 13434
author picture
(About the author)
     This code will hook any api of your chose and allow you to redirect it to another qualified function. This code can be used in conjunction with my other posts dealing with process injection to hook api's in other running processes. Thanks for voting!!

winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net

Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

Other 3 submission(s) by this author


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

Other User Comments

1/29/2006 2:43:21 PMandrius0

emm some errors while compiling:
error C2057: expected constant expression line 24
error C2466: cannot allocate an array of constant size 0 line 24
Error 3 error C2133: 'msg' : unknown size line 24

(If this comment was disrespectful, please report it.)

2/1/2006 9:44:01 AMAlexMark

You can solve them this way:

int l;
l = strlen(lpText);
char *msg;
msg = (char*)malloc(l);

But i still can't understand what this code would show...
(If this comment was disrespectful, please report it.)

2/2/2006 12:34:22 AMOpcodeVoid

The code is good, but will only work for the current process, also it breaks the old Functiosn, until you restore the bytes, making socket hooking near impossible, But otherwise good code
(If this comment was disrespectful, please report it.)

3/20/2012 2:03:18 AMClient\server chat prog+kaynak kodlari

I know this is old post :)

can you explain(if you are still here ) this line :
DWORD dwCalc = ((DWORD)lpFunction - dwAddr - 5);

why are you subtracting ? why not jmp to lpFunction directly ?

(If this comment was disrespectful, please report it.)


Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)

To post feedback, first please login.