المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : C# UnPacking Executables



C# Programming
11-16-2009, 01:12 AM
I need some help with a project im making it is pretty much a file archive system. It has the files in a single text file the file data is enclosed inside a head and a foot to identify it. which looks like this:

##:START:(FILENAME):(FILEDESTINATION):(FILESIZE):##

##:END--:(FILENAME):(FILEDESTINATION):(FILESIZE):##

the unpacker looks through the files and reads that data between the head and the foot and writes it into the destination directory it works for plain text files fine but when it comes to Executables the extracted file doesnt run and it has no icon anymore. Im using Encoding.Default to read and write all the data. Is there something im missing i think its possibly that the Encoding isn't quite right. When i open the exe in notepad and click save as it says its ANSI but that doesnt exist as a encoding type in Encoding.* would this be the problem?