nicholasamh wrote:
[...] which hard disk is the initializewinIo reading from, as I attach a extra hard disk drive using USB to SATA/IDE adapter. I want to send ATA commands and read from there.
At the beginning, you didn't mention that you were using a USB-attached disk

I have only used winio for sending commands to
direct-attached ATA disks (or SATA disks via an adapter which pretends to be ATA). Personally, I don't see how it is possible to use winio to control a USB-attached disk (unless you know exactly how to program the registers of your USB Host Controller), and therefore you probably need to investigate using a different OS API for a USB-attached disk (or else use a direct-attached disk instead, if you want to use winio).