We deliver solutions for the AI eraâcombining symbolic computation, data-driven insights and deep technical expertise
ForeignFunctionLoad[lib,fun,{argtype1,argtype2,…}rettype]
loads the function fun with the specified argument and output types from the library lib.
ForeignFunctionLoad[ptr,{argtype1,argtype2,…}rettype]
creates a foreign function from the function pointer ptr.
DetailsLoad a function from a library:
Applications (2)Create a foreign function for the RAND_bytes function from OpenSSL:
Create a buffer into which the random bytes can be written:
Generate the random bytes by calling RAND_bytes:
The foreign function is very efficient:
Implement SHA256 using OpenSSL:
Create a buffer containing the plaintext to hash:
Create a buffer into which to write the hash:
Read the results from the ciphertext buffer:
Compare with the built-in function Hash:
The packaged function is very efficient:
Properties & Relations (1)ForeignFunctionLoad can generally create callable links to libraries faster than custom links can be compiled:
However, the custom compiled versions can have less overhead:
Wolfram Research (2023), ForeignFunctionLoad, Wolfram Language function, https://reference.wolfram.com/language/ref/ForeignFunctionLoad.html. TextWolfram Research (2023), ForeignFunctionLoad, Wolfram Language function, https://reference.wolfram.com/language/ref/ForeignFunctionLoad.html.
CMSWolfram Language. 2023. "ForeignFunctionLoad." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ForeignFunctionLoad.html.
APAWolfram Language. (2023). ForeignFunctionLoad. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ForeignFunctionLoad.html
BibTeX@misc{reference.wolfram_2025_foreignfunctionload, author="Wolfram Research", title="{ForeignFunctionLoad}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/ForeignFunctionLoad.html}", note=[Accessed: 17-August-2025]}
BibLaTeX@online{reference.wolfram_2025_foreignfunctionload, organization={Wolfram Research}, title={ForeignFunctionLoad}, year={2023}, url={https://reference.wolfram.com/language/ref/ForeignFunctionLoad.html}, note=[Accessed: 17-August-2025]}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4