Changeset 315 in Main for trunk/Server/module.c
- Timestamp:
- Oct 14, 2024, 7:01:02 PM (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/module.c
r313 r315 32 32 #define INCL_DOSERRORS 33 33 #include <os2.h> 34 #elif defined(__NETWARE__) 35 #include <nwadv.h> 36 #include <nwthread.h> 34 37 #else 35 38 #include <windows.h> … … 46 49 #ifdef __OS2__ 47 50 HMODULE mod; 51 #elif defined(__NETWARE__) 52 unsigned int* hnd = malloc(sizeof(*hnd)); 48 53 #endif 49 54 chdir(config.server_root); 50 55 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) 51 56 #ifdef __OS2__ 52 if(DosLoadModule(tmp, 512, path, &mod) != NO_ERROR) {57 if(DosLoadModule(tmp, 512, path, &mod) != NO_ERROR) { 53 58 return NULL; 54 59 } 55 60 lib = (void*)mod; 61 #elif defined(__NETWARE__) 62 *hnd = FindNLMHandle(path); 63 lib = (void*)hnd; 56 64 #else 57 65 lib = LoadLibraryA(path); … … 73 81 void* ret; 74 82 APIRET rc; 75 if((rc = DosQueryProcAddr((HMODULE)mod, 0, sym, (PFN*)&ret)) != NO_ERROR) {83 if((rc = DosQueryProcAddr((HMODULE)mod, 0, sym, (PFN*)&ret)) != NO_ERROR) { 76 84 cm_log("Module", "OS/2 error %d", (int)rc); 77 85 return NULL; 78 86 } 79 87 return ret; 88 #elif defined(__NETWARE__) 89 return ImportSymbol(*(unsigned int*)mod, sym); 80 90 #else 81 91 return GetProcAddress(mod, sym);
Note:
See TracChangeset
for help on using the changeset viewer.