| 954 | static cc_bool loadingPlugin; |
| 955 | |
| 956 | void* DynamicLib_Load2(const cc_string* path) { |
| 957 | static cc_string plugins_dir = String_FromConst("plugins/"); |
| 958 | cc_filepath str; |
| 959 | void* lib; |
| 960 | |
| 961 | Platform_EncodePath(&str, path); |
| 962 | loadingPlugin = String_CaselessStarts(path, &plugins_dir); |
| 963 | |
| 964 | if ((lib = LoadLibraryW(str.uni))) return lib; |
| 965 | dynamicErr = GetLastError(); |
| 966 | if (dynamicErr != ERROR_CALL_NOT_IMPLEMENTED) return NULL; |
| 967 | |
| 968 | /* Windows 9x only supports A variants */ |
| 969 | lib = LoadLibraryA(str.ansi); |
| 970 | if (!lib) dynamicErr = GetLastError(); |
| 971 | return lib; |
| 972 | } |
| 973 | |
| 974 | void* DynamicLib_Get2(void* lib, const char* name) { |
| 975 | void* addr = GetProcAddress((HMODULE)lib, name); |
nothing calls this directly
no test coverage detected