示例#1
0
        /// <summary>
        /// Returns information about a device based on provided index.
        /// </summary>
        /// <param name="deviceIndex">Zero-based index of device. Should be strictly less than a value returned by CorsairGetDeviceInfo()</param>
        /// <returns>CorsairDeviceInfo structure that contains information about device or NULL if error has occurred.</returns>
        public static CorsairDeviceInfo CorsairGetDeviceInfo(int deviceIndex)
        {
            var deviceInfoPtr = CUESDKNative.CorsairGetDeviceInfo(deviceIndex);
            var deviceInfo    = Marshal.PtrToStructure <CorsairDeviceInfoNative>(deviceInfoPtr);

            return(new CorsairDeviceInfo(deviceInfo));
        }
示例#2
0
        /// <summary>
        /// Returns information about a device based on provided index.
        /// </summary>
        /// <param name="deviceIndex">Zero-based index of device. Should be strictly less than a value returned by CorsairGetDeviceInfo()</param>
        /// <returns>CorsairDeviceInfo structure that contains information about device or NULL if error has occurred.</returns>
        public static CorsairDeviceInfo CorsairGetDeviceInfo(int deviceIndex)
        {
            var deviceInfoPtr = CUESDKNative.CorsairGetDeviceInfo(deviceIndex);
            var deviceInfo    = (CorsairDeviceInfoNative)Marshal.PtrToStructure(deviceInfoPtr, typeof(CorsairDeviceInfoNative));

            return(new CorsairDeviceInfo(deviceInfo));
        }