?
Solved

Global API hook.

Posted on 2006-04-14
9
Medium Priority
?
734 Views
Last Modified: 2012-06-27
How do i global hook an API function and replace it with something else? I read somewhere how to hook an API function, but just for you own application, do i need to inject a dll to every process? No MFC.

Thanks.
0
Comment
Question by:Swemetal
  • 3
  • 2
  • 2
7 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 1000 total points
ID: 16457597
Yes, but there are frameworks that handle that - see e.g. "Detours" at http://research.microsoft.com/sn/detours/
0
 
LVL 11

Assisted Solution

by:Deepu Abraham
Deepu Abraham earned 1000 total points
ID: 16459098

For your own application I think the best way is to create a dll with those functions and host it with your processes.This is much easier than extending the aplication using detours.

Best Regards,
DeepuAbrahamK
0
 

Author Comment

by:Swemetal
ID: 16459456
Is detours the only way of making an API hook global?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 86

Expert Comment

by:jkr
ID: 16462753
No, it is not the only way, but the one I would go if had to do that on MS systems.
0
 

Author Comment

by:Swemetal
ID: 16464154
And my other options are? Injecting a dll to every process?
0
 
LVL 11

Expert Comment

by:Deepu Abraham
ID: 16466901
Yes, I would say injecting dlls to your processes.
Best Regards,
Deepu
0
 

Author Comment

by:Swemetal
ID: 16472268
Are you really really sure that deutors and dll injecting to every process is the only way of making an API hook global?
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question