diff options
| author | Konstantin <const@const.me> | 2023-01-16 14:52:43 +0100 |
|---|---|---|
| committer | Konstantin <const@const.me> | 2023-01-16 14:52:43 +0100 |
| commit | 8c4603c73675958efc960fbd4bb599a2909d106a (patch) | |
| tree | 714dc6fc9a1672d5fd7f89676b97e10959662abc /Whisper/DllMain.cpp | |
| parent | 990a8d0dbaefc996244097397259e92758b15cce (diff) | |
Source codes
Diffstat (limited to 'Whisper/DllMain.cpp')
| -rw-r--r-- | Whisper/DllMain.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Whisper/DllMain.cpp b/Whisper/DllMain.cpp new file mode 100644 index 0000000..4746d98 --- /dev/null +++ b/Whisper/DllMain.cpp @@ -0,0 +1,27 @@ +#include "stdafx.h" + +BOOL __stdcall DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) +{ + // Perform actions based on the reason for calling. + switch( fdwReason ) + { + case DLL_PROCESS_ATTACH: + // Initialize once for each new process. Return FALSE to fail DLL load. + DisableThreadLibraryCalls( (HMODULE)hinstDLL ); + break; + case DLL_THREAD_ATTACH: + // Do thread-specific initialization. + break; + case DLL_THREAD_DETACH: + // Do thread-specific cleanup. + break; + case DLL_PROCESS_DETACH: + if( lpvReserved != nullptr ) + { + break; // do not do cleanup if process termination scenario + } + // Perform any necessary cleanup + break; + } + return TRUE; // Successful DLL_PROCESS_ATTACH. +}
\ No newline at end of file |
