
Ask HN: Can someone tell me how to reverse engineer this? - Deathwing
There is a neat little tool out there called HDDScan. It has the ability to SpinUp and SpinDown Hard-Disk-Drives, which does exactly what it sounds like.
I badly want to know how it is able to do that. I already wrote Artem Rubtsov, but received no answer.<p>Since you can invoke this functionality via a command line parameter, i thought, it should not be that hard to just monitor its behavior with some Api monitoring tools. But no success.
Even after some hours into IDAPro, i still have no idea...<p>But it somehow must go through the Win32 API, right?<p>No one seems to know, how to accomplish this: http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;5367065&#x2F;spin-down-hard-disk-programmatically-on-windows<p>Can someone help me, please?<p>Best regards
======
OJFord
It's not Windows of course, but you might look at hdparm [0] which does a
similar thing on Linux. It's a wrapper around ioctls, which led me to 'Winsock
IOCTLS' [1] which is maybe helpful.

`GetPwrDiskSpindownRange` page [2] has s potentially useful remark:

> _Starting with Windows Vista, power management configuration of the system
> 's hard disk drives is controlled through the GUID_DISK_SUBGROUP power
> settings subgroup. Use the PowerEnumerate function to enumerate individual
> settings. For more information on using PowrProf.h, see Power Schemes._

But all I did to find that was search "spindown" on MSDN, so I'm sure you've
seen that already.

[0] -
[http://manpages.ubuntu.com/manpages/zesty/en/man8/hdparm.8.h...](http://manpages.ubuntu.com/manpages/zesty/en/man8/hdparm.8.htm)

[1] - [https://msdn.microsoft.com/en-
us/library/windows/desktop/bb7...](https://msdn.microsoft.com/en-
us/library/windows/desktop/bb736550\(v=vs.85\).aspx)

[2] - [https://msdn.microsoft.com/en-
us/library/windows/desktop/aa3...](https://msdn.microsoft.com/en-
us/library/windows/desktop/aa372692\(v=vs.85\).aspx)

~~~
devnonymous
Seems like there exists a win32 hdparam port

[http://axh.mbnet.fi/hdparm-win32.html](http://axh.mbnet.fi/hdparm-win32.html)

Fwiw hdd spin up / spin down is an ACPI function and you might want to
research ACPI tools to see if that's possible using these tools.

