• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 737
  • Last Modified:

Global API hook.

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
Swemetal
Asked:
Swemetal
  • 3
  • 2
  • 2
2 Solutions
 
jkrCommented:
Yes, but there are frameworks that handle that - see e.g. "Detours" at http://research.microsoft.com/sn/detours/
0
 
Deepu AbrahamR & D Engineering ManagerCommented:

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
 
SwemetalAuthor Commented:
Is detours the only way of making an API hook global?
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
jkrCommented:
No, it is not the only way, but the one I would go if had to do that on MS systems.
0
 
SwemetalAuthor Commented:
And my other options are? Injecting a dll to every process?
0
 
Deepu AbrahamR & D Engineering ManagerCommented:
Yes, I would say injecting dlls to your processes.
Best Regards,
Deepu
0
 
SwemetalAuthor Commented:
Are you really really sure that deutors and dll injecting to every process is the only way of making an API hook global?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now