diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2024-01-06 02:04:09 +0100 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2024-01-06 02:04:09 +0100 |
| commit | 649b5fa528834a973c19a0624025970946bc6fd0 (patch) | |
| tree | 8bf5eb9e78b9d3bc35d5d435ea98c74fb618dd7b /core/dynlib/example | |
| parent | d6a89d667dc2dacdc760838cd489c3832b00b8f7 (diff) | |
Add bool return to `dynlib.initialize_symbols`.
Diffstat (limited to 'core/dynlib/example')
| -rw-r--r-- | core/dynlib/example/example.odin | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/dynlib/example/example.odin b/core/dynlib/example/example.odin index 7a6368d59..78b14f5c0 100644 --- a/core/dynlib/example/example.odin +++ b/core/dynlib/example/example.odin @@ -24,9 +24,9 @@ main :: proc() { // Load symbols from `lib.dll` into Symbols struct. // Each struct field is prefixed with `foo_` before lookup in the DLL's symbol table. // The library's Handle (to unload) will be stored in `sym._my_lib_handle`. This way you can load multiple DLLs in one struct. - count := dynlib.initialize_symbols(&sym, "lib.dll", "foo_", "_my_lib_handle") + count, ok := dynlib.initialize_symbols(&sym, "lib.dll", "foo_", "_my_lib_handle") defer dynlib.unload_library(sym._my_lib_handle) - fmt.printf("%v symbols loaded from lib.dll (%p).\n", count, sym._my_lib_handle) + fmt.printf("ok: %v. %v symbols loaded from lib.dll (%p).\n", ok, count, sym._my_lib_handle) if count > 0 { fmt.println("42 + 42 =", sym.add(42, 42)) |