Osiris_FindLoadedModule Purpose: Given the name of a module, it returns the id of a loaded OSIRIS module. -1 if it isn't loaded.
| 769 | // Purpose: |
| 770 | // Given the name of a module, it returns the id of a loaded OSIRIS module. -1 if it isn't loaded. |
| 771 | int Osiris_FindLoadedModule(char *module_name) { |
| 772 | // search through the list of loaded modules and see if we can find a match |
| 773 | // strip off the extension |
| 774 | char real_name[_MAX_PATH]; |
| 775 | ddio_SplitPath(module_name, NULL, real_name, NULL); |
| 776 | |
| 777 | int i; |
| 778 | for (i = 0; i < MAX_LOADED_MODULES; i++) { |
| 779 | if (OSIRIS_loaded_modules[i].flags & OSIMF_INUSE) { |
| 780 | if (OSIRIS_loaded_modules[i].module_name && (!stricmp(OSIRIS_loaded_modules[i].module_name, real_name))) { |
| 781 | // we found a match |
| 782 | return i; |
| 783 | } |
| 784 | } |
| 785 | } |
| 786 | |
| 787 | return -1; |
| 788 | } |
| 789 | |
| 790 | // Osiris_UnloadModule |
| 791 | // Purpose: |
no test coverage detected