Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The PoCreateThermalRequest creates a new thermal request object.
Syntax
NTKERNELAPI
NTSTATUS
PoCreateThermalRequest (
PVOID *ThermalRequest,
PDEVICE_OBJECT TargetDeviceObject,
PDEVICE_OBJECT PolicyDeviceObject,
PCOUNTED_REASON_CONTEXT Context,
ULONG Flags
)
Parameters
ThermalRequest
Supplies a pointer to receive the thermal request object.
TargetDeviceObject
Supplies the device object of the device being cooled.
PolicyDeviceObject
Supplies the thermal device object of the device making the cooling request.
Context
A pointer to a COUNTED_REASON_CONTEXT structure that describes why the caller is creating the thermal request object.
Flags
Supplies flags that modify the behavior of the thermal request.
Return Value
PoCreateThermalRequest returns STATUS_SUCCESS if the call is successful. If the call fails, possible error return codes include the following:
| Return code | Description |
|---|---|
| STATUS_INVALID_PARAMETER | If any of the input parameters are NULL |
| STATUS_INSUFFICIENT_RESOURCES | There is not enough memory available to create a power request object |
Remarks
This routine creates a Thermal request object. One thermal request needs to be created per device that needs to be cooled. After creation the caller can use PoGetThermalRequestSupport to query cooling (active or passive) cooling capabilities of the device, and use PoSetThermalPassiveCooling and PoSetThermalActiveCooling routines to make cooling requests on the device.
When the thermal request object is no longer needed, the caller must delete the object by calling the PoDeleteThermalRequest routine. The driver must delete the thermal request object before it deletes the device object that was used to create the thermal request object.
Requirements
| Minimum supported client | Available starting with Windows 10 1703 release. |
| Target Platform | Universal |
| Header | wdm.h (include Wdm.h, Ntddk.h, Ntifs.h) |
| Library | NtosKrnl.lib |
| DLL | NtosKrnl.exe |
| IRQL | <= APC_LEVEL |