If the dll was compiled with the changes, there's no way to get the old code back from the dll. Consider using source control (like Git, Mercurial, SVN etc.) so this doesn't happen in the future.
"If I can see further than anyone else, it is only because I am standing on the shoulders of giants."blog: www.heartysoft.com twitter: @ashic
If it's a .NET dll, try using Reflector to view decompiled binaries of the dll. If it's not a .NET dll, try searching for a decompilation tool for the language the thing was written in. You may be able to salvage some code in some form using decompilation
tools.
"If I can see further than anyone else, it is only because I am standing on the shoulders of giants."blog: www.heartysoft.com twitter: @ashic
Marked as answer by young345 on Jan 02, 2012 01:41 PM
young345
Member
201 Points
721 Posts
retrieve code from a .dll
Jan 02, 2012 01:11 PM|LINK
hi,
im not sure if this is the correct place to post this, but any help on the matter would be much appreciated.
i have stupidly overwritten a visual basic class module which contained some changes i made in it, therefore i have lost the changes.
the only thing i have is the compiled .dll which was compiled against the version of the code with my changes.
does anyone know how i can retrieve my changes from this .dll? i am using vb6
please, any advise would be much appreciated on this matter as i would prefer not to have to write the code again.
thank you very much
HeartattacK
All-Star
55262 Points
5917 Posts
Moderator
MVP
Re: retrieve code from a .dll
Jan 02, 2012 01:20 PM|LINK
If the dll was compiled with the changes, there's no way to get the old code back from the dll. Consider using source control (like Git, Mercurial, SVN etc.) so this doesn't happen in the future.
blog: www.heartysoft.com
twitter: @ashic
young345
Member
201 Points
721 Posts
Re: retrieve code from a .dll
Jan 02, 2012 01:28 PM|LINK
i didnt really understand your reply, sorry. please can you confirm:
the .dll i have has the changes i want to retrieve from it ie. the code before i over-wrote it.
is there a way of getting it back from this?
thank you
HeartattacK
All-Star
55262 Points
5917 Posts
Moderator
MVP
Re: retrieve code from a .dll
Jan 02, 2012 01:34 PM|LINK
If it's a .NET dll, try using Reflector to view decompiled binaries of the dll. If it's not a .NET dll, try searching for a decompilation tool for the language the thing was written in. You may be able to salvage some code in some form using decompilation tools.
blog: www.heartysoft.com
twitter: @ashic
young345
Member
201 Points
721 Posts
Re: retrieve code from a .dll
Jan 02, 2012 01:41 PM|LINK
i see, yeah i think thats what its looking like i need to do.
thank you very much for your help!
HeartattacK
All-Star
55262 Points
5917 Posts
Moderator
MVP
Re: retrieve code from a .dll
Jan 02, 2012 01:46 PM|LINK
Glad to help. Be sure to use Git / Mercurial as source control from now on so that you can go back to previous versions of code when needed.
blog: www.heartysoft.com
twitter: @ashic