Solved

convert dcu to pas

Posted on 2002-03-03
30
12,768 Views
Last Modified: 2011-08-18
Is there out any component or procedure that could help me converting some of my old *.dcu's back to *.pas files

i lost the sources (*.pas files )but i got the *.dcues files from my friend that i sent it to him long time ago...
0
Comment
Question by:zaferms
  • 12
  • 5
  • 5
  • +5
30 Comments
 
LVL 3

Expert Comment

by:lopem
ID: 6837952
Hi Zaferms,

I dont think you can convert a dcu to a pas file. DCU is the compiled unit of a pascal unit. So, if possible, you would need a disassembly tool. To my best knowledge, a converter dcu2pas is a nightmare to write.

Best regards,
Manuel Lopez (lopem)
0
 
LVL 20

Expert Comment

by:Madshi
ID: 6838543
Manuel is right. Well, if I remember right, in DCUs there is some information about where functions begin and end and how the parameters look like, but the real pascal code is not stored in the DCU, only the fully compiled assembler binary instructions. You can convert a DCU back to readable assembler code, a good disassembler will help here. But forget about turning it back to pascal. This is a no go... AND it's *good* this way!! Just imagine what would happen if one could convert Delphi DCUs/EXEs back to pascal code! All of our precious code could be stolen easily!

Regards, Madshi.
0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 6840049
And as if all that has been said isn't enough, the DCU format is slightly different from one version of Delphi to the next. Meaning that a D3 DCU won't work in D2,4,5 or 6. A D4 dcu won't work in 2,3,5,6, etc... So, not only do you need to decompile the DCU, but you need to know what version of Delphi it was compiled with in the first place. I don't envy you your mission!

Good luck!!
0
 
LVL 1

Accepted Solution

by:
martin_g earned 100 total points
ID: 6841577
The best program I have found so far at discovering what is inside a dcu is Delphi Peeper
http://www.devrace.com/eng/dap/index.php
As above, it won't give you much code, but it will give you information about the various visible components, much like a text version of DFM.  It will also give you info about memory, processes, etc.
0
 

Author Comment

by:zaferms
ID: 6844768
Okay,,, Experts...

the reason i put this question is that to profe to a friends that there is no way to reverse engneering can be made for delphi applications.

not like visual baseic there is some programs that will do that especially for vb3.0.

thanks all and iam going to delete this question.

And please if any body have some important mattar about delphi such this matter please put it on and let the Experts deal with it.. Thanks to Experts-Exchange Site And to the Fine People they maintain it.. and thanks for all experts they participate an answering question ,,, Really Really I Learned Alot From You Fine People. Thanks Alooooot.

 
0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 6845380
zaferms,
  Since you were never going to award the points anyway, why didn't you just make it an 1000? Or 10,000, hell, make it a million!

 
0
 
LVL 3

Expert Comment

by:lopem
ID: 6845445
Instead of deleting the question, I think you should award the points to someone. In fact,if you delete the question, your points will be lost anyway. And in the other hand I think your policy is not very respectfull to all the guys who collaborate in this site.

Best regards,
Manuel Lopez (lopem)
0
 
LVL 20

Expert Comment

by:Madshi
ID: 6846745
>> In fact,if you delete the question, your points will be lost anyway.

Are you sure? I didn't thought so...
0
 
LVL 3

Expert Comment

by:lopem
ID: 6847606
Madshi...

Now Im not sure ;) but I think if you can recover your points from a question, it could be a often solution to get answers without giving points for that. But the best idea is to ask some of the admins here...

best regards
Manuel Lopez (lopem)
0
 

Author Comment

by:zaferms
ID: 6859916
No Good Answer,,,, Sorry
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7085350
Hi zaferms,
You've requested to delete this question, but its status remains as 'Pending Delete' because one or more comments have been added.  Normally, the only way to fully delete such a Question is to post a message to Community Support and ask for assistance.

EE is making a one-time database sweep to purge the Pending Delete Questions automatically.  During this sweep:

    zaferms -- To allow the deletion to proceed:  Do nothing.
    EXPERTS -- Please DON'T POST a comment except to contest this deletion.

