Windows self-removal programs and DLLs
Refer to Article http://blog.csdn.net/rxxi/article/details/741557
Did a self-removal program selfdelete. Code download (my FTP server, username password =pub):
Ftp://pub:[email protected]/tarball/selfdelete_vs2010.tar.gz
It contains 2 items, one is SelfDel32, this is a dynamic link library project, and the generated SelfDel32.dll is
that we need. Regardless of whether the program using this DLL is 32 or 64 bits, only the Win32\release SelfDel32.dll is required.
The Selfdel32\dist directory below is all the resources that other programs need to use.
The Selfdelapp project is an example program that uses the selfdel32\dist. The place that was actually called was in SelfDelApp.cpp,
Callselfdelete#include ". \selfdel32\dist\selfdeldll.h "... Case Wm_destroy: postquitmessage (0); Delete this app callselfdelete (hInst); break;
Test:
Click on the generated SelfDelApp.exe program, then close and you can see that the program itself has been deleted.
Windows self-removal programs and DLLs