如果改变硬盘的电源模式D0~D3

SonicX 2008-06-23 09:19:10
已经通过SetupDiGetDeviceRegistryProperty的SPDRP_DEVICE_POWER_DATA参数获得硬盘支持的电源模式
有什么API可以改变这个模式,就像电源管理里面那样的多少时间不读写就让硬盘停下,从D0进入D3

先出50分,如果有完整答案增加到200分
...全文
283 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
大肚肥肥 2008-07-17
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 JeffChung 的回复:]
学习一下,顺便接分
[/Quote]
okmnji79513 2008-07-15
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 JeffChung 的回复:]
学习一下,顺便接分
[/Quote]
JeffChung 2008-07-14
  • 打赏
  • 举报
回复
学习一下,顺便接分
SonicX 2008-07-14
  • 打赏
  • 举报
回复
DevicePowerSetDeviceState
vista以上版本才支持吧。。。另外也找不到申明方式
Reverse.King 2008-07-07
  • 打赏
  • 举报
回复
DWORD WINAPI DevicePowerSetDeviceState(
__in LPCWSTR DeviceDescription,
__in ULONG SetFlags,
__in PCVOID SetData
);
liuin 2008-07-02
  • 打赏
  • 举报
回复
这么高深的问题,mark下

这个是对对应的
The SetupDiSetDeviceRegistryProperty function sets the specified device property.

BOOL SetupDiSetDeviceRegistryProperty(
HDEVINFO DeviceInfoSet,
PSP_DEVINFO_DATA DeviceInfoData,
DWORD Property,
CONST BYTE * PropertyBuffer,
DWORD PropertyBufferSize
);

Parameters
DeviceInfoSet
[in] Handle to the device information set that contains the interface and its underlying device. This handle is typically returned by the SetupDiGetClassDevs or SetupDiGetClassDevsEx function.
DeviceInfoData
[in, out] Pointer to an SP_DEVINFO_DATA structure that defines the device instance. If the class GUID property is being set, this structure reflects the device's new class upon return.
Property
[in] Device property to be set. See the SPDRP_* constants defined in Setupapi.h.
PropertyBuffer
[in] Pointer to a buffer that specifies the requested device property. If the property is being cleared, this parameter should be NULL and PropertyBufferSize should be zero.
PropertyBufferSize
[in] Size of the buffer, in bytes.
Return Values
If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