Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HID Controllers and Multiple USB Devices

Status
Not open for further replies.

tjcusick

Programmer
Dec 26, 2006
134
0
0
US
Using Delphi 2007.

I have a program that I am trying to hook two seperate USB devices into it to be used globally throughout the program.

My two devices are a Symbol Bar Code Scanner and an USB Swipe Reader. Let me try and set this up. The program opens to a search screen with a list of clients in an AdvListView. and this window is always open it never closes until the program exits out. From here you can double click on a client in the AdvListView and it will open their record (ShowModal) on top of the Search Screen. On their record you can select what they want to purchase and method of payment.

initially i just had the Swipe Reader as the Hid Device, but now I want to encorporate the Bar Code Scanner as a USB device as well. so what i did, i put two HIDControllers on, one on the Search Screen and one on the Client record screen. The problem here was that when the client rec screen closed the HidController tried to remove the devices and thus caused and access violation on the search screen.

Talking with a coworker, he suggested that i open and assign my HidController on the Datamodule since that is one of the first things opened and one of the last things closed. So i did, I put the HidController on the Datamodule and it recognizes the two devices, but when on the Search screen or client rec screen now using either device produces no results. I do not even get any activity in the OnData procedure of the HidController.

Does anyone have any suggestions as to how i can get my HidController to recognize a scan from any screen in my program?

Thanks in advance.

Tom C
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top