Question about how this was made

My x64 port of InpOut32
Post Reply
New User
Posts: 3
Joined: Fri Sep 04, 2015 9:03 pm

Question about how this was made

Post by Ben321 » Thu Mar 10, 2016 10:24 am

How did you make a device driver that is not tied to any specific device? It allows you to send commands to any port by number (allowing access to any and all devices that can be referenced by port number). Don't Windows drivers normally require being associated with a specific hardware device, such as a printer, or graphics card, or mouse? Even here on MSDN where it shows the structure of an INF file used to install a driver (dot) com/en-us/library/windows/hardware/ff548687%28v=vs.85%29.aspx it shows that a specific device is being named (in the example the device is HID\Vid_045E&Pid_0009.DeviceDesc = "Microsoft USB Intellimouse")

User avatar
Site Admin
Posts: 5471
Joined: Sun Apr 06, 2003 11:12 pm

Re: Question about how this was made

Post by phil » Thu Mar 10, 2016 10:59 am

Firstly, I did not make it, I simply took the code from Logix4U and ported it to 64bit.

Secondly, if your interested in how it works, take a look at the code for the driver - its freely available and not all that complicated if you have access to MSDN (or google) to lookup the functions it calls.

Thirdly, I think the answer is rather simple. Generally a driver is tied to a specific device ID etc using an INF file, so that windows can look at the device ID in the hardware and "find" an appropriate driver t load. However, you can override that by selecting "Have disk" and browsing for any driver and trying to use it with the device - this clearly wont have any successful impact unless the thing you browse to is actually for that device.

InpOut32 "simply" uses the IOControl functions to hit the port number passed in by the function. There is NO INF file. The driver is loaded/installed by the DLL and is not tied to any hardware IDs.

--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

Post Reply