dynlib: unload library before loading again & add LIBRARY_FILE_EXTENSION constant

This commit is contained in:
Laytan Laats
2024-11-28 21:08:08 +01:00
parent 276928170c
commit 1cece52359
5 changed files with 39 additions and 21 deletions
+2
View File
@@ -8,6 +8,8 @@ import win32 "core:sys/windows"
import "core:strings"
import "core:reflect"
_LIBRARY_FILE_EXTENSION :: "dll"
_load_library :: proc(path: string, global_symbols: bool, allocator: runtime.Allocator) -> (Library, bool) {
// NOTE(bill): 'global_symbols' is here only for consistency with POSIX which has RTLD_GLOBAL
wide_path := win32.utf8_to_wstring(path, allocator)