Solved

delphi .dcu file format

Posted on 1998-10-07
7
1,712 Views
Last Modified: 2008-03-06
Need to know delphi .dcu file format
0
Comment
Question by:laolin
7 Comments
 
LVL 4

Expert Comment

by:BoRiS
ID: 1342102
laolin

The dcu file format has not been released by Inprise (BORLAND) as it (they say) is always changing, I think that they can't release the format as then shareware components etc would not really work as you could decompile the .dcu back to .pas format...this is just on instance of the file format not been released...

Later
BoRiS

0
 
LVL 2

Expert Comment

by:omsec
ID: 1342103
i also don't think, there is no description avaiable, Borland haven't even released the former
TPU-Format in Turbo PAscal
0
 
LVL 2

Expert Comment

by:freter
ID: 1342104
the delphi compiler can generate .obj files instead of .dcu file (go to project options | linker | output object files). i think the .obj file format is described rather good.
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 10

Expert Comment

by:viktornet
ID: 1342105
DCU is a simple Delphi unit that has been compiled and I guess it's a resource file.. Noe exactly sure, but there is nothing wrong with a simplew guess, is it???

;->
0
 
LVL 2

Expert Comment

by:freter
ID: 1342106
viktor, dcu's are not resource files. i tried to load them with the resource editor of visual studio, and it didn't recognize the files as resource binaries. in my opinion, dcu's are similar to obj's and just have a different format.
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1342107
yeah. maybe your are right....

10x
0
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 200 total points
ID: 1342108
laolin,

DCU files are similar to OBJ files in that they are the machine code version of the source code for a unit. DCU files are then run through the linker to produce the final .EXE.

Borland/Inprise have never released the format of TPU/DCU files, mainly to preserve their ability to change it when they need to. With a lot of effort you could reverse engineer it but I can't think of an example where it would be worth it (and you still have the problem with the decompiled code I mention below).

OBJ files are a standard object file format and are described in the Microsoft literature.

Basically if you need to decompile a DCU/OBJ it's for one of two reasons. (1) You are trying to crack some software or (2) You have lost the source. If (1) thats not ethical :-), if (2) bad luck - even if you could decompile it the resulting code would not look anything like the original code (especially if optimization as enabled) and would be a worse result than rewriting the code.

Cheers,

Raymond.

0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question