Autor Beitrag
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Di 21.06.05 13:04 
Gibt es eine Möglichkeit, die in einem Programm genutzten Units auszulesen und darin festzustellen, welche Typen darin deklariert wurden (Laufzeit, OHNE Nutzung des VCL-Sources).

Ich möchte in meinem Programm automatisch eine Klassenliste importieren lassen von den Klassen, die zur Verfügung stehen (mit TypeInfo) und diese dann von meinem Programm analysieren lassen...


Moderiert von user profile iconChristian S.: Topic aus VCL (Visual Component Library) verschoben am Di 21.06.2005 um 13:12

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Di 21.06.05 13:10 
ich hatte mal die idee, dass ein programm, alle funktionen checkt, und guckt in welcher unit die steht, diese wird dann gecheckt und importiert usw, sodass alles was gebraucht wird, importiert wird, damit würde die exe letztenendes kleiner werden, meinst du sowas ?
BenBE Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Di 21.06.05 13:20 
Nein, mein das so, dass ich jegliche Typen, die irgendwo in der EXE eingebunden sind, auflisten lassen möchte und deren Interface anhand der mitgelieferten TypeInfo präsentieren möchte ...

Beispiel:

Das Programm nutzt Units A, B und C und in Unit C wird ein Type TMyEnumABC = (meA, meB, meC); deklariert. Nun soll mir das Programm anzeigen, dass es insgesamt im Programm (eigene EXE\Memory Space) die Units A, B und C gibt und zusätzlich, dass in der Unit C der Type TMyEnumABC deklariert ist (die Deklarationssyntax anhand der Typeinfo zu rekonstruieren ist keine große Übung mehr).

Dass es geht, ist mir klar, weil das ganze für Packages ja auch gemacht wird (Suche in: Delphi-Forum, Delphi-Library LOADPACKAGE).

Nun ein wenig klarer, was ich meine?

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
BenBE Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 03.01.08 18:31 
Einen Ansatz könnte folgender Link bieten:
www.delphipraxis.net/topic52251,15.html

Auch gibt es eine undokumentierte Möglichkeit, die TypeInfos der Units auszulesen:
www.delphipraxis.net...ic61065,0,asc,0.html

Danke negaH!

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.