Hi, how can I put a string into a `CPointer<WCH...
# kotlin-native
a
Hi, how can I put a string into a
CPointer<WCHARVar>
?
r
Try
string.wcstr.ptr
a
.ptr
doesn't exists
r
Oh you might need to be inside a
MemScope
try
Copy code
memScoped { 
  val ptr = string.wcstr.ptr
  // do stuff with ptr
}
d
Just don't use the pointer outside that
memScoped
.