Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to create a hook to stop a certain process run by another application?

how to create a hook to stop a certain process run by another application?

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    auralius manurung
    wrote on last edited by
    #1

    there is an application that keep nagging me...every time it closes, it will open my internet browser...i want to make an app with visual c++ so i can stop it opening my internet browser...can i use a hook to stop it...can anyone help me please... thx

    S 1 Reply Last reply
    0
    • A auralius manurung

      there is an application that keep nagging me...every time it closes, it will open my internet browser...i want to make an app with visual c++ so i can stop it opening my internet browser...can i use a hook to stop it...can anyone help me please... thx

      S Offline
      S Offline
      sashoalm
      wrote on last edited by
      #2

      Writing a hook isn't very easy. Why don't you just check every 100 milliseconds if Internet Explorer opened after this app closed and then close it.

      There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

      A 1 Reply Last reply
      0
      • S sashoalm

        Writing a hook isn't very easy. Why don't you just check every 100 milliseconds if Internet Explorer opened after this app closed and then close it.

        There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

        A Offline
        A Offline
        auralius manurung
        wrote on last edited by
        #3

        ya nice idea...but do you have any idea (link) or something wherei can learn about hook in windows...??

        S 1 Reply Last reply
        0
        • A auralius manurung

          ya nice idea...but do you have any idea (link) or something wherei can learn about hook in windows...??

          S Offline
          S Offline
          sashoalm
          wrote on last edited by
          #4

          why do you insist on doing it the hard way? polling every 100 ms IMO won't be any slower from your point of view.

          There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups