Platform SDK: Agent |
To be notified of events by Microsoft Agent, you must implement either the IAgentNotifySink or the IAgentNotifySinkEx interface, and create and register an object of that type following COM conventions:
// Create a notification sink pSinkEx = new AgentNotifySinkEx; pSinkEx->AddRef(); // And register it with Microsoft Agent hRes = pAgentEx->Register((IUnknown *)pSinkEx, &lNotifySinkID);
Remember to unregister your notification sink when your application shuts down and releases Microsoft Agent's interfaces.