How do I watch for executables starting???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    #1

    How do I watch for executables starting???

    Hello,
    I am working on an AntiSpyware software/utility using VB.NET 2005
    I need to create a class to watch for processes starting or executables
    starting running.

    So far the solution that I have come up with is to use the
    System.Diagnost ic.Process to iterates through running processes... This is
    tedious and CPU intensive...
    I would like a solution similar to the FileSystemWatch er, that would notify
    me as soon as a new executable or process has started... so I can catch it,
    scan it etc...
    Is there any code, custom code or examples I could use to come up with this
    stategy?
    Any help would be appreciated.
    Thank you,

    Learner.


  • =?Utf-8?B?aXdkdTE1?=

    #2
    RE: How do I watch for executables starting???

    a little searching on MSDN brings up the CBT hook
    (http://msdn2.microsoft.com/en-us/library/ms644977.aspx) which you can use to
    find out when a new Window is created, etc. look around the System hooks,
    usually thats a good place to start for System-Wide events (that and the
    WndProc function)
    --
    -iwdu15

    Comment

    • Guest's Avatar

      #3
      Re: How do I watch for executables starting???

      Thank you,
      This looks promising, but it is written for CPP programmers, I am not sure
      how I would apply it to a .NET VB.NET environment.
      But this is a good start... thank you for your kind reply.

      Learner.

      "iwdu15" <jmmgoalsteraty ahoodotcomwrote in message
      news:C82236DC-74B8-426A-B35E-95F8019A1A26@mi crosoft.com...
      >a little searching on MSDN brings up the CBT hook
      (http://msdn2.microsoft.com/en-us/library/ms644977.aspx) which you can use
      to
      find out when a new Window is created, etc. look around the System hooks,
      usually thats a good place to start for System-Wide events (that and the
      WndProc function)
      --
      -iwdu15

      Comment

      • =?Utf-8?B?aXdkdTE1?=

        #4
        Re: How do I watch for executables starting???

        you can use PInvoke to set a CBT windows hook in the .net environment.
        www.pinvoke.net is the place u wanna look at
        --
        -iwdu15

        Comment

        Working...