Anyone remember HalAllocateSlotResources?

I’m working with a client who has an antique non-PnP driver. It is a
product nearing the end of its life, so it probably isn’t worth
rewriting it to a more modern driver model (although that’s being
considered). However, they would like it to work under Vista.

The driver works fine under XP. Under Vista, it installs, but fails
during initialization. After an afternoon with the debugger, it turns
out we are getting STATUS_OBJECT_NAME_NOT_FOUND from
HalAllocateSlotResources. They’ve already scanned the PCI config space,
and are passing the correct bus and slot number. The registry key seems
reasonable. The driver object came from DriverEntry. They are passing
a device object that has just been created with IoCreateDevice. All of
the parameters look reasonable.

I’m at a loss to understand what the error might be telling me. Any
clues are welcome.

(I had to go clear back to the NT4 DDK documentation to find a
description of this routine…)


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Do you mean HalAssignSlotResources? Cuz I don’t see that function doing anything on Vista, aside from returning STATUS_NOT_IMPLEMENTED and STATUS_NOT_SUPPORTED.

You’re not running this on an Itanic, are you? Can you tell us which HAL you’re using?

Peter
OSR

xxxxx@osr.com wrote:

Do you mean HalAssignSlotResources? Cuz I don’t see that function doing anything on Vista, aside from returning STATUS_NOT_IMPLEMENTED and STATUS_NOT_SUPPORTED.

Yes, duh. HalAssignSlotResources. I made the same mistake when I
Googled for it.

I found nothing in writing saying that these Hal functions have actually
been removed. Yes, they’ve been deprecated since Windows 2000, but not
yet removed. HalGetBusDataByOffset still works just fine. And I’m
definitely getting C0000034, STATUS_OBJECT_NAME_NOT_FOUND.

You’re not running this on an Itanic, are you? Can you tell us which HAL you’re using?

No, I’m aware that the Hal functions are all useless in 64-bit HALs.
For this test, it’s an old (533MHz) P3. It uses halapic.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

As I recall, there was a DEVICE_OBJECT, or DRIVER_OBJECT, parameter that is
marked as optional. Given my memory is swiss cheese recalling the proper
function, for 2000 and above, that parameter is NOT optional. You’ll have to
pass it.

Peter is also correct … there ain’t no such thing fro 2000 on as
HalAllocateSlotResources, it is HalAssignSlotResources.


The personal opinion of
Gary G. Little

“Tim Roberts” wrote in message news:xxxxx@ntdev…
> I’m working with a client who has an antique non-PnP driver. It is a
> product nearing the end of its life, so it probably isn’t worth
> rewriting it to a more modern driver model (although that’s being
> considered). However, they would like it to work under Vista.
>
> The driver works fine under XP. Under Vista, it installs, but fails
> during initialization. After an afternoon with the debugger, it turns
> out we are getting STATUS_OBJECT_NAME_NOT_FOUND from
> HalAllocateSlotResources. They’ve already scanned the PCI config space,
> and are passing the correct bus and slot number. The registry key seems
> reasonable. The driver object came from DriverEntry. They are passing
> a device object that has just been created with IoCreateDevice. All of
> the parameters look reasonable.
>
> I’m at a loss to understand what the error might be telling me. Any
> clues are welcome.
>
> (I had to go clear back to the NT4 DDK documentation to find a
> description of this routine…)
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>

Gary G. Little wrote:

As I recall, there was a DEVICE_OBJECT, or DRIVER_OBJECT, parameter that is
marked as optional. Given my memory is swiss cheese recalling the proper
function, for 2000 and above, that parameter is NOT optional. You’ll have to
pass it.

Yes, the DEVICE_OBJECT is marked optional, but we’re passing one in.
The DriverClassName parameter is also marked optional, and we are
passing NULL.

The fact that the error is STATUS_OBJECT_NAME_NOT_FOUND is what boggles
me. The only “name” in the parameter list is DriverClassName, and we’re
leaving it NULL. The only other string is the registry path, and it is
legitimate.

Peter is also correct … there ain’t no such thing fro 2000 on as
HalAllocateSlotResources, it is HalAssignSlotResources.

Yes. I somehow got HalAllocate on the brain.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

OK… I see that it DOES do something (sorry about that)…

Have you run it on the checked build of Vista to see if, by chance, there are any messages that shed light on the situation?

Peter
OSR