Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am creating some function in class library, which generates the .dll file.
My question is Can I read the source code of dll file?
Posted
Updated 12-Apr-11 0:11am
v2
Comments
Dalek Dave 12-Apr-11 6:11am    
Edited for Grammar and Readability.

You can - sort off - but if you created the DLL in the first place, what happened to the source?
How good will it be? Depends: did you obfuscate your DLL?

Look at Reflector on Google.
 
Share this answer
 
Comments
Rakesh From Patna 12-Apr-11 6:21am    
I am dll is use in program so dll available for me. but source of dll file is deleted in my computer. now i want to enhance the property in dll. so any idea i retrieve the source of my dll file.
Manfred Rudolf Bihy 12-Apr-11 6:27am    
You heard the man! Google for "Reflector" that will help you. The quality of the recovered source code will suffer though if the DLL was obfuscated.
Manfred Rudolf Bihy 12-Apr-11 6:32am    
Just went to their site and got a little shock. The mofos at red-gate decided that that it is now a commercial product, albeit at a low price (for me at least). I kind of saw it coming when they swallowed Reflector, but I had hoped that would not happen. A 5+ anyhow!
Sergey Alexandrovich Kryukov 12-Apr-11 13:03pm    
Agree, vote of 5.
To me, what matters is not the price (which is affordable) but the absence of open source.
--SA
Sergey Alexandrovich Kryukov 12-Apr-11 13:15pm    
Actually I added my Answer arguing over entropy. Please see. My conclusions may seem shocking, but it's better to be realistic. :-)
--SA
I'm sorry for the bitter advice, but it's better to be realistic that suffer later.

If you the source code is yours and you deleted the only available copy of source code, you should discontinue using it right away, even if you did not want any improvement. Using the binary means supporting false sense of safety. You only can use the code if you can reproduce it again — download from the creator of it or rebuild it. Stop developing anything without using some revision control system!

What to do now? Read my lips:
You have to develop this DLL again! Or give up using it completely.
It can be even useful for you. Good big quality product deserved developing it twice; second time you use your positive and negative experience of your first attempt. Sorry you did not like it. By the way, even the best generator of the code will not get you what you want. You can always disassemble your DLL in IL though, but what's the use? Did you ever heard of entropy and irreversable functions. Building a binary from source and deleting source increase the entropy. This is irreversable.

You need to develop it again. Doing anything else or pretending anything else would soon help you puts your development to risk. Sorry again.

Good luck,
—SA
 
Share this answer
 
v2
Comments
OriginalGriff 12-Apr-11 14:34pm    
Good suggestion. Bet he doesn't though ;)
Sergey Alexandrovich Kryukov 12-Apr-11 14:44pm    
My thing is just to tell :-)
Thank you Griff.
--SA
Espen Harlinn 12-Apr-11 15:29pm    
Good point, reflector may actually help recreating some of the code :)
Sergey Alexandrovich Kryukov 12-Apr-11 16:28pm    
Thank you Espen.
True, but this is still reverse engineering, in the case when it should not have been happen.
My point is avoiding the illusion that the code is still owned; it's conceptually lost when a source code is lost.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900