Skip to content

Commit

Permalink
Fix windows build for dllmain
Browse files Browse the repository at this point in the history
Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
  • Loading branch information
nrspruit committed Nov 15, 2024
1 parent 222da8e commit 19acc7e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions source/lib/windows/lib_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,7 @@

namespace ze_lib
{
#ifdef DYNAMIC_LOAD_LOADER
export "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
if (fdwReason == DLL_PROCESS_DETACH) {
delete context;
} else if (fdwReason == DLL_PROCESS_ATTACH) {
context = new context_t;
}
return TRUE;
}
#else
#ifndef DYNAMIC_LOAD_LOADER
extern "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
if (fdwReason == DLL_PROCESS_DETACH) {
delete context;
Expand Down

0 comments on commit 19acc7e

Please sign in to comment.