Can/should I use Detours for Hooking an external application with VB.Net?

Posted on 2007-10-05
Last Modified: 2012-08-13
I've never written a hook before but I have read up on the topic.  What I'm trying to do from my application is to add a hook for an external application.   For example, say I was trying to write a hook that would prevent Notepad.exe from being closed.  So I'm wondering if I could use Detours from to accomplish this, or even if I should?
Question by:McBluffin
    1 Comment
    LVL 86

    Accepted Solution

    The baic point is that from .NET, you can't do API hooking, so that leaves you only with the option to use unmanaged code for that in the 1st place. Detours is a nice toolset for that, but depending on what you actually want to achieve, something like ("API hooking revealed") might also do the job.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
    Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
    The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
    The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now