DelcomGetNthDevice() приватный Метод

private DelcomGetNthDevice ( uint ProductType, uint NthDevice, StringBuilder DeviceName ) : int
ProductType uint
NthDevice uint
DeviceName System.Text.StringBuilder
Результат int
Пример #1
0
        uint GetDelcomDeviceHandle()
        {
            if (string.IsNullOrEmpty(deviceName.ToString()))
            {
                // Search for the first match USB device, For USB IO Chips use USBIODS
                DelcomBuildIndicator.DelcomGetNthDevice(DelcomBuildIndicator.USBDELVI, 0, deviceName);
            }

            var hUsb = DelcomBuildIndicator.DelcomOpenDevice(deviceName, 0); // open the device

            return(hUsb);
        }
Пример #2
0
        uint GetDelcomDeviceHandle()
        {
            if (string.IsNullOrEmpty(deviceName.ToString()))
            {
                // Search for the first match USB device, For USB IO Chips use USBIODS
                var devicesFound = DelcomBuildIndicator.DelcomGetNthDevice(0, 0, deviceName);

                if (devicesFound == 0)
                {
                    Console.WriteLine("Can't find build light device, or it's in use by another program");
                }
            }

            var hUsb = DelcomBuildIndicator.DelcomOpenDevice(deviceName, 0); // open the device

            return(hUsb);
        }