Platform SDK: Files and I/O |
Shell shortcuts in Windows 95/98 include heuristic link tracking that uses a tree-search algorithm to find a likely match for a moved link source. The search algorithm is based on the last known path of the file as well as file information that includes the creation date, the file size, and the file name and extension. OLE linking includes the same heuristic link tracking. Windows NT 4.0 also includes the same heuristic link tracking with some added improvements in searching name spaces to yield results in some common scenarios. The improvements include the following steps subject to time limits imposed by the client application:
These link-tracking schemes are transparent to the end user. However, they do not always yield positive results and can be time consuming.
Windows 2000 adds a new distributed link tracking service for NTFS. The distributed link-tracking service can be used to track links to files. This service is used by shell shortcuts and by OLE links. See the IShellLink interface for more information on shell shortcuts. See the IOleLink interface for more information on OLE links. If a link is made to a file on an NTFS version 5.0 volume and the file is moved to any other NTFS version 5.0 volume within the same domain, the file will be found by the tracking service, subject to time considerations. Additionally, if the file is moved outside the domain or within a workgroup, it will most likely be found.
When a link is created to a file, the target file is considered the link source and the creator of the link is the link client. For example, if a shell shortcut is created to link to a text document, the text document is the link source and the shell shortcut is the link client.
The distributed link-tracking service maintains file links for the following situations occurring within a domain:
The distributed link-tracking service also attempts to maintain links in the preceding situations even when they do not occur within a domain, i.e., they are cross-domain or within a workgroup. Links can always be maintained in these situations when the network share on the link source machine is changed. They can also be maintained when a link source is moved within a machine. Links can usually be maintained when the link source is moved to another machine, though this form of tracking is less reliable over time.