Autor Beitrag
elbrand
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Sa 06.12.03 19:03 
wie kann ich mir aus einem fremden, laufenden programm das icon der anwendung besorgen?
ich habe funktionen gefunden, um aus einem executable file das icon u extrahieren (extracticon und so...).
Mit CreateToolhelp32Snapshot und Process32First/-Next wollte ich mir dann die .exe datei besorgen und das icon da rausholen, aber die funktionen liefern nicht, wie in der win32-api-hilfe beschrieben, den pfad... wer weiss wie's geht?

_________________
-=siehe rueckseite=-
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Sa 06.12.03 19:25 
Man kommt auch über die ToolHelp-API an den Pfad (über die Module), eine einfachere Methode ist aber GetModuleFileNameEx, das gibt es aber nur unter der NT-Serie...

Unter welchen Windows-Versionen soll das ganze denn laufen? Dann kann ich dir ein paar Codeschnipsel liefern..

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 06.12.03 19:26 
Also, damit bekomme ich sowohl unter 9x als auch unter NT/2000/XP jeweils den kompletten Pfad einer Exe, deren Fenster-Handle ich habe. Wie dem auch sei, das Prinzip basiert auf den von dir angesprochenen Funktionen "CreateToolhelp32Snapshot" usw.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Sa 06.12.03 19:34 
Achja... den Code wollte ich damals noch optimieren.. :roll:

Naja, werd mal beizeiten die entsprechenden Schnipsel aus meinem X-Spy zusammensuchen und entsprechend zusammensetzen..!

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
elbrand Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: So 07.12.03 00:52 
Titel: toolhelp
Danke Maenner, genau das, was ich gesucht habe. Es hat auf anhieb funktioniert - ich bin begeistert!

_________________
-=siehe rueckseite=-