Re: PnPAddDevice Return Value by G
G
Wed Feb 08 03:13:15 CST 2006
Yes. I know that I am getting a AddDevice again for the same device. But, I
haven't checked the PDO. I checked by having only two devices of the type in
the system and returning SUCCESS for the first device and
STATUS_NOT_SUPPORTED for the other.
And, I am loading as a driver for the device on top of PCI.sys as a PNP
driver and I hope this means it is a service for the device. Is there a way
to verify this?
--Raj
"Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in message
news:ea$0mTHLGHA.2604@TK2MSFTNGP09.phx.gbl...
> are you sure AddDevice is being called for the same device each time? is
> the PDO value passed in the same? if you are marked as the service for
> the device, returning !NT_SUCCESS will fail the device stack being built
> (if you are a filter, the error is ignored).
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
> "G.N.Raj" <gnraj@hotmail.com> wrote in message
> news:u9fDrQGLGHA.1028@TK2MSFTNGP11.phx.gbl...
>>I tried all the IDs reported by hwids command of the devcon and used them
>>as input for installing driver. But didn't get much out of it.
>>
>> I will see if I need to write my own application using the SetupDi.
>>
>> Is there any other way as I asked in the AddDevice returning a value?
>>
>> --Raj
>>
>> "Pavel A." <pavel_a@NOwritemeNO.com> wrote in message
>> news:ekAC7yFLGHA.3396@TK2MSFTNGP10.phx.gbl...
>>> Instance ID is not same as hardware ID. Instance IDs are unique.
>>>
>>> --PA
>>>
>>>
>>> "G.N.Raj" <gnraj@hotmail.com> wrote in message
>>> news:OVfLHnFLGHA.1288@TK2MSFTNGP09.phx.gbl...
>>>>I tried that Pavel.
>>>>
>>>> But for that I have to give one of the Hardware IDs and in my case
>>>> there is no uniqueness in any of the hardware IDs reported by the
>>>> devcon.exe's hwids command.
>>>>
>>>> Please let me know if there is any other way to get that.
>>>>
>>>> Regards,
>>>>
>>>> Raj
>>>>
>>>> "Pavel A." <pavel_a@NOwritemeNO.com> wrote in message
>>>> news:7FF47FEE-BC15-45AA-9980-E8755AC81CCE@microsoft.com...
>>>>> Using SetupDi (or devcon.exe) you can assign to every instance it's
>>>>> own
>>>>> driver.
>>>>>
>>>>> Regards,
>>>>> --PA
>>>>>
>>>>> "G.N.Raj" wrote:
>>>>>> Hello Everyone,
>>>>>>
>>>>>> I am trying to return a error value from PnPAddDevice routine of my
>>>>>> PCI
>>>>>> Device driver for the system to not load the driver for that
>>>>>> particular
>>>>>> device. I am trying with STATUS_NOT_SUPPORTED.
>>>>>>
>>>>>> I see that the AddDevice keeps getting called.
>>>>>>
>>>>>> The background for this trial is as follows:
>>>>>>
>>>>>> My driver is a PnP Driver and there is a legacy driver available for
>>>>>> the
>>>>>> same PCI device with different functionality.
>>>>>>
>>>>>> The system has 10 similar PCI devices and I want to load my driver
>>>>>> only on
>>>>>> two of them. I am using the PCI three-tuples BUS-DEVICE-FUNCTION for
>>>>>> choosing my devices.
>>>>>>
>>>>>> But, for automatic installation we have to use the PCI VendorID and
>>>>>> Device
>>>>>> ID which is same for all the 10 PCI devices. If I try automatic
>>>>>> installation, the system tries to load my driver for all the 10 PCI
>>>>>> devices.
>>>>>>
>>>>>> So, I check for specific BUS-DEVICE-FUNCTION in my AddDevice and
>>>>>> return
>>>>>> STATUS_NOT_SUPPORTED. I expect the system to ignore my driver and
>>>>>> allow the
>>>>>> legacy driver to use the device. But, it does not seem to happen and
>>>>>> my
>>>>>> AddDevice keeps getting called.
>>>>>>
>>>>>> Is there any specific STATUS_* value I have to return from AddDevice
>>>>>> to
>>>>>> achieve what I want? Please let me know the value or point me to the
>>>>>> place
>>>>>> where I can get it from.
>>>>>>
>>>>>> Thanks in advance for the big help from all of you
>>>>>>
>>>>>> Best Regards,
>>>>>>
>>>>>> Raj
>>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>