File locking – read-only / get write access

When trying to access a file (a SolidWorks file) that is opened by another user, SolidWorks tells you that it is open by “USERNAME”.  Using the SolidWorks API, how can I obtain the same information? I’d like to get the name of the user who has the file open.

SolidworksApi macros