Click to See Complete Forum and Search --> : Open locked file for only reading


lazslo
July 17th, 2006, 07:52 AM
Hi!

I am developing a 802.11 packet monitor in windows that listens for beacons, and I am using logs written by a program (Airopeek's *.apc files). That program logs the 802.11 packets in a wireless card to a file and I want to access as soon as possible to that information.

The problem is that Airopeek doesn't have an option to create logs smaller than 1 meg and it opens the log files with exclusive access. For that reason, i must wait until each file is created, being forced to wait for 1 minute for the traces when I would want that in real time.

After all that introduction, I would appreciate so much if somebody could tell me: how can I access to the file that has been locked by Airopeek, which I need it with only read access?

I don't want to change anything in the file, only read. If I couldn't access at all because it is really "locked", how can I get the handle of the file - whose name and location I know? and if I can get it: how can I read data from that handle ?

Thank you very much, i hope this message is not so confusing, if not, i will try to explain better

Regards
Luis

Krishnaa
July 17th, 2006, 07:58 AM
If the application has locked the file as OF_SHARE_EXCLUSIVE then there is realy no way to open it for reading, only the application who locked it can access it, that too with the handle opened while locking.