谢谢

解决方案 »

  1.   

    再DllMain中处理DLL_PROCESS_DETACH事件,然后按照下面的方法,只是把删除的文件改成你的dll
    http://www.codeguru.com/win32/SelfDel.html
    Win32 Self-Deletion Function - Tony Varnas (2003/06/09)
    Use this method to create a self-deleting executable This works by invoking the command shell as a serialized process to delete the program file. (The article and source code were updated.)