I'd hit CTRL+ALT+DEL and look at task manager...
Of course, if I wanted to do it programmatically I'd probably reference WMI and "Select * From Win32_Process"
WMI is extremely powerful for accessing and programmatically controlling administrative tasks.
It should also give you access to the list of currently active processes and which user/principal is in control of that process. I'm not sure however if it'll tell you which file is being used by which.
You can also find this information administratively in Computer Management/Shared Files
I've never had to programmatically do this though - I'll do some more digging and figure out what I can find...