mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
test dll changes
This commit is contained in:
7
dLocalServer/CMakeLists.txt
Normal file
7
dLocalServer/CMakeLists.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
set(DLOCAL_SERVER_SOURCES
|
||||
"dllmain.cpp"
|
||||
)
|
||||
|
||||
add_library(dLocalServer OBJECT ${DLOCAL_SERVER_SOURCES})
|
||||
|
||||
target_link_libraries(dLocalServer)
|
32
dLocalServer/dllmain.cpp
Normal file
32
dLocalServer/dllmain.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include <windows.h>
|
||||
|
||||
BOOL WINAPI DllMain(
|
||||
HINSTANCE hinstDLL, // handle to DLL module
|
||||
DWORD fdwReason, // reason for calling function
|
||||
LPVOID lpvReserved) // reserved
|
||||
{
|
||||
// Perform actions based on the reason for calling.
|
||||
switch (fdwReason) {
|
||||
case DLL_PROCESS_ATTACH:
|
||||
|
||||
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.
|
||||
}
|
Reference in New Issue
Block a user