Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Followup question from previous thread IOCTL_EVAL_ACPI_METHOD

Reply
Thread Tools Display Modes

Followup question from previous thread IOCTL_EVAL_ACPI_METHOD

 
 
hasyed
Guest
Posts: n/a

 
      08-27-2010
Trying to evaluate _TMP method for the thermal zone. My 1st attempt was from
user-mode.

"Doron Holan [MSFT]" wrote:

> you cannot send this IOCTL from user mode, the driver will not process it
>


I took one more crack at this from a device driver. The code fails in trying
to send IRP downstream. The device driver that I am doing this from is a
simple support driver that can do writes/reads to/from I/O ports.

NtStatus = IoGetDeviceInterfaces((LPGUID)&ThermalGuid , NULL, 0, &list);
if (NtStatus == STATUS_SUCCESS)
{
DbgPrint( "Succesful in getting thermal zone device interface\n");

if (list)
{
PWSTR pl = list;

if (*pl)
{
RtlInitUnicodeString( &sTemp, pl );
NtStatus = IoGetDeviceObjectPointer ( &sTemp, FILE_READ_DATA,
&pFileObjLower, &pThermalDevObj );
if (!NT_SUCCESS (NtStatus))
{
DbgPrint( "IoGetDeviceObjectPointer() failed returned %x\n");
}
else
{
DbgPrint( "IoGetDeviceObjectPointer() succeeded returned
%x\n");
}
ObDereferenceObject(pFileObjLower);
}

ExFreePool (list);
}
}
else
{
return NtStatus;
}

// Fill in the input data
inputBuffer.MethodNameAsUlong = (ULONG) ('_TMP');
inputBuffer.Signature = ACPI_EVAL_INPUT_BUFFER_SIGNATURE;

// Send the request along
NtStatus = SendDownStreamIrp(pThermalDevObj,
IOCTL_ACPI_EVAL_METHOD,
&inputBuffer,
sizeof(ACPI_EVAL_INPUT_BUFFER),
&outputBuffer,
sizeof(ACPI_EVAL_OUTPUT_BUFFER)
);

if (!NT_SUCCESS(NtStatus))
{
ObDereferenceObject(pThermalDevObj);
DbgPrint("Unsucessful in sending IRP down stream\n");
return NtStatus;
}

The error code is 0xc00000bb (STATUS_NOT_SUPPORTED)

One of the obvious things that could be wrong is that this is a support
driver. It is not associated with any device. It is loaded by the
application to do simple tasks such as IO read/write. Does that disqualify
this as a WDM driver which is a requirement for evaluating acpi methods?
Another requirement of using IOCTL_ACPI_EVAL_METHOD was that the driver has
to be in the same namespace as the device object. I am trying to evaluate an
ThermalZone method. Since I have a support driver, does that not meet the
requirement?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Interview Question Chris M Windows Server 4 08-07-2010 10:45 PM
Sign up to a thread Iggy Blue Windows Vista Administration 2 03-16-2008 09:47 PM
restoring previous versions BEFORE A CORRUPTION occurred to PST fi CHRISTOPHER61958 Windows Vista File Management 0 07-30-2007 06:30 PM
Does "Restore previous versions" work with CompletePC Backup? nLinked Windows Vista File Management 2 03-31-2007 10:00 AM
Can't boot vista without DVD Burke Windows Vista Installation 2 07-22-2006 05:47 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59