Tech Support > Microsoft Windows > Development Resources > hard drive manufacturer name and slot information
hard drive manufacturer name and slot information
Posted by mdnchauhan81@gmail.com on May 8th, 2008


Hi all,
I want to get hard drive manufacturer name and slot information
whether it is primary master-slave or secondary master-slave using VC+
+.
I am trying to get these details by using win32_diskdrive class(WMI
classes). As there is one property of this class ie "manufacturer"
that give the name of hard drive manufacturer name. But when I execute
my program it gives "standard disk drive" instead of giving "seagate",
"samsung" or whatever it is.
Is there any setting that i am missing?
I am using windows XP Professional and visual studio 2005.

If there is any win32 api that can give me these information, Please
provide me the name of these api.

Please provide me some guideline.


Thanks in advance.

Posted by Jerry Coffin on May 8th, 2008


In article <44a01754-1dbf-49f8-b88c-
61edd20c1efc@l28g2000prd.googlegroups.com>, mdnchauhan81@gmail.com
says...
It sounds like this is telling you about the driver instead of the drive
proper. If the manufacturer provided a driver (that gave their own name)
you'd see it, but as-is, you're just seeing information about the basic
Microsoft IDE driver.

Since the model of the drive is available, you might want to use that to
guess at the manufacturer -- for example, "ST*" would imply Seagate as
the manufacturer, though there are undoubtedly others whose model
numbers aren't all so similar.

The other obvious possibility would be to use DeviceIoControl to pass a
command directly through to the drive to ask it who made it. You'd use
the SCSI INQUIRY command, which returns a T10 vendor ID. That's an 8-
byte code that's usually fairly mnemonic, so (for example) Seagate will
show up as "SEAGATE", Maxtor as "MAXTOR" and Western Digital as "WD",
"WDC" or "WDIGTL". If you need something more readable than that,
there's a list of vendor IDs in Appendix E of the SPC-4 standard.
Googling for "SPC-4" should get you some relevant information.

--
Later,
Jerry.

The universe is a figment of its own imagination.


Similar Posts