Struct libloading::os::windows::Library
[−]
[src]
pub struct Library(_);
A platform-specific equivalent of the cross-platform Library
.
Methods
impl Library
[src]
fn new<P: AsRef<OsStr>>(filename: P) -> Result<Library>
Find and load a shared library (module).
Corresponds to LoadLibraryW(filename)
.
unsafe fn get<T>(&self, symbol: &[u8]) -> Result<Symbol<T>>
Get a pointer to function or static variable by symbol name.
The symbol
may not contain any null bytes, with an exception of last byte. A null
terminated symbol
may avoid a string allocation in some cases.
Symbol is interpreted as-is; no mangling is done. This means that symbols like x::y
are
most likely invalid.
Unsafety
Pointer to a value of arbitrary type is returned. Using a value with wrong type is undefined.
unsafe fn get_ordinal<T>(&self, ordinal: WORD) -> Result<Symbol<T>>
Get a pointer to function or static variable by ordinal number.
Unsafety
Pointer to a value of arbitrary type is returned. Using a value with wrong type is undefined.