diff options
| author | gingerBill <bill@gingerbill.org> | 2020-06-26 19:11:34 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-06-26 19:11:34 +0100 |
| commit | 6bd05ef5d7381f8b24a40f7df2d72c62d11a8f21 (patch) | |
| tree | 8c25194d2aa896c4e4dd27f5ff265957c4d265be /core/dynlib | |
| parent | 251a3a690ed97be9582a4ca10000c4475bbef5fc (diff) | |
Begin migration from sys/win32 to sys/windows
Diffstat (limited to 'core/dynlib')
| -rw-r--r-- | core/dynlib/lib_windows.odin | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/dynlib/lib_windows.odin b/core/dynlib/lib_windows.odin index cabd4b4cc..a0d91f4c0 100644 --- a/core/dynlib/lib_windows.odin +++ b/core/dynlib/lib_windows.odin @@ -1,25 +1,25 @@ // +build windows package dynlib -import "core:sys/win32" +import win32 "core:sys/windows" import "core:strings" load_library :: proc(path: string, global_symbols := false) -> (Library, bool) { // NOTE(bill): 'global_symbols' is here only for consistency with POSIX which has RTLD_GLOBAL wide_path := win32.utf8_to_wstring(path, context.temp_allocator); - handle := cast(Library)win32.load_library_w(wide_path); + handle := cast(Library)win32.LoadLibraryW(wide_path); return handle, handle != nil; } unload_library :: proc(library: Library) -> bool { - ok := win32.free_library(cast(win32.Hmodule)library); + ok := win32.FreeLibrary(cast(win32.HMODULE)library); return bool(ok); } symbol_address :: proc(library: Library, symbol: string) -> (ptr: rawptr, found: bool) { c_str := strings.clone_to_cstring(symbol, context.temp_allocator); - ptr = win32.get_proc_address(cast(win32.Hmodule)library, c_str); + ptr = win32.GetProcAddress(cast(win32.HMODULE)library, c_str); found = ptr != nil; return; } |