VB: File Hook

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: SpaceMan (SpaceMan_at_discussions.microsoft.com)
Date: 11/07/04


Date: Sat, 6 Nov 2004 19:19:02 -0800

Whats the best way to go about programming this..

There is a 3rd party program that writes to a log file at random times. I
need to know each time the file is written to, so i can instantly get the
text that was written.

I dont want to use a timer and constantly check the file for updates, i
would like to somehow be told that the file is being written to and
preferably be told *what* is being written.

After searching around i came across a program called API monitor that
monitors all api calls by a given program. It shows me that the program that
writes the log file is calling WriteFile along with some parameters. My
guess is i need to setup an API-Hook or file-hook. Can someone help me out.
Thanks



Relevant Pages

  • Re: VB: File Hook
    ... >There is a 3rd party program that writes to a log file at random times. ... >After searching around i came across a program called API monitor that ...
    (microsoft.public.vb.winapi)
  • new FileWriter hangs
    ... I have a java program where I repeatedly write to a log file, ... and at random times the program ... first killing my java program. ...
    (comp.lang.java.programmer)
  • Re: new FileWriter hangs
    ... mattias wrote: ... I have a java program where I repeatedly write to a log file, ... > and at random times the program ...
    (comp.lang.java.programmer)