Created
November 16, 2019 14:47
-
-
Save vmcall/92c1710d23697bdcc644e5f4c94db3f9 to your computer and use it in GitHub Desktop.
Dynamic Link Library (DLL) entrypoint without Windows bloat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdint> | |
constexpr auto REASON_PROCESS_ATTACH = 1; | |
constexpr auto REASON_PROCESS_DETACH = 0; | |
std::uint32_t __stdcall DllMain(const void* mod_instance, const std::uint32_t call_reason, const void* reserved) | |
{ | |
switch (call_reason) | |
{ | |
case REASON_PROCESS_ATTACH: | |
break; | |
case REASON_PROCESS_DETACH: | |
break; | |
} | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment