fermium/
loadso.rs

1//! Module for loading "shared objects" (aka dynamic libraries / DLLs).
2
3use crate::{c_char, c_void};
4
5extern "C" {
6  /// This function dynamically loads a shared object and returns a pointer to
7  /// the object handle (or NULL if there was an error).
8  ///
9  /// The `sofile` parameter is a system dependent name of the object file.
10  pub fn SDL_LoadObject(sofile: *const c_char) -> *mut c_void;
11
12  /// Given an object handle, this function looks up the address of the named
13  /// function in the shared object and returns it.
14  ///
15  /// This address is no longer valid after calling [`SDL_UnloadObject`].
16  pub fn SDL_LoadFunction(
17    handle: *mut c_void, name: *const c_char,
18  ) -> *mut c_void;
19
20  /// Unload a shared object from memory.
21  pub fn SDL_UnloadObject(handle: *mut c_void);
22}