
Just remember, love is live, and hate is living death!
Black Sabbath: A National Acrobat
In this post at the German speaking Delphi-PRAXiS forum, tray icon visibility on Windows 7 was discussed. While I quite like Microsofts decision to let the user decide which icons spam their desktop, I can understand the technical challenge to know how the new IconStreams registry value (at HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify\) is defined. I therefore did a bit of trial and error debugging and wrote ReadIconStreams.dpr, a small tool that reads and displays this information for the current user.
To sum things up, after a header of 20 bytes, we have repeated records of this type:
TIconStreamRecord = packed record
FilenameRaw: array [0 .. 263] of WideChar;
VisibilityRaw: DWord;
Reserved0: array[0..3] of byte;
LastVisibleTooltipRaw: array [0 .. 253] of WideChar;
Reserved1: array [0 .. 591] of Byte;
Reserved2: DWord;
end;
Filename and Tooltip are Rot13 encoded, in a strict form (only letters are moved). Visibility is 0 to 2, with 0 being Only Notifications, 1 Hides Icons and Notifications, and 2 shows both. There’s more data in there, but that is irrelevant for this question and open for some future fun.

This article was written by: CCRDude