DevicePowerSetDeviceState function (powrprof.h)
Modifies the specified data on the specified device.
Syntax
DWORD DevicePowerSetDeviceState(
[in] LPCWSTR DeviceDescription,
[in] ULONG SetFlags,
[in] PVOID SetData
);
Parameters
[in] DeviceDescription
The name or hardware identifier string of the device to be modified.
[in] SetFlags
The properties of the device that are to be modified.
[in] SetData
Reserved, must be NULL.
Return value
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | powrprof.h |
Library | PowrProf.lib |
DLL | PowrProf.dll |