Re: How to fail a display driver load ..gracefully by Dean
Dean
Mon Dec 17 12:12:05 PST 2007
The candidate list includes a path to another registry key. That second
registry key is presumably created dynamically by a bus driver. GWES will
attempt to open the path in the candidate, and if it is successful, it will
get the display driver name from it. That display driver must not fail to
load.
This mechanism is primarily used by PCI devices. The candidate list has
paths to the registry entries that will be created by the PCI bus driver
*if* the device is found in the system at run time. If the device isn't
found, those reg entries won't be created gwes will move on to the next
device in the candidate list.
Once it has exhausted the candidate list, it looks for one listed in
HKLM\System\GDI\Drivers, if that isn't there it attempts to load ddi.dll.
Once it decides what to load, there is no turning back.
--
Dean Ramsier - eMVP
BSQUARE Corporation
"Skin Diver" <me@home.com> wrote in message
news:OKgMYDOQIHA.2268@TK2MSFTNGP02.phx.gbl...
> By "exists" do you mean the dll is in the image?
> Can't the dll then just fail the attach? or is it actualling looking for
> the file itself?
>
>
> "Dean Ramsier" <ramsiernospam@nospam.com> wrote in message
> news:ekJhT6NQIHA.3388@TK2MSFTNGP03.phx.gbl...
>> They way I understand it, the list allows you to have several candidate
>> drivers. The first one that actually exists will be loaded, and can't
>> fail. You don't have the opportunity to fail a call and go on to a second
>> driver.
>>
>> --
>> Dean Ramsier - eMVP
>> BSQUARE Corporation
>>
>>
>> "Skin Diver" <me@home.com> wrote in message
>> news:%23ISFKkNQIHA.2000@TK2MSFTNGP05.phx.gbl...
>>> spoke too soon. Failing the DrvEnableDriver just make the GWE call it
>>> again ..three times.
>>> Still have the original problem ... how to fail first driver so it
>>> checks the second???
>>>
>>>
>>>
>>> "Skin Diver" <me@home.com> wrote in message
>>> news:uRbn$dNQIHA.3388@TK2MSFTNGP03.phx.gbl...
>>>> looks like I was failing the wrong function .... should be
>>>> DrvEnableDriver
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> "Skin Diver" <me@home.com> wrote in message
>>>> news:OtZLa%23MQIHA.5164@TK2MSFTNGP03.phx.gbl...
>>>>> According to the documentation you can have several display drivers
>>>>> under the:
>>>>>
>>>>> [HKEY_LOCAL_MACHINE\System\GDI\DisplayCandidates]
>>>>>
>>>>> If the driver fails loading it will go to the next in the list.
>>>>>
>>>>> I can't seem to get this to work. What is the correct way to fail the
>>>>> driver?
>>>>>
>>>>> I thought I could just return "FALSE" from the:
>>>>>
>>>>> BOOL DisplayInit(LPCTSTR pszInstance, DWORD monitors)
>>>>>
>>>>> in the first driver and it would go to the second.
>>>>>
>>>>> It just crashes the GWEs.
>>>>>
>>>>> any ideas?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>