JNIEnv.GetDirectBufferAddress(IntPtr) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the native address of a direct Java NIO buffer.
public static IntPtr GetDirectBufferAddress(IntPtr buf);
static member GetDirectBufferAddress : nativeint -> nativeint
Parameters
- buf
-
IntPtr
nativeint
A live, non-null JNI reference to a Java NIO buffer. On Android 12 and later, it can refer to any Java object.
Returns
nativeint
The start address of the buffer's memory region, or Zero if the buffer has no native address or the virtual machine does not support JNI access to direct buffers. On Android 12 and later, Zero is also returned if the object is not a Java NIO buffer.
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.