HyperDbg/hyperdbg/libhyperdbg/code/app/dllmain.cpp

46 lines
1.1 KiB
C++
Raw Permalink Normal View History

2020-04-11 08:27:51 -07:00
/**
* @file dllmain.cpp
2022-01-18 22:38:56 +03:30
* @author Sina Karvandi (sina@hyperdbg.org)
2020-04-11 08:27:51 -07:00
* @brief Defines the entry point for the DLL application
* @details
* @version 0.1
* @date 2020-04-11
2020-05-27 12:09:57 -07:00
*
2020-04-11 08:27:51 -07:00
* @copyright This project is released under the GNU Public License v3.
2020-05-27 12:09:57 -07:00
*
2020-04-11 08:27:51 -07:00
*/
#include "pch.h"
2020-03-26 11:02:50 -07:00
2026-07-18 17:09:52 +02:00
//
// DllMain is the Windows DLL loader entry point (called by the OS loader, not by
// any HyperDbg code). It has no Linux equivalent — a Linux shared object has no
// such per-process/per-thread attach/detach callback, and this body does nothing
// anyway — so the whole thing is Windows-only. On Linux this translation unit is
// intentionally empty.
//
#ifdef _WIN32
2020-04-11 08:27:51 -07:00
/**
2020-04-11 10:28:37 -07:00
* @brief Dll Main Entry
2020-05-27 12:09:57 -07:00
*
* @param hModule
* @param ul_reason_for_call
* @param lpReserved
* @return BOOL DllMain
2020-04-11 08:27:51 -07:00
*/
2021-03-22 18:19:39 +04:30
BOOL APIENTRY
DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
2020-03-26 11:02:50 -07:00
}
2026-07-18 17:09:52 +02:00
#endif // _WIN32