OpaqueRawPointer
✖
OpaqueRawPointer
Details

- RawPointer can be used to represent typed pointers.
- OpaqueRawPointer[ptr] can be used to cast a pointer to an untyped pointer.
- Information for an OpaqueRawPointer may include the following properties:
-
"Address" memory address - Properties can be accessed with OpaqueRawPointer[…][prop].
- Properties that can be extracted include all Information properties listed above.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Get the pointer to a function in a library:

https://wolfram.com/xid/0d4mjmxkngc6v51y-dix5ow

This pointer can be used to load a foreign function:

https://wolfram.com/xid/0d4mjmxkngc6v51y-vijdmn


https://wolfram.com/xid/0d4mjmxkngc6v51y-difhb6

Scope (1)Survey of the scope of standard use cases
Information (1)
Get the pointer to a function in a library:

https://wolfram.com/xid/0d4mjmxkngc6v51y-foy396

Get Information about the pointer:

https://wolfram.com/xid/0d4mjmxkngc6v51y-mffoz6

Get the memory address of the pointer:

https://wolfram.com/xid/0d4mjmxkngc6v51y-8buros

Properties & Relations (3)Properties of the function, and connections to other functions
NullRawPointerQ returns True if an opaque raw pointer has 0 as its address:

https://wolfram.com/xid/0d4mjmxkngc6v51y-o7h4us

Get the pointer to a function in a library:

https://wolfram.com/xid/0d4mjmxkngc6v51y-njmgku

Convert an OpaqueRawPointer into a RawPointer:

https://wolfram.com/xid/0d4mjmxkngc6v51y-38texn

Convert the raw pointer back to an OpaqueRawPointer:

https://wolfram.com/xid/0d4mjmxkngc6v51y-127kwl

Create a foreign callback function:

https://wolfram.com/xid/0d4mjmxkngc6v51y-wpw6vf


https://wolfram.com/xid/0d4mjmxkngc6v51y-hh7ah2

Possible Issues (1)Common pitfalls and unexpected behavior
OpaqueRawPointer returns a Failure for invalid memory addresses:

https://wolfram.com/xid/0d4mjmxkngc6v51y-swz10k


Wolfram Research (2023), OpaqueRawPointer, Wolfram Language function, https://reference.wolfram.com/language/ref/OpaqueRawPointer.html.
Text
Wolfram Research (2023), OpaqueRawPointer, Wolfram Language function, https://reference.wolfram.com/language/ref/OpaqueRawPointer.html.
Wolfram Research (2023), OpaqueRawPointer, Wolfram Language function, https://reference.wolfram.com/language/ref/OpaqueRawPointer.html.
CMS
Wolfram Language. 2023. "OpaqueRawPointer." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/OpaqueRawPointer.html.
Wolfram Language. 2023. "OpaqueRawPointer." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/OpaqueRawPointer.html.
APA
Wolfram Language. (2023). OpaqueRawPointer. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/OpaqueRawPointer.html
Wolfram Language. (2023). OpaqueRawPointer. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/OpaqueRawPointer.html
BibTeX
@misc{reference.wolfram_2025_opaquerawpointer, author="Wolfram Research", title="{OpaqueRawPointer}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/OpaqueRawPointer.html}", note=[Accessed: 07-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_opaquerawpointer, organization={Wolfram Research}, title={OpaqueRawPointer}, year={2023}, url={https://reference.wolfram.com/language/ref/OpaqueRawPointer.html}, note=[Accessed: 07-June-2025
]}