You could also use WMI:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/cim_datafile.asp
Attribute InUseCount

Supposedly, it is not 100% reliable.
_________________________
There are two types of vessels, submarines and targets.