/// <summary> /// Converts a ConnectedDevicesListNative into a byte array of connected device id values. /// </summary> /// <param name="deviceListNative">The structure of connected devices.</param> /// <returns>Returns an array of connected device id values.</returns> public static byte[] GetConnectedTabletIds(ConnectedDevicesListNative deviceListNative) { byte[] deviceList = new byte[deviceListNative.TabletDeviceCount]; for (int i = 0; i < deviceListNative.TabletDeviceCount; i++) { deviceList[i] = Marshal.ReadByte(deviceListNative.TabletDeviceIds, i * Marshal.SizeOf(typeof(int))); } return(deviceList); }
public static extern MLResult.Code MLInputGetConnectedDevices(ulong handle, ref ConnectedDevicesListNative out_devices);
public static extern MLResult.Code MLInputReleaseConnectedDevicesList(ulong handle, ref ConnectedDevicesListNative devices);