windows-nt/Source/XPSP1/NT/windows/appcompat/shims/general/terminateexe.cpp
2020-09-26 16:20:57 +08:00

64 lines
769 B
C++

/*++
Copyright (c) 2001 Microsoft Corporation
Module Name:
TerminateExe.cpp
Abstract:
This shim terminates an exe on startup. (Die Die DIE!!!)
Notes:
This is a general purpose shim.
History:
05/01/2001 mnikkel Created
--*/
#include "precomp.h"
IMPLEMENT_SHIM_BEGIN(TerminateExe)
#include "ShimHookMacro.h"
APIHOOK_ENUM_BEGIN
APIHOOK_ENUM_END
BOOL
NOTIFY_FUNCTION(
DWORD fdwReason)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
DPFN( eDbgLevelSpew, "Terminating Exe.\n");
ExitProcess(0);
break;
default:
break;
}
return TRUE;
}
/*++
Register hooked functions
--*/
HOOK_BEGIN
CALL_NOTIFY_FUNCTION
HOOK_END
IMPLEMENT_SHIM_END