Link to home
Start Free TrialLog in
Avatar of zaferms
zaferms

asked on

convert dcu to pas

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...
Avatar of Manuel Lopez-Michelone
Manuel Lopez-Michelone
Flag of Mexico image

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)
Avatar of Madshi
Madshi

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.
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!!
ASKER CERTIFIED SOLUTION
Avatar of martin_g
martin_g
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zaferms

ASKER

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.

 
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!

 
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)
>> In fact,if you delete the question, your points will be lost anyway.

Are you sure? I didn't thought so...
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)
Avatar of zaferms

ASKER

No Good Answer,,,, Sorry
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 https://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp#8 for instruction on deleting questions.

DanRollins -- EE database cleanup volunteer
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)
Avatar of zaferms

ASKER

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  
 

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)
something else Zaferms, check my question:

   https://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)
something else Zaferms, check my question:

   https://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)
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. "

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.


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)
LOL, DrDelphi... no problem at all!

best regards
Manuel Lopez (lopem)
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
Avatar of zaferms

ASKER

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.
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.
Avatar of zaferms

ASKER

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
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)
Zaferms,

Please check my complain to the administrators here:

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

Best regards
Manuel Lopez (lopem)
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:  https://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp
Member Agreement/Guidelines and rules: https://www.experts-exchange.com/jsp/infoMemberAgreement.jsp
Help Desk:  https://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp
News about our Community:  https://www.experts-exchange.com/v3.0/jsp/communityNews.jsp
The ALL TOPICS link:  https://www.experts-exchange.com/jsp/zonesAll.jsp
What's New:  https://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:  https://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
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? :-)


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? :-)