C # import DLLs into EXE Z

Source: Internet
Author: User
Tags dotnet

With a 3-tier architecture, there are many DLL files under the running directory, and I intend to merge the DLL files into the exe file when it is finally released. Microsoft released the free software ilmerge can do this work, studied, and its usage is as follows:

1. Merging File1.dll, File2.dll to Destination.dll

Ilmerge/ndebug/target:dll/out:c:\destination.dll/log C:\file1.dll C:\file2.dll

2. Merging File1.dll, File2.dll and MyApp.exe to NewApp.exe

Ilmerge/ndebug/target:winexe/out:c:\newapp.exe/log C:\myapp.exe C:\file1.dll C:\file2.dll

Note: When merging to EXE, Myapp.exe must be written in front of File1.dll, File2.dll

When you are finished, you get an EXE file, and if you want to do something evil, you can merge some cracked software DLLs into your EXE. The premise is that all DLLs are managed and will fail if you try to merge DLLs written by C + +. There is a tool called Mergebin.exe, which can merge both managed and unmanaged DLLs, and the usage I haven't studied yet seems to be more difficult to look at. This tool is written by the author of the ADO 2.0 Data Provider for SQLite, whose System.Data.SQLite.dll can be referenced by the dotnet program, and can be called directly by C + + programs. This DLL is a managed and unmanaged mixed DLL, and sure enough! Mergebin.exe in its source package, interested friends can study.

Continue to the evil topic, if your EXE is merged with cracked DLLs, you may not want to let others know, or you don't want others to decompile your EXE files. Confusing software is a charge, and after confusing the method is still visible, but the name is no rule, no way, no use. Or the shell comes directly, we have to find a very cow shell software. To recommend a software, called Sixxpack, specifically Shell dotnet program, the current version of Sixxpack22, the requirements of the machine is installed. netframework2.0 above version. The Sixxpack, in addition to the shell, also uses compression technology with a maximum compression ratio of up to 80%. Sixxpack is free software.

After Sixxpack shell, with reflector open EXE file, haha, see Forever is just a actmp.dll information, which contains 4 7zip namespace and a Sixxpack namespace, the anti-compilation of these things is not useful. Oh, the original is compressed with 7zip, no wonder that the high compression ratio.

One problem is that, after processing the assembly with Sixxpack, the version information is 0.0.0.0 and the other information is incorrect. It doesn't matter, use resource hacker to modify just OK! Resource Hacker is also free software, the official website is: http://angusj.com/resourcehacker/

I this small project in order to beautify the interface, with some evil things, the final EXE file around 5MB, with sixxpack processing, the volume dropped to less than 2MB, running with little performance loss. The most important, it is difficult to decompile, you can rest assured that the use of others.

C # import DLLs into EXE Z

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.