Hi Silicon Lab Engineers,
I am Hafiz, developing an USB-UART application, using VB.net with Visual Studio 2010 with CP2110 hardware. I own two units of CP2110EK development boards.
I failed to import/include/add SLABHIDtoUART.dll and SLABHIDDevice.dll to my Software IDE.
I searched found nothing matched with this problem.
My PC specs;
Intel Core i5-2310 @ 2.9 GHz
4 GB RAM
64-bit Windows OS, x64-based processor
Please anyone help me....
Thanks in advance.
Hi Hafiz/ SLAB Engineers,
From what the manual says we need both slabhidtouart.dll and slabhidDevice.dll
Can you please explain how you used the dlls. I am able to import the dll but when i call the apis for eg: HidUart_GetNumDevices executes successfully but doesnt return any value, Following is what I have done
Importing the DLL:
Private Shared Function HidUart_GetNumDevices(numDevices As Integer, vid As String, pid As String) As Integer
Inside the form load:
Dim devCount As IntPtr = -1
MsgBox(HidUart_GetNumDevices(devCount, 0, pid))
This always returns 0 and devCount always remains -1
Kindly suggest. Thanks in Advance
SLABHIDDevice.DLL has the underlying code to deal with an HID device generically. SLABHIDtoUART.DLL has the API you should use to access the CP2110, but it relied on SLABHIDDevice.DLL and they should exist together.
The HidUart_GetNumDevices() function will take either 0 for both VID and PID (to list all devices) - in your case you have supplied a PID in the pid variable (I assume it's non-zero) and 0 for the VID. It's probably not finding a device with VID of 0x0000. Instead specify 0 for both, or a specific VID and PID combination.