Can ATA commands be sent from a Windows Native API program?

I’m pretty new to this stuff and I don’t really know where to begin to get the information I need.

I need to issue an ATA command to a drive through the ATA Passthrough layer on XP, SP2.
I can do this when Windows is fully booted, but I need to issue 1 command before or after the initial fs integrity check is done. This occurs in a very early stage of the boot process, when almost now Windows functionality has been loaded. However, since Windows does check the file system at this point (using a special kind of app, a Native API app), it appears that talking to an ATA device is possible.

What I don’t know is how to send ATA commands to a drive from inside of a Native application.

From what I’ve been told, the Native API for XP is undocumented, but there is a book for the Windows 2000 API, which I do have. I don’t know how much of that information will apply to XP, if any.

I would appreciate any information from anyone who has some experience in this area.

thanks

I would write a kernel mode driver for this.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

wrote in message news:xxxxx@ntdev…
>
> I’m pretty new to this stuff and I don’t really know where to begin to get
the information I need.
>
> I need to issue an ATA command to a drive through the ATA Passthrough layer
on XP, SP2.
> I can do this when Windows is fully booted, but I need to issue 1 command
before or after the initial fs integrity check is done. This occurs in a very
early stage of the boot process, when almost now Windows functionality has been
loaded. However, since Windows does check the file system at this point (using
a special kind of app, a Native API app), it appears that talking to an ATA
device is possible.
>
> What I don’t know is how to send ATA commands to a drive from inside of a
Native application.
>
> From what I’ve been told, the Native API for XP is undocumented, but there is
a book for the Windows 2000 API, which I do have. I don’t know how much of that
information will apply to XP, if any.
>
> I would appreciate any information from anyone who has some experience in
this area.
>
>
> thanks
>

The problem with a kernel mode driver is that it is hardware specific.

We need the ATA passthrough layer because it works on all (or at least most) systems without the user having to write hardware specific code, or install any software, other than a small app.

So- I repeat my question: Can ATA commands be issued from a Native app using the ATA passthrough layer, and if so how?

thanks

> The problem with a kernel mode driver is that it is hardware specific.

No. A software-only module which sends ATA passthru to the underlying ATA
stack.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

> The problem with a kernel mode driver is that it is hardware specific.

If you believe this is the case… well, then it is really better to stick to the user-mode - it is obvious that you are totally unfamiliar with kernel-mode development, so that writing a *good* driver will take you very,very long…

Anton Bassov