I'm assuming you are using the TFS APIs. If so, you can just retrieve the workspace used to check out the files (using the QueryWorspaces method on the VersionControlServer for the TFS server you're dealing with) and perform any actions you desire on that workspace (undo a checkout for instance).
Let me know if you need any more information on this. That should accomplish what you're looking for but let me know if it doesn't.