[This is preliminary documentation and subject to change.]
The client-server event process describes the method by which Active Accessibility enables client applications to establish a direct connection to an accessible object in response to events that the object generated. This process is a bit like a matchmaker setting up a date for two people who don't know each other. For example, the matchmaker has a friend who expressed an interest in dating, and the matchmaker knows another friend who might be compatible. The matchmaker tells both people about each other, handles the initial exchange of phone numbers, and then lets the two arrange a first date on their own. In this analogy, Active Accessibility plays the role of the matchmaker, the server application is the friend who wanted a date, and the client application is the potential match.
This general concept holds true for the client-server event process. When it calls the NotifyWinEvent function, the server application tells Active Accessibility about events it has generated. Active Accessibility checks if any client applications have registered a WinEvent hook and sends the event notification to an appropriate callback procedure. If the client application is interested in the event, it can request access to the generating object by using AccessibleObjectFromEvent, or another accessible object retrieval function. This is the beginning of the so-called "exchange of phone numbers" phase.
When the client calls AccessibleObjectFromEvent, Active Accessibility sends the server application a WM_GETOBJECT message. In response to WM_GETOBJECT, the server application returns a value that acts as a one-time reference to the object that generated the event. Active Accessibility uses this reference to retrieve the address of an object interface such as IAccessible or IDispatch, and gives that address to the client application. Once it has an interface address, the client can directly contact the accessible object to manipulate it or retrieve information as needed.