For any hardware add-ons — which tech folk call peripherals — Windows 10 has a trick up its sleeve. Thanks to plug and play technology, which automatically identifies add-on devices, connecting new devices to your computer can be quite easy.
You may find many kinds of add-on devices useful:
Keylok 2. Clone the USB firmware image, and load it into a virtual USB port. As you say, crack the key and the USB interface, and short-circuit the check in a virtual USB device. Locate the part of the code in the program that is doing the security check, and edit the bytecode / machine code to return successful without actually looking for the device.
Jun 12, 2012 When I plug my headphones in, an annoying Windows 10 themed pop-up window appears saying: External audio device detected. In order to receive the best audio experience please select the type of audio device you have plugged in. Front speaker out.
The majority of these devices connect using USB (Universal Serial Bus) technology. When you connect a device to your computer using a USB cable to the USB port (shown), the device identifies itself to the computer. This identification process is called plug and play. Ideally, you connect your device, and it simply works.
Windows 10 uses a device driver to communicate with an add-on device. The driver is really a program that tells Windows 10 how to run the device. When you connect a device, such as a printer, Windows 10 looks for a driver (in this case, a printer driver). That driver may be built into Windows 10, come on a disc that’s packaged with the device, or need to be downloaded from the Internet, either automatically by Windows 10 or manually by you.
Every computer has at least a couple of USB ports. Some are in the front, and others are in the back of the computer and harder to reach. If your computer doesn’t have enough ports, you can add more by buying a USB hub, which is a small box with two to four USB ports. If a port is hard to reach with a device’s cable, you can buy a USB extension cable. Office supply stores may have hubs and cables.
Bluetooth is a wireless technology for adding devices to your computer. If your computer has Bluetooth, you can use Bluetooth as well as USB to add some devices, especially a microphone or headset.-->
Be aware that the behavior of an AutoRun-invoked device installation application must depend on whether the user plugs in the hardware first or inserts the distribution medium first. Since independent hardware vendors (IHVs) typically provide one distribution disk, and a disk can only have one AutoRun-invoked application, your AutoRun-invoked device installation application must determine whether your device is plugged in.
To determine whether a device is plugged in, the application can call the UpdateDriverForPlugAndPlayDevices function, passing the hardware ID of the device. The device is plugged in if one of the following is true:
The function returns TRUE. (This also installs the driver for the device.)
The function returns FALSE and the Win32 GetLastErrorfunction returns ERROR_NO_MORE_ITEMS. (No installation occurs.)
The device is not plugged in if the function returns FALSE and GetLastError returns NO_SUCH_DEVINST. (No installation occurs.)
When a device that formerly was attached is now unplugged, the device's devnode remains in the system, although it is both inactive and hidden. Before you can reinstall such a device, you must first find this 'phantom' devnode, and mark it as needing reinstallation. Then, when the device is plugged back in, Plug and Play will reenumerate the device, find the new driver for it, and install the driver for the device.
To reinstall an unplugged device:
Call the SetupCopyOEMInf function.
The SetupCopyOEMInf function ensures that the correct INF file is present in the %SystemRoot%inf directory.
Find the unplugged devices.
Call the SetupDiGetClassDevs function. In the call to this function, clear the DIGCF_PRESENT flag in the Flags parameter. You have to find all devices, not just those that are present. You can narrow the results of your search by specifying the particular device class in the ClassGuid parameter.
Find the hardware IDs and compatible IDs of unplugged devices.
SetupDiGetClassDevs returns a handle to the device information set that contains all installed devices, whether plugged in or not, in the device class (assuming that you specified a device class in the first step). By making successive calls to the SetupDiEnumDeviceInfo function, you can use this handle to enumerate all the devices in the device information set. Each call gives you an SP_DEVINFO_DATA structure for the device. To obtain the list of hardware IDs, call the SetupDiGetDeviceRegistryProperty function with the Property parameter set to SPDRP_HARDWAREID. To obtain the list of the compatible IDs, call the same function, but with the Property parameter set to SPDRP_COMPATIBLEIDS. Both lists are MULTI-SZ strings.
Look for a match between the ID of your device and the hardware IDs (or compatible IDs) of the previous step.
Make sure that you perform full string comparisons between the hardware ID/compatible ID and the ID for your device. A partial comparison could lead to incorrect matches.
When you find a match, call the CM_Get_DevNode_Status function, passing SP_DRVINFO_DATA.DevInst in the dnDevInst parameter. If this function returns CR_NO_SUCH_DEVINST, that confirms that the device is unattached (that is, has a phantom devnode).
Mark the device.
Call the SetupDiGetDeviceRegistryProperty function with the Property parameter set to SPDRP_CONFIGFLAGS. When this function returns, the PropertyBuffer parameter points to the device's ConfigFlags value from the registry. Perform a bitwise OR of this value with CONFIGFLAG_REINSTALL (defined in Regstr.h). After doing this, call the SetupDiSetDeviceRegistryProperty function, with the Property parameter set to SPDRP_CONFIGFLAGS, and the PropertyBuffer parameter set to the address of the device's modified ConfigFlags value This action modifies the registry's ConfigFlags value to incorporate the CONFIGFLAG_REINSTALL flag. This causes the device to be reinstalled the next time that the device is reenumerated.
Plug in the device.
Plug and Play will reenumerate the device, find the new driver for it, and install that driver.