AnsweredAssumed Answered

vrf If/Then/Else - Bug?

Question asked by VRFuser on Nov 11, 2003
> I would like to try and run our hard drive diagnostics by issuing vendor
> unique "AT" commands. Any ideas on how this could be done with VEE?

Over what interface? (ATA, ATAPI?)

> Do we need to write a driver?

Probably not. On a high level you can escape through DeviceIoControl and
send whatever you want. I don't remember the details, but went though it
once. Info is in the DDK. Basically, you call
CreateFileA("\\.\PHYSICALDRIVEx", ... where x is a physical drive number
beginning with 0. Then use the returned handle with DeviceIoControl. This
would be preferable to...

Then again depending on your spec you can always use the io port thingy and
send whatever you want to whatever ports you need to. This would suffice for
simple things - like if the tests are run by the drive and all you need to
do is gather reporting data. It won't get you sophisticated stuff like DMA.
However, if you're running through a serial port now I doubt this would be a

Thirdly, if you actually *do* have to construct a driver, it can be *very*
painless - though you would need a good C programmer. You can customize the
ATAPI driver that comes with Windows. On the one hand, the old escape
sequence might have gone away by now (haven't done it for four years, so I
don't know what's current). OTOH, the current escapes may not provide enough
flexibility. If this is the case, just download & install the DDK. You get
the ATAPI driver source for free, and it won't be hard to modify. Just add a
few control codes that send what you need with buffers specifically
constructed to your needs. In this scenario you would also use CreateFileA /
DeviceIoControl from VEE.

You are currently subscribed to vrf as:
To subscribe send a blank email to "".
To unsubscribe send a blank email to "".
To send messages to this mailing list,  email "". 
If you need help with the mailing list send a message to "".