Commit 8666c391e84c28094234cd70d427487349dcd569
1 parent
3447b576
Exists in
master
and in
5 other branches
Testando em windows.
Showing
2 changed files
with
4 additions
and
46 deletions
Show diff stats
src/classlib/session.cc
... | ... | @@ -71,16 +71,18 @@ |
71 | 71 | |
72 | 72 | BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) |
73 | 73 | { |
74 | - switch(reason) | |
74 | + switch(fdwReason) | |
75 | 75 | { |
76 | 76 | case DLL_PROCESS_ATTACH: |
77 | 77 | session::init(); |
78 | 78 | break; |
79 | 79 | |
80 | - case DLL_PROCESS_DETACH | |
80 | + case DLL_PROCESS_DETACH: | |
81 | 81 | session::deinit(); |
82 | 82 | break; |
83 | 83 | } |
84 | + | |
85 | + return TRUE; | |
84 | 86 | } |
85 | 87 | |
86 | 88 | #endif // _WIN32 | ... | ... |
src/plugins/rx3270/rxapimain.cc
... | ... | @@ -45,54 +45,10 @@ |
45 | 45 | |
46 | 46 | #include <string.h> |
47 | 47 | |
48 | -#if defined WIN32 | |
49 | - BOOL WINAPI DllMain(HANDLE hinst, DWORD dwcallpurpose, LPVOID lpvResvd); | |
50 | - static int librx3270_loaded(void); | |
51 | - static int librx3270_unloaded(void); | |
52 | -#else | |
53 | - | |
54 | - int librx3270_loaded(void) __attribute__((constructor)); | |
55 | - int librx3270_unloaded(void) __attribute__((destructor)); | |
56 | -#endif | |
57 | - | |
58 | 48 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
59 | 49 | |
60 | -// LIB3270_EXPORT RexxRoutineEntry rx3270_functions[]; | |
61 | -// LIB3270_EXPORT RexxPackageEntry rx3270_package_entry; | |
62 | - | |
63 | 50 | /*--[ Implement ]------------------------------------------------------------------------------------*/ |
64 | 51 | |
65 | -#if defined WIN32 | |
66 | -BOOL WINAPI DllMain(HANDLE hinst, DWORD dwcallpurpose, LPVOID lpvResvd) | |
67 | -{ | |
68 | -// Trace("%s - Library %s",__FUNCTION__,(dwcallpurpose == DLL_PROCESS_ATTACH) ? "Loaded" : "Unloaded"); | |
69 | - | |
70 | - switch(dwcallpurpose) | |
71 | - { | |
72 | - case DLL_PROCESS_ATTACH: | |
73 | - librx3270_loaded(); | |
74 | - break; | |
75 | - | |
76 | - case DLL_PROCESS_DETACH: | |
77 | - librx3270_unloaded(); | |
78 | - break; | |
79 | - } | |
80 | - return TRUE; | |
81 | -} | |
82 | -#endif | |
83 | - | |
84 | -int librx3270_loaded(void) | |
85 | -{ | |
86 | - trace("%s",__FUNCTION__); | |
87 | - return 0; | |
88 | -} | |
89 | - | |
90 | -int librx3270_unloaded(void) | |
91 | -{ | |
92 | - trace("%s",__FUNCTION__); | |
93 | - return 0; | |
94 | -} | |
95 | - | |
96 | 52 | // now build the actual entry list |
97 | 53 | RexxRoutineEntry rx3270_functions[] = |
98 | 54 | { | ... | ... |