W
wonhunter
Unregistered / Unconfirmed
GUEST, unregistred user!
我在网上搜索了下 发现该方法不成功啊? 为啥呢?procedure deleteSelf;var hModule: THandle;szModuleName: array[0..MAX_PATH] of char;hKrnl32: THandle;pExitProcess, pdeleteFile, pFreeLibrary, pUnmapViewOfFile: pointer;ExitCode: UINT;beginhModule := GetModuleHandle(nil);GetModuleFileName(hModule, szModuleName, sizeof(szModuleName));hKrnl32 := GetModuleHandle('kernel32');pExitProcess := GetProcAddress(hKrnl32, 'ExitProcess');pdeleteFile := GetProcAddress(hKrnl32, 'DeleteFileA');pFreeLibrary := GetProcAddress(hKrnl32, 'FreeLibrary');pUnmapViewOfFile := GetProcAddress(hKrnl32, 'UnmapViewOfFile');ExitCode := system.ExitCode;CloseHandle(THANDLE(4));asmlea eax, szModuleNamepush ExitCodepush 0push eaxpush pExitProcesspush hModulepush pdeleteFilepush pUnmapViewOfFileretendend;系统是XP