Re: how to load in a build in driver whose index is greater 10 in Windows CE
- From: "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT com>
- Date: Wed, 27 Dec 2006 12:55:17 -0700
Steve's reply is perfect. You're trying to access a value that is not
present for devices numbered higher than 9, which yours is. The driver code
was clearly not intended to be used for devices which would have more than 9
instances and will have to be modified to work for your 60-instance case.
Simply making the failure to read the Name key a non-fatal error should be
all you need, unless the result of that call is used at some point. Search
for szName to see what, if anything, its purpose is.
Paul T.
<suqian99@xxxxxxxxxxx> wrote in message
news:1167248566.518656.88270@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Paul and all, here is my code,
lStatus = RegOpenKeyEx( HKEY_LOCAL_MACHINE, pContext, 0, 0, &hKey) ;
if ( ERROR_SUCCESS != lStatus )
{
SENDLOG((TEXT("Mux07_10::VCA_Init: RegOpenKeyEx Failed: GO
TO ERROR 1\r\n")));
goto error ;
}
// get Key
dwSize = MAX_SZKEY_SIZE ;
dwValType = REG_SZ ;
lStatus = RegQueryValueEx( hKey, TEXT("Key"), NULL, &dwValType,
(LPBYTE) szBuiltinKey, &dwSize) ;
if ( ERROR_SUCCESS != lStatus )
{
SENDLOG((TEXT("Mux07_10::VCA_Init: RegQueryValueEx Failed:
GO TO ERROR 2\r\n")));
goto error ;
}
// get Name
dwSize = MAX_SZKEY_SIZE ;
dwValType = REG_SZ ;
lStatus = RegQueryValueEx( hKey, TEXT("Name"), NULL, &dwValType,
(LPBYTE) szName, &dwSize) ;
if ( ERROR_SUCCESS != lStatus )
{
SENDLOG((TEXT("Mux07_10::VCA_Init: RegQueryValueEx Failed:
GO TO ERROR 3\r\n")));
goto error ;
}
RegCloseKey(hKey) ;
so to summary this topic,
the driver is loaded and can not use the "active" information.
thanks, guys.
Steve Maillet (eMVP) wrote:
Because the Device manager only creates the "name" value (which you
shouldn't rely on in your driver) for legacy device names.
--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com
.
- References:
- how to load in a build in driver whose index is greater 10 in Windows CE
- From: suqian99
- Re: how to load in a build in driver whose index is greater 10 in Windows CE
- From: Steve Schrock [MS]
- Re: how to load in a build in driver whose index is greater 10 in Windows CE
- From: suqian99
- Re: how to load in a build in driver whose index is greater 10 in Windows CE
- From: Bruce Eitman [eMVP]
- Re: how to load in a build in driver whose index is greater 10 in Windows CE
- From: suqian99
- Re: how to load in a build in driver whose index is greater 10 in Windows CE
- From: Paul G. Tobey [eMVP]
- Re: how to load in a build in driver whose index is greater 10 in Windows CE
- From: suqian99
- Re: how to load in a build in driver whose index is greater 10 in Windows CE
- From: Paul G. Tobey [eMVP]
- Re: how to load in a build in driver whose index is greater 10 in Windows CE
- From: suqian99
- Re: how to load in a build in driver whose index is greater 10 in Windows CE
- From: Steve Maillet \(eMVP\)
- Re: how to load in a build in driver whose index is greater 10 in Windows CE
- From: suqian99
- how to load in a build in driver whose index is greater 10 in Windows CE
- Prev by Date: Re: Can anybody able to do the CETK tests after installing the IMX31 BSP
- Next by Date: Re: USB Hub
- Previous by thread: Re: how to load in a build in driver whose index is greater 10 in Windows CE
- Index(es):
Relevant Pages
|
|