IOCTL_STORAGE_SET_TEMPERATURE_THRESHOLD IOCTL (winioctl.h)

Windows applications can use this control code to set the temperature threshold of a device (when it's supported by the device). Use IOCTL_STORAGE_QUERY_PROPERTY to determine if the device supports changing the over and under temperature thresholds.

To perform this operation, call the DeviceIoControl function with the following parameters.

BOOL DeviceIoControl(
  (HANDLE) hDevice,                         // handle to device
  IOCTL_STORAGE_SET_TEMPERATURE_THRESHOLD,  // dwIoControlCode
  (LPDWORD) lpInBuffer,                     // input buffer
  (DWORD) nInBufferSize,                    // size of input buffer
  (LPDWORD) lpOutBuffer,                    // output buffer
  (DWORD) nOutBufferSize,                   // size of output buffer
  (LPDWORD) lpBytesReturned,                // number of bytes returned
  (LPOVERLAPPED) lpOverlapped               // OVERLAPPED structure
);

Requirements

Requirement Value
Minimum supported client Windows 10
Minimum supported server Windows Server 2016
Header winioctl.h (include Windows.h)

See also