In the future, please refer to http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp#8 for instruction on deleting questions.

DanRollins -- EE database cleanup volunteer
0
 
LVL 3

Expert Comment

by:lopem
ID: 7085486
I think this guy is not fair with all the EE community. He asked a question and now he is deleting it. He said "no good answer, sorry", but I guess between Dr.Delphi, Madshi, martin_G and myself gave the info requested.

My point is that the questions points should be awarded to someone. The guy asked a question and he didnt make up his mind to clarify why any of the answers was correct... We are here to help others and to get help when needed. Its not ethical the behaviour of Zaferms.

best regards
Manuel Lopez (lopem)
0
 

Author Comment

by:zaferms
ID: 7086640
Hi lopem

my q was :
Is there out any component or procedure that could help me converting some of my old *.dcu's back to
*.pas files ?

YOUR ANSWER WAS :
> lopem  Date: 03/03/2002 12:47PM PST  
>Hi Zaferms,
>I dont think you can convert a dcu to a pas file. DCU is >the compiled unit of a pascal unit. So, if
>possible, you would need a disassembly tool. To my best >knowledge, a converter dcu2pas is a nightmare
>to write.
>Best regards,
>Manuel Lopez (lopem)  


So Where is the Answer??? Nothing...
why do you insist to be graded for nothing why.

you say in your answer (I dont think you can convert a dcu to a pas file)

SO What NEXT ... I Know Before I ask The Question and that's what make me to ask the question...
so nothing new you added. so why you want me to grade you or anybody else for no PRACTICAL answer..


>The guy asked a question and he
>didnt make up his mind to clarify why any of the answers >was correct... We are here to help others and
>to get help when needed. Its not ethical the behaviour >of Zaferms.

MY BEHAVIOUR IS NORMAL BUT Yours is not Normal...Sorry to say that.


>Is there out any component or procedure that could help >me converting some of my old *.dcu's back to
>*.pas files ?

DO YOU HAVE SUCH THING ?? ( COMPONENTS OR PROCEDURES?)

WRITE IT HERE OR THE LINK TO IT AND I WILL GRADE YOU.

YOU DO NOT HAVE SUCH THING.. THEN DO NOT BOTHER,,,
ANSWERING THE Q .... SIMPLE IS THAT.
(EASY LIKE SUNDAY MORNING)



>Best regards,
>zaferms  
 

0
 
LVL 3

Expert Comment

by:lopem
ID: 7089530
Zaferms,

I dont even want the points for me. You asked a question about if such component exists. My answer was that I dont think a component of this kind can be build. In some way my answer is no. But, look the other comments... Look at Madshi, DrDelphi or martin_g comments... Any of these answer didnt satisfy you? If you expect (to award the points) a  "yes, there is a component or look at this code"... you're wrong. You can see from the discussion of your question that this task is not practially possible.

As DrDelphi said: "Since you were never going to award the points anyway, why didn't you just make it an 1000? Or 10,000, hell, make it a million!"...

You said you know in advance that such task was not possible. So if this is the case, why you asked then?

