ForeignPointerLookup
ForeignPointerLookup[lib,fun]
returns the pointer to the function fun in the library lib.
Details

- ForeignPointerLookup returns an OpaqueRawPointer.
- lib is resolved with FindLibrary.
- lib must be a C-compatible dynamic library.
- ForeignPointerLookup is analogous to dlsym on Unix-type systems, and GetProcAddress on Windows.
Examples
open allclose allBasic Examples (1)
Get the pointer to a function in a library:
Load the ForeignFunction by specifying an appropriate type:
Scope (1)
ForeignPointerLookup uses FindLibrary to locate libraries:
Alternatively, find the library once with FindLibrary and pass it to ForeignPointerLookup:
Applications (1)
Properties & Relations (1)
Get the pointer to a function in a library:
Load the ForeignFunction by specifying an appropriate type:
Alternatively, this can be accomplished with a single ForeignFunctionLoad call:
Possible Issues (2)
ForeignPointerLookup will return a Failure if the library cannot be found:

ForeignPointerLookup will return a Failure if the function pointer cannot be found in the library:

Text
Wolfram Research (2023), ForeignPointerLookup, Wolfram Language function, https://reference.wolfram.com/language/ref/ForeignPointerLookup.html.
CMS
Wolfram Language. 2023. "ForeignPointerLookup." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ForeignPointerLookup.html.
APA
Wolfram Language. (2023). ForeignPointerLookup. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ForeignPointerLookup.html