summaryrefslogtreecommitdiffstats
path: root/Whisper/DllMain.cpp
diff options
context:
space:
mode:
authorKonstantin <const@const.me>2023-01-16 14:52:43 +0100
committerKonstantin <const@const.me>2023-01-16 14:52:43 +0100
commit8c4603c73675958efc960fbd4bb599a2909d106a (patch)
tree714dc6fc9a1672d5fd7f89676b97e10959662abc /Whisper/DllMain.cpp
parent990a8d0dbaefc996244097397259e92758b15cce (diff)
Source codes
Diffstat (limited to 'Whisper/DllMain.cpp')
-rw-r--r--Whisper/DllMain.cpp27
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