A method and system for tracking access by clients to a server object of a
server class. The client tracking system provides a derived client
tracking server class that includes an overriding implementation of a
query function of the server class. The overriding implementation
instantiates a phantom server object and returns a pointer to the
instantiated phantom server object. The phantom server object has
functions that correspond to and override the functions of the server
class. These overriding functions perform custom processing on a
client-by-client basis and forward their invocation to be corresponding
functions of the server object. When a client invokes the query function
of the client tracking server object, a pointer to a phantom server
object is returned. From then on, when that client invokes a function of
the phantom server object, custom processing can be performed for that
client.