Einzelnen Beitrag anzeigen

Fridolin Walther

Registriert seit: 11. Mai 2008
Ort: Kühlungsborn
446 Beiträge
 
Delphi 2009 Professional
 
#2

Re: Create Sys Tray / Capture

  Alt 1. Jul 2009, 15:56
The systray is essentially a Toolbar. You can just search for it and get a list of pointer that point to datastructures holding the information about each item inside the systray. You can than read those datastructures using ReadProcessMemory. The whole process is outlined here:

http://www.codeproject.com/KB/applic...lTrayInfo.aspx

This will work for XP and later. Getting the tray icon information for earlier Windows versions is a little bit trickier but doable.

[EDIT: By the way. You can't get all icons correctly because some HICON values are simply invalid. I never found the reason why ... I haven't looked much though as I was only interested on the process IDs associated with the tray icons.]
Fridolin Walther
"While Mr. Kim, by virtue of youth and naiveté, has fallen prey to the inexplicable need for human contact, let me step in and assure you that my research will go on uninterrupted, and that social relationships will continue to baffle and repulse me."
  Mit Zitat antworten Zitat