A bug about "USBDeviceList" occur on my C# project(x64, the project of x86 is all right)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello

win10   vs2013    the place of usb driver is "C:\Cypress\Cypress Suite USB 3.4.7\Driver\bin\wlh\x64"    the place of dll is "C:\Cypress\Cypress Suite USB 3.4.7\CyUSB.NET\lib\CyUSB.dll"

I think all above is right. When I "build" my project under "x86" or "any cpu", it can run.  Howerver, if I "build" my project under x64, there will be a bug about "USBDeviceList" when I run it. 

I have seen this article("CyUSB.dll x64 OverflowException "). But it dose not work for me, because I have already use the version of 3.4.7.

The following project is a demo to display line on chart according the data from usb(Just as I have writen. This project will work all right if you build it by "x86" or "any cpu", but if you build it by "x64"i it will  not work ).

0 Likes
3 Replies
Anonymous
Not applicable

Here is a simple demo which have the same question ! !

rivate void test_button_Click(object sender, EventArgs e)

        {

            USBDeviceList usbDevices = new USBDeviceList(CyConst.DEVICES_CYUSB);

            CyUSBDevice MyDevice = usbDevices[0x04B4, 0x0923] as CyUSBDevice;//Remeber to change it.

            //

            if (MyDevice != null)

                if (MyDevice.BulkInEndPt != null)

                {

                    int len = 512;

                    byte[] buf = new byte[len];

                    MyDevice.BulkInEndPt.XferData(ref buf, ref len);

                }//Add a breakpoint here, then press the button.  you will see the usb data by vs2013.

        }

0 Likes

Hi Jianan,

You filled this thread with a wrong place. This place is for Type-C PD products. Could you please kindly fill a thread under USB Superspeed Peripherals ? So that we could find the experts as soon as possible.

Best Regards,

Lisa

0 Likes
Anonymous
Not applicable

Thanks

0 Likes