Hello,
In code provided, there is a function called:
internal Boolean FindDeviceFromGuid(System.Guid myGuid, ref String devicePathName);
In it, you can find if new USB connections are being made.
I was thinking of having a main loop that checked this function every 3 seconds. But I wonder is that the proper way to detect if a USB connection has been made? Maybe there's an event that gets called when one gets plugged in that I am not aware of?
Some context:
1) Jan's code and my microchip code are working together and communicating nicely.
2) I'm adding new boards with different serial numbers.
3) I can detect the serial numbers on the boards and communicate to the right board.
What I am trying to do is make it so people can hot plug in new boards(same vendorid, same productid, dif serialid), and their serial numbers to be populated in a drop down menu(The guy with the arrow). Right now the list can't populate until I previously detected the USB connection has been made. It is a real simple problem which I can fix myself by calling FindDeviceFromGuid every 3 seconds. But I was just wondering if I'm solving this problem in the incorrect fashion. What is the right way to do this?
,Jim