IOCTL_ACPI_EVAL_METHOD_EX control code
A driver for a device can use the IOCTL_ACPI_EVAL_METHOD_EX device control request to synchronously evaluate an ACPI control method that is supported by a child device in the namespace of the device. The driver should call IoBuildDeviceIoControlRequest and pass the following input and output parameters to build this request.
Set the IoBuildDeviceIoControlRequest input parameters as follows:
IoControlCode is set to IOCTL_ACPI_EVAL_METHOD_EX.
DeviceObject is set to a pointer to the physical device object (PDO) of the device.
InputBuffer is set to a pointer to an input buffer structure that depends on the type of input arguments to be passed to the control method. For more information about the type input arguments that this IOCTL supports, see the Remarks section later in this topic.
InputBufferLength is set to the size, in bytes, of the input buffer that is supplied by InputBuffer.
OutputBufferLength supplies the size, in bytes, of the output buffer that is supplied by OutputBuffer.
InternalDeviceIoControl is set to FALSE.
Event is set to a pointer to a caller-allocated and initialized event object.
Set the IoBuildDeviceIoControlRequest output parameters as follows:
OutputBuffer supplies a pointer to an ACPI_EVAL_OUTPUT_BUFFER structure that contains the output arguments from the control method.
IoStatusBlock is set to a pointer to an IO_STATUS_BLOCK structure.
If the request succeeds, IoStatusBlock->Status is set to STATUS_SUCCESS; otherwise, the Status member is set to an error code. If the output buffer is not large enough to contain the output buffer header, the Status member is set to STATUS_BUFFER_TOO_SMALL. If the output buffer is large enough to contain the output buffer header, but is not large enough to contain all the output arguments from the control method, the Status member is set to STATUS_BUFFER_OVERFLOW, and OutputBuffer->Length is set to the required length of the output buffer.
If the request succeeds, the IoStatusBlock->Information member is set to the number of bytes that is returned in the output buffer; otherwise, the Information member is set to zero.
A driver for a device can use IOCTL_ACPI_EVAL_METHOD_EX to synchronously evaluate a control method that is supported by a child object in the namespace of the device. The path and name of the control method that is supplied by this request must be either the fully qualified path and name of the method in the ACPI namespace or the path and name of the method relative to the device to which the request is sent. For example, assume that a device named 'ABCD' is an immediate child of the root of an ACPI namespace, that the 'ABCD' device supports a child device named 'CHLD,' and that the 'CHLD' device supports a method named '_FOO.' In this case, to evaluate the '_FOO' method, a driver sends an evaluation request to the 'ABCD' device and supplies either the path and name '\ABCD.CHLD._FOO,' which is the fully qualified path and name in the ACPI namespace, or the path and name 'CHLD._FOO,' which is the path and name relative to the 'ABCD' device in the ACPI namespace.
IOCTL_ACPI_EVAL_METHOD_EX supports the following types of input buffer structures:
The output arguments from the control method are returned in the variable-length ACPI_EVAL_OUTPUT_BUFFER structure that is supplied by the OutBuffer pointer. The ACPI_EVAL_OUTPUT_BUFFER includes an array of variable-length ACPI_METHOD_ARGUMENT structures, each one of which returns an output argument.
For more information about how to synchronously evaluate control methods, see Evaluating ACPI Control Methods Synchronously.
A driver can also use an IOCTL_ACPI_EVAL_METHOD request to synchronously evaluate a control method that is an immediate child object of a device.
IOCTL_ACPI_EVAL_METHOD_EX can be used only at IRQL < DISPATCH_LEVEL.
|Windows Vista and later versions of Windows.|