From 8666c391e84c28094234cd70d427487349dcd569 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Fri, 15 Apr 2016 09:03:17 -0300 Subject: [PATCH] Testando em windows. --- src/classlib/session.cc | 6 ++++-- src/plugins/rx3270/rxapimain.cc | 44 -------------------------------------------- 2 files changed, 4 insertions(+), 46 deletions(-) diff --git a/src/classlib/session.cc b/src/classlib/session.cc index f473598..dc8fc0d 100644 --- a/src/classlib/session.cc +++ b/src/classlib/session.cc @@ -71,16 +71,18 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - switch(reason) + switch(fdwReason) { case DLL_PROCESS_ATTACH: session::init(); break; - case DLL_PROCESS_DETACH + case DLL_PROCESS_DETACH: session::deinit(); break; } + + return TRUE; } #endif // _WIN32 diff --git a/src/plugins/rx3270/rxapimain.cc b/src/plugins/rx3270/rxapimain.cc index 0568a5a..d1dfb9c 100644 --- a/src/plugins/rx3270/rxapimain.cc +++ b/src/plugins/rx3270/rxapimain.cc @@ -45,54 +45,10 @@ #include -#if defined WIN32 - BOOL WINAPI DllMain(HANDLE hinst, DWORD dwcallpurpose, LPVOID lpvResvd); - static int librx3270_loaded(void); - static int librx3270_unloaded(void); -#else - - int librx3270_loaded(void) __attribute__((constructor)); - int librx3270_unloaded(void) __attribute__((destructor)); -#endif - /*--[ Globals ]--------------------------------------------------------------------------------------*/ -// LIB3270_EXPORT RexxRoutineEntry rx3270_functions[]; -// LIB3270_EXPORT RexxPackageEntry rx3270_package_entry; - /*--[ Implement ]------------------------------------------------------------------------------------*/ -#if defined WIN32 -BOOL WINAPI DllMain(HANDLE hinst, DWORD dwcallpurpose, LPVOID lpvResvd) -{ -// Trace("%s - Library %s",__FUNCTION__,(dwcallpurpose == DLL_PROCESS_ATTACH) ? "Loaded" : "Unloaded"); - - switch(dwcallpurpose) - { - case DLL_PROCESS_ATTACH: - librx3270_loaded(); - break; - - case DLL_PROCESS_DETACH: - librx3270_unloaded(); - break; - } - return TRUE; -} -#endif - -int librx3270_loaded(void) -{ - trace("%s",__FUNCTION__); - return 0; -} - -int librx3270_unloaded(void) -{ - trace("%s",__FUNCTION__); - return 0; -} - // now build the actual entry list RexxRoutineEntry rx3270_functions[] = { -- libgit2 0.21.2