Geoff Chappell - Software Analyst
The TrayNotify class is registered by EXPLORER.EXE through the COM function CoRegisterClassObject when EXPLORER creates the desktop and taskbar. In ordinary practice then, almost all Windows programs can get an instance of this class created for them by using such well-documented COM functions as CoCreateInstance, treating EXPLORER as a local server, and giving the following CLSID:
As actually implemented, creating an instance through COM just obtains access to a single shared instance. This one instance represents the notification area on the taskbar.
The TrayNotify class implements just the one interface, namely ITrayNotify.
The ordinary COM client of the TrayNotify class is EXPLORER itself, for the Customize Notification Icons dialog, as reached from the Taskbar and Start Menu Properties. Although the class is registered for multiple use, the implementation assumes in some ways that it has at most one client at a time. Simultaneous clients may not get the behaviour they expect, most notably from the RegisterCallback method.
The TrayNotify class is implemented in EXPLORER.EXE version 6.00 and higher.
Though this class dates from 2001, it was still not documented by Microsoft as late as the January 2007 edition of the Windows Vista Software Development Kit (SDK).