how to get the component containing a file
One answer
You'll have to find a change set that contains a change for that file. The change set is set to one component and that can't change. However, the file can be moved to another component so you may find change sets that aren't from the same component.
You can search for change sets using IChangeSetCriteria to set your parameters. Then call IWorkspaceManager#findChangeSets(*).
You can search for change sets using IChangeSetCriteria to set your parameters. Then call IWorkspaceManager#findChangeSets(*).