Manufacturer Serial Number of Hard Disk

I am trying to write a filter driver to fetch the Manufacturer’s Serial Number of a SATA hard disk (not volume serial) in a VISTA-based system.

I realise that the SATA hard disk is attached to the SCSI port, and the chipset HBA driver is nvstor.sys from NVIDIA (not that this should matter, I suppose). I am unable to get complete information using ATA_PASS_THROUGH or STORAGE_PROPERTY_QUERY.

While ATA_PASS_THROUGH results in an INVALID FUNCTION error, with STORAGE_PROPERTY_QUERY, I am only able to receive Vendor Id, Product Id and Product Revision fields, with the rest of the buffer being blank. Although, the structure allows for other fields, such as serialnumberoffset, etc., I am unable to see them.

When I change the driver to ATAPI.SYS that comes with the OS by default, I am able to get the required information (serial number) with ATA_PASS_THROUGH. So, nothing wrong with the OS version.

Can anyone tell me where I am missing a trick?

Thanks.

Manish

I swear I just finished discussing this exact same topic. Obviously I am
hallucinating.
Mark Roddy

On Mon, Dec 8, 2008 at 1:23 PM, wrote:

> I am trying to write a filter driver to fetch the Manufacturer’s Serial
> Number of a SATA hard disk (not volume serial) in a VISTA-based system.
>
> I realise that the SATA hard disk is attached to the SCSI port, and the
> chipset HBA driver is nvstor.sys from NVIDIA (not that this should matter, I
> suppose). I am unable to get complete information using ATA_PASS_THROUGH or
> STORAGE_PROPERTY_QUERY.
>
> While ATA_PASS_THROUGH results in an INVALID FUNCTION error, with
> STORAGE_PROPERTY_QUERY, I am only able to receive Vendor Id, Product Id and
> Product Revision fields, with the rest of the buffer being blank. Although,
> the structure allows for other fields, such as serialnumberoffset, etc., I
> am unable to see them.
>
> When I change the driver to ATAPI.SYS that comes with the OS by default, I
> am able to get the required information (serial number) with
> ATA_PASS_THROUGH. So, nothing wrong with the OS version.
>
> Can anyone tell me where I am missing a trick?
>
> Thanks.
>
> Manish
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

Mark Roddy wrote:

I swear I just finished discussing this exact same topic. Obviously
I am hallucinating.

Riddle: how many offshore developers does it take to read a serial number?