Solved

Detect exactly which file/folder changed when monitoring folder

Posted on 2002-07-02
6
263 Views
Last Modified: 2008-02-01
Hi:

I'm using VB6 and I'm using the FindFirstChangeNotification along with the other ChangeNotification API's and the WaitForSingleObject API to detect when a specified folder's contents have changed.  For example, the program will alert me if someone adds a file, deletes a file, modifies a file in that folder, etc.  I can detect that something changed but I have been unable to figure out exactly what changed.  For example, if someone deletes a file, then I can only detect that the folder in which the file resided has in some way changed.  I'd like to be able to log exactly what was deleted, added, etc.

Looking forward to your responses.

Thank you.
0
Comment
Question by:ksm
6 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 7126516
Can you move to VB.Net and use the FileSystemWatcher?
0
 

Author Comment

by:ksm
ID: 7126561
Interesting.  I have it installed onto my machine but haven't had the chance to start using vb.net yet.  Perhaps now's my reason.
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 200 total points
ID: 7126655
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 27

Expert Comment

by:Ark
ID: 7139588
Hi
You have to use subclassing technique instead of WaitForSingleObject and convert pointers(pidls) from callback function into display names. See this sample for more info:
http://www.mvps.org/vbnet/code/shell/shchangenotify.htm

Cheers
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 7348066
This question appears to be abandoned. A question regarding it will be left in the CleanUp
area; if you have any comment about the question, please leave it here.

Unless there is objection or further activity, one of the moderators will be asked to accept the comment
of <emoreau>.

DO NOT ACCEPT THIS COMMENT AS AN ANSWER.
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7373293
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now