https://kotlinlang.org logo
#kotlin-native
Title
# kotlin-native
r

Reto Mayer

01/28/2023, 11:07 AM
Is there any way how i can write bytes to a NativePtr?
Copy code
CPointerVarOf<COpaquePointer>(nativePtr)
gives me this Exception: Native interop types constructors must not be called directly I need a CValueRef<*> for memcpy
l

Landry Norris

01/30/2023, 2:41 AM
Not at my computer right now, but there should be an extension that converts nativePtr to Long, and one that converts Long to CPointer.
r

Reto Mayer

02/03/2023, 8:40 PM
Thank you. You are right this exists and works great.
22 Views