in reply to File opened/closed in Windows.

are you monitoring this file?

18:06:33 notepad.exe:4008 IRP_MJ_CLOSE E:\test.txt SUCCES

Looks like is the system call used to close the file. so you would want to monitor the pid's. when you come across a FASTIO_QUERY_OPEN or a IRP_MJ_CLOSE it would open and close. I hope this is what you need to know, i am having some difficulty trying to understand what you are trying to do.

Replies are listed 'Best First'.
Re^2: File opened/closed in Windows.
by Ace128 (Hermit) on Mar 16, 2006 at 23:58 UTC
    I wanna be notified when a file is opened or closed somehow. It should be archiveable somehow using the Win32 (::API) module, but first I need to know what functions to use in Windows. The other modules I mentioned dont have that support (since its not in the Windows API for ReadDirectoryChangesW). However, it _seems_ possible, but Im not sure how. Linux INotify has it easy, since it has IN_CLOSE (A file has been closed) and IN_OPEN (file closed) support.

      You apparently know how to use Win32::API, so once you know which apis to call, you'll know how to do it.

      Therefore your problem is not a Perl problem, but a Win32::API problem, and there are better forums for those than PM.