Patent ID: 7328439

Claim:
A method for use by a first process executing in a computer system for interacting with a second process executing in the computer system, the method comprising: during a startup sequence of the second process, creating a copy of a global notification hook of the first process in the second process; using the copy of the global notification hook, detecting an occurrence of a triggering message passed between an operating system and a thread of the second process; in response to detecting the occurrence of the triggering message, determining whether subsequent messages passed between the operating system and the thread of the second process should be monitored; in the event that the subsequent messages should be monitored, activating a thread-level message hook within the thread of the second process, wherein the thread-level message hook is configured to monitor the subsequent messages; during a startup sequence of the first process: detecting a third process executing in the computer system; inserting a copy of the global notification hook into the third process; and broadcasting a private startup message to the copy of the global notification hook in the third process; wherein, in response to the private startup message, the copy of the global notification hook executes acts of: determining whether subsequent messages passed between the operating system and a thread of the third process should be monitored; and in the event that the subsequent messages should be monitored, activating a thread-level message hook within the thread of the third process; wherein determining whether subsequent messages passed between the operating system and the thread of the third process should be monitored includes: identifying a previously created window of the third process; and determining whether the previously created window is of interest, wherein subsequent messages should be monitored in the event that the previously created window is of interest.