I have 5 processes. I have their process ids. Each of these process locks their own parent.lock file. I have these parent.lock file paths in an array c
parent.lock
For XP, you can use NtQueryInformationFile() with the FileNameInformation info class.
FileNameInformation