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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Help hooking Windows API functions

Help hooking Windows API functions

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++jsonquestion
3 Posts 3 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.
  • J Offline
    J Offline
    JaVinci
    wrote on last edited by
    #1

    Hi, everybody! I need help... I'm still trying to develop a kind of a firewall for WinNT/2K/XP, in C++. I'm using a program that hooks Windows API functions and it works reasonably good. The way it hooks Windows API functions is injecting the dll to every process using CreateRemoteThread(). My problem is with two functions: accept() and listen() aren't hooked (I've tried to hook them from WS2_32.DLL and WSOCK32.DLL), altough the code I've written should be hooking them (I've hooked lots of API functions the same way without a problem -CreateProcess, ExitProcess, send, recv, etc..-), but I don't seem to be able to hook those two functions. Do you have any idea of what can be the reason for this? Thanks a lot to all in advance. Regards: Javi.

    L 1 Reply Last reply
    0
    • J JaVinci

      Hi, everybody! I need help... I'm still trying to develop a kind of a firewall for WinNT/2K/XP, in C++. I'm using a program that hooks Windows API functions and it works reasonably good. The way it hooks Windows API functions is injecting the dll to every process using CreateRemoteThread(). My problem is with two functions: accept() and listen() aren't hooked (I've tried to hook them from WS2_32.DLL and WSOCK32.DLL), altough the code I've written should be hooking them (I've hooked lots of API functions the same way without a problem -CreateProcess, ExitProcess, send, recv, etc..-), but I don't seem to be able to hook those two functions. Do you have any idea of what can be the reason for this? Thanks a lot to all in advance. Regards: Javi.

      L Offline
      L Offline
      Laffis
      wrote on last edited by
      #2

      Not familiar with the terminology you use: what do you mean by hook? R u talking about linking (either dynamically or statically) dll?

      T 1 Reply Last reply
      0
      • L Laffis

        Not familiar with the terminology you use: what do you mean by hook? R u talking about linking (either dynamically or statically) dll?

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #3

        Laffis wrote: what do you mean by hook? R u talking about linking (either dynamically or statically) dll? what is HOOK? good question here is answer :- http://www.codeproject.com/system/hooksys.asp[^]

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta VC Forum Q&A :- I/ IV

        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