spierce7
09/03/2021, 11:31 PMCPointerVar
? I’ve been stuck on this for a few days.
I’m interacting with the following c function:
idevice_error_t idevice_get_device_list_extended(idevice_info_t **devices, int *count);
I’m calling it like this:
val connectedDevices: CPointerVar<idevice_info_tVar> = alloc()
val connectedDevicesSize: IntVar = alloc()
idevice_get_device_list_extended(connectedDevices.ptr, connectedDevicesSize.ptr)
I have no idea to get the array of devices out of the val connectedDevices
. There are no examples using CPointerVar
and CValues
that I’ve been able to find to figure this out. Any help would be much appreciated!mbonnin
09/04/2021, 12:02 AMval device: idevince_info_t = connectedDevices.value!!.get(0)
?spierce7
09/05/2021, 1:48 AM