I have a set of compiled Delphi dcu files, without source. Is there a way to determine what types are defined inside that dcu?
Asked
Active
Viewed 950 times
3 Answers
9
To find out what's in a unit named FooUnit, type the following in your editor:
unit Test;
interface
uses FooUnit;
var
x: FooUnit.
Press Ctrl+Space at the end, and the IDE will present a list of possible completion values, which should consist primarily, if not exclusively, of type names.

Rob Kennedy
- 161,384
- 21
- 275
- 467
-
1Simplest solution, and it works well. I accepted schnaader's though, since it actually breaks apart the DCU directly, rather than relying on the IDE. – JosephStyons Apr 22 '09 at 19:57
2
The DCU format is undocumented, last I checked. However, there is a tool I found that might give you some basic info called DCUtoPAS. It's not very well rated on the site, but it might at least extract the types for you. There is also DCU32INT, which might help as well.
Otherwise, you might just have to open the file with a hex editor and dig around for strings.

Tim Sullivan
- 16,808
- 11
- 74
- 120