How to detect when USB device is being connected/disconnected?
问题 I don't feel comfortable harnessing USB device with Delphi and have a next to nothing knowledge of the details of writing device driver (though I've come accross some when learning assembly with GoASM). The device could be either an usb modem or an usb printer. What I need is a direction to go and sample code adressing the topic. 回答1: This was taken from detect if usb device is connected unit U_Usb; interface uses Windows, Messages, SysUtils, Classes, Forms; type PDevBroadcastHdr = ^DEV