A method and system for referring to and binding to objects using a
moniker object is provided. In preferred embodiments a moniker object
contains information to identify linked source data and provides methods
through which a program can bind to the linked source data. A binding
method is provided that returns an instance of an interface through which
the linked source data can be accessed. In a preferred embodiment, the
moniker object provides other methods including a reducing method that
returns a more efficient representation of the moniker object; equality
and hash methods for comparing moniker objects; and inverse, common
prefix, and relative-path-to methods for comparing and locating moniker
objects from other moniker objects. Several implementations of a moniker
object are provided. Each implementation is a moniker class and has a
class identifier that identifies code to manage the moniker class.