ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/tewi/Server/module.c
(Generate patch)

Comparing Server/module.c (file contents):
Revision 1.2 by nishi, Sun Nov 3 10:40:12 2024 UTC vs.
Revision 1.3 by nishi, Tue Nov 19 07:55:13 2024 UTC

# Line 51 | Line 51 | void* tw_module_load(const char* path) {
51   #elif defined(__NETWARE__)
52          unsigned int* hnd = malloc(sizeof(*hnd));
53   #endif
54 + #ifndef WINCE
55          chdir(config.server_root);
56 + #endif
57   #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
58   #ifdef __OS2__
59          if(DosLoadModule(tmp, 512, path, &mod) != NO_ERROR) {
# Line 66 | Line 68 | void* tw_module_load(const char* path) {
68          }
69          lib = (void*)hnd;
70   #else
71 <        lib = LoadLibraryA(path);
71 >        lib = LoadLibrary(path);
72   #endif
73   #else
74          lib = dlopen(path, RTLD_LAZY);
# Line 74 | Line 76 | void* tw_module_load(const char* path) {
76          if(lib == NULL) {
77                  cm_log("Module", "Could not load %s", path);
78          }
79 + #ifndef WINCE
80          chdir(p);
81 + #endif
82          free(p);
83          return lib;
84   }
# Line 91 | Line 95 | void* tw_module_symbol(void* mod, const
95          return ret;
96   #elif defined(__NETWARE__)
97          return ImportSymbol(*(unsigned int*)mod, sym);
98 + #elif defined(WINCE)
99 +        return GetProcAddressW(mod, sym);
100   #else
101          return GetProcAddress(mod, sym);
102   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines