コード例 #1
0
            /// <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);
            }
コード例 #2
0
 public static extern MLResult.Code MLInputGetConnectedDevices(ulong handle, ref ConnectedDevicesListNative out_devices);
コード例 #3
0
 public static extern MLResult.Code MLInputReleaseConnectedDevicesList(ulong handle, ref ConnectedDevicesListNative devices);