Frees a previously loaded module from memory, it can no longer be used Returns true on success, false otherwise
| 387 | // Frees a previously loaded module from memory, it can no longer be used |
| 388 | // Returns true on success, false otherwise |
| 389 | bool mod_FreeModule(module *handle) { |
| 390 | bool ret = true; |
| 391 | |
| 392 | if (!handle) { |
| 393 | ModLastError = MODERR_INVALIDHANDLE; |
| 394 | return false; |
| 395 | } |
| 396 | if (!handle->handle) { |
| 397 | ModLastError = MODERR_OTHER; |
| 398 | return false; |
| 399 | } |
| 400 | #if defined(WIN32) |
| 401 | ret = (FreeLibrary(handle->handle) != 0); |
| 402 | #elif defined(POSIX) |
| 403 | dlclose(handle->handle); // dlclose() returns an int, but no docs say what values!!! |
| 404 | #endif |
| 405 | handle->handle = NULL; |
| 406 | return ret; |
| 407 | } |
| 408 | // Returns a pointer to a function within a loaded module. If it returns NULL there was an error. Check |
| 409 | // mod_GetLastError to see if there was an error symstr is the name of the function you want to get the symbol for (Do |
| 410 | // NOT give any pre/suffix to this name) parmbytes is the size (in bytes) of the parameter list the function should have |
no outgoing calls
no test coverage detected