test dll changes

This commit is contained in:
Jettford
2024-12-04 18:53:04 +00:00
parent 80d3baa886
commit 983a5ec634
22 changed files with 522 additions and 9 deletions

View 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
View 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.
}