How to receive file change notifications

Hi, I am developing some simple anti-virus program.

I need to monitor file system changes to automatically scan files for viruses that are created on a mobile device.

I have no problem getting file change notifications using SHChangeNotifyRegister API.

It works very well when I copy files inside a mobile device.

It also detects image files and other files that are downloaded when I surf the Internet.

The problem is when I copy some files from my desktop to the mobile device via active sync, the file change notification that I receive is not what I expected.

The pathname that I receive is "\Temp\_PegFilt~706705640.tmp".

However, when I look into the folder "\Temp\", there's no file like that.

I guess ActiveSync does something that I don't know.

How can I get the right pathname in this case?

Thank you.

[901 byte] By [Mr.Kim] at [2008-1-10]
# 1
Hi

Try the FindFirstChangeNotification API.
Check the below link

http://msdn2.microsoft.com/en-us/library/aa914108.aspx

SaravananVV at 2007-10-3 > top of Msdn Tech,Smart Device Development,Smart Devices General...
# 2

Hi

To the best of my knowledge, I am not going to be able to get a filename that has been changed or created using FindFirstChangeNotification API.

There's another API "ReadDirectoryChangesW" on Windows XP, but unfortunately it doesn't support Windows CE platform.

That's why I use APIs related to the shell change notification.

If you know how to get a filename using FindFirstChangeNotification API, I really hope you can give me some help.

Thanks.

Mr.Kim at 2007-10-3 > top of Msdn Tech,Smart Device Development,Smart Devices General...