My point is very simple: You asked a question and you got some good answers (forget about mine's). Now because there is no such component then you dont award the points to anybody. This is not ethical and not fair.

And something else: if somebody writes this answer: "No, there is no way to build a component to decompile a dcu file to pas"... Would you award the points then? And please, dont take it personal.

best regards,
Manuel Lopez (lopem)
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 3

Expert Comment

by:lopem
ID: 7089590
something else Zaferms, check my question:

   http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=delphi&qid=20281799

I asked the admins to delete it. Nobody gave me an answer... Not even a remark. This is the proper way, I guess, to delete a question (when no answer or even a good remark is giving)... Yo cant play with other people time and help.

Finally, I dont really care about your points. I dont make a living here trying to help other buddies in Delphi. I only think your behaviour is not ethical at all.

best regards
Manuel Lopez (lopem)
0
 
LVL 3

Expert Comment

by:lopem
ID: 7089594
something else Zaferms, check my question:

   http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=delphi&qid=20281799

I asked the admins to delete it. Nobody gave me an answer... Not even a remark. This is the proper way, I guess, to delete a question (when no answer or even a good remark is giving)... Yo cant play with other people time and help.

Finally, I dont really care about your points. I dont make a living here trying to help other buddies in Delphi. I only think your behaviour is not ethical at all.

best regards
Manuel Lopez (lopem)
0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 7090019
Manuel,
  I feel your pain with respect to the other question you cite, but I fail to see what on earth that has to do with this one. Are you planning to pass the rest of your life wasting the experts' time with questions that you never plan to award points for because of it? Is this some sort of infantile attempt to "get even" with all those folks who "wronged" you by not even commenting on your previous question? Do you a little dartboard in your basement with all the names of the Experts on it and every night you stick a dart in a different name? Do folks avoid direct eye contact with you ever since the time you insisted that the clouds in the sky were placed there as part of a quasi-communist plot to derive mankind of the vitamin D which sun's rays supply, ulitmately weakening our eyesight to the point where they could come in and take over entire nations without anyone even seeing them? Are you some sort of twisted (and yet) brilliant non-conformist striving to make the world a better place for all mankind? Or just an idiot?

BTW, to quote someone..

"I only think your behaviour is not ethical at all. "

0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 7090057
My head hangs deep in shame. My aplogies to lopem (Manuel). I completely misread the comments and went off on a tangent with the wrong person. Manuel, te pido desculpas...Zaferms, take what applies from the last comment to heart.


0
 
LVL 3

Expert Comment

by:lopem
ID: 7090074
DrDelphi,

I guess my example of my deleted question was not good at al or I didnt explain myself properlyl. I dont want to take advantage of anybody here. I appreciate EE help all the time. Im sure without it, most of my programming problems could be still stay here with me. I was just making an example about a question I asked and nobody came with even a remark, so I asked admins to delete it. I thinks this is a proper way to ask admins to delete a question not answered. If you see my history you will see I always award the points to the best answer or remark written.

My point was and still is: if you ask a question and you get some remarks about that why do not award it? whats wrong with that?

best wishes
Manuel Lopez (lopem)
0
 
LVL 3

Expert Comment

by:lopem
ID: 7090077
LOL, DrDelphi... no problem at all!

best regards
Manuel Lopez (lopem)
0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 7090158
Thanks, Manuel. BTW, I agree with you up to a point about removing the questions, but I have a few myself that I still hold out hope that somewhere, someday, someone will have an answer for. That's why I just "let 'em ride.." No harm, no foul, right?


-Dave
0
 

Author Comment

by:zaferms
ID: 7093645
Thanks DrDelphi
 I agree with you

> someone will have an answer

sure  there is now in the market a decompiler for visual basic i so it with some guy.

and we have some challange with them that no way to get delphi applications or units (dcu's) to be reverse engeneering  or decompiled..

but may be some one will do it who knows???

besides (Manuel) no harm to discuss such things to show other languages programmers  the beiuty and stringth of lovely delphi.
 
best regards
zaferms.
0
 
LVL 3

Expert Comment

by:lopem
ID: 7093683
Zaferms,

Oh, I forgot to mention that you are avoiding the problem about your question here. In fact, your question has a simple answer: it is not possible to build any converter to decompile a dcu just because when Delphi creates it, the compiler takes off some information from the source code. So any converter will be uncomplete even in the best case and for sure it applies to all modern computer languages.

This is the same story of disassemblers. There is no way to built a perfect disassembler to return back a missing source code.

So what are you going to do? Does any body had a good answer to your question? Are you still going to prove you has no ethics at all? What is in your mind Zaferms? Please explain me.

best regards
Manuel Lopez (lopem)

Ps. I will contact an admin to find out some solution to this dispute. Im not going to fight you any more.
0
 

Author Comment

by:zaferms
ID: 7093723
Thanks Manuel

thanks for your good ethics Manuel

and why you make it a big dispute?

it is a discussion ..  

i want to learn her from a very good people like you
maybe i make mistake  so what. did i harm you?
i'm sorry if i did .

now what you want me to do to make you happy ?

you want me to grade you i will now just say it.
but no hard feelings. please.

best regards
zaferms
0
 
LVL 3

Expert Comment

by:lopem
ID: 7093768
Zaferms,

No, I dont want any of your points. Just award your points to whom you think deserve them. I dont think is ethical to try to delete a question with some good remarks. Many people is using their time and knowledge to help you. You asked a question and you got pretty good remarks. I think its clear why a decompiler of dcu is not possible so your question in some way is answered. You can award the points and grade the answer fairly to whom you want.  Just read the whole question history and be fair with other EE people's time.  Simple as that.

best regards
Manuel Lopez (lopem)
0
 
LVL 3

Expert Comment

by:lopem
ID: 7093777
Zaferms,

Please check my complain to the administrators here:

    http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20313891

Best regards
Manuel Lopez (lopem)
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7093912
Thanks to all the experts here for their ongoing support and for giving of their time to help others.

GOOD NEWS!  Engineering STOPPED the ability to delete questions once comments have been answered effective TODAY!  This type of inequity will now cease.

Questions asked, comments added and points awarded for the help given is the process here.  This is absolutely the case when the results are 1) a way to do it or 2) no it can't be done.... these are "never" valid deletions.

I believe all that need be said here has been said, other than to ask that you, zaferms, please read more about this site and the process and Guidelines/Member agreement posted here:
About the Question and Answer Process:  http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp
Member Agreement/Guidelines and rules: http://www.experts-exchange.com/jsp/infoMemberAgreement.jsp
Help Desk:  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp
News about our Community:  http://www.experts-exchange.com/v3.0/jsp/communityNews.jsp
The ALL TOPICS link:  http://www.experts-exchange.com/jsp/zonesAll.jsp
What's New:  http://www.experts-exchange.com/v3.0/jsp/whatsNew.jsp

When you need site-related help with your questions, need help splitting points between multiple experts,
or deleting an item, post a zero point question here:  (If it involved a specific question, include
the QID (Link/URL).

Community Support link when you need our help:  http://www.experts-exchange.com/commspt/

Grades assigned should be "A" and if the grades given are less than "A", please comment to advise us all of the shortfalls and/or what other information you may have found that can add value to this question now that it has moved to our PAQ.

Experts, thank you again, and if this "B" grade is valid, great, if it needs to be corrected, please let me know.

Thanks,
Moondancer - EE Moderator
0
 
LVL 1

Expert Comment

by:icedraagon
ID: 9566993
There's a utility called DCU2PAS made By Nengwen Zhuo.

Description:
Decompile a D2-D6, K1-K2's dcu (dpu) file to Delphi source as origin as possible, without or with minimal modifications, then recompile to new one under other Delphi versions.

And can be downloaded from:
http://uk.torry.net/tools/developers/compilers/dcu2pas.zip


So far this particular version can extract the procedure and function names with their corresponding parameters and the body is in assembler, yet. Probably future releases would include a full program content.

So, to the question of is there a component of procedure to convert your old dcus to pas: the answer is there is. However, you may ask (or buy) it from the author.

Now since I technically answered that question and also pointed out links to your possible (and maybe only) solution, can I say I deserve to have the points? :-)


0
 
LVL 1

Expert Comment

by:icedraagon
ID: 9567088
There's a utility called DCU2PAS made By Nengwen Zhuo.

Description:
Decompile a D2-D6, K1-K2's dcu (dpu) file to Delphi source as origin as possible, without or with minimal modifications, then recompile to new one under other Delphi versions.

And can be downloaded from:
http://uk.torry.net/tools/developers/compilers/dcu2pas.zip


So far this particular version can extract the procedure and function names with their corresponding parameters and the body is in assembler, yet. Probably future releases would include a full program content.

So, to the question of is there a component of procedure to convert your old dcus to pas: the answer is there is. However, you may ask (or buy) it from the author.

Now since I technically answered that question and also pointed out links to your possible (and maybe only) solution, can I say I deserve to have the points? :-)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now