00072                    :
00073 
00074     This function search 
the specified configuration tree and returns a
00075     pointer to an entry that matches 
the specified 
class, 
type, and key
00076     parameters.
00077 
00078     N.B. This routine can 
only be called during system initialization.
00079 
00080 Arguments:
00081 
00082     Child - Supplies an optional pointer to an NT configuration component.
00083 
00084     Class - Supplies 
the configuration 
class of 
the entry to locate.
00085 
00086     Type - Supplies 
the configuration 
type of 
the entry to locate.
00087 
00088     
Key - Supplies a pointer to an optional key value to use in locating
00089         
the specified entry.
00090 
00091     Resume - Supplies 
the last returned entry for which 
the search
00092         should resume from.
00093 
00094 Return Value:
00095 
00096     If 
the specified entry 
is located, then a pointer to 
the configuration
00097     entry 
is returned as 
the function value. Otherwise, 
NULL is returned.
00098 
00099 --*/
00100 
00101 {
00102 
00103     
PCONFIGURATION_COMPONENT_DATA Entry;
00104     ULONG MatchKey;
00105     ULONG MatchMask;
00106     
PCONFIGURATION_COMPONENT_DATA Sibling;
00107 
00108     
00109     
00110     
00111     
00112 
00113     
if (ARGUMENT_PRESENT(Key)) {
00114         MatchMask = 0xffffffff;
00115         MatchKey = *
Key;
00116 
00117     } 
else {
00118         MatchMask = 0;
00119         MatchKey = 0;
00120     }
00121 
00122     
00123     
00124     
00125     
00126 
00127     
while (Child != 
NULL) {
00128         
if (*Resume) {
00129             
00130             
00131             
00132             
00133 
00134             
if (Child == *Resume) {
00135                 *Resume = 
NULL;
00136             }
00137         } 
else {
00138 
00139             
00140             
00141             
00142             
00143 
00144             
if ((Child->ComponentEntry.Class == Class) &&
00145                 (Child->ComponentEntry.Type == Type) &&
00146                 ((Child->ComponentEntry.Key & MatchMask) == MatchKey)) {
00147                 
return Child;
00148             }
00149         }
00150 
00151         
00152         
00153         
00154         
00155 
00156         Sibling = Child->Sibling;
00157         
while (Sibling != 
NULL) {
00158             
if (*Resume) {
00159                 
00160                 
00161                 
00162                 
00163 
00164                 
if (Sibling == *Resume) {
00165                     *Resume = 
NULL;
00166                 }
00167             } 
else {
00168 
00169                 
00170                 
00171                 
00172                 
00173 
00174                 
if ((Sibling->ComponentEntry.Class == Class) &&
00175                     (Sibling->ComponentEntry.Type == Type) &&
00176                     ((Sibling->ComponentEntry.Key & MatchMask) == MatchKey)) {
00177                     
return Sibling;
00178                 }
00179             }
00180 
00181             
00182             
00183             
00184             
00185 
00186             
if (Sibling->Child != 
NULL) {
00187                Entry = 
KeFindConfigurationNextEntry (
00188                                 Sibling->Child,
00189                                 Class,
00190                                 Type,
00191                                 Key,
00192                                 Resume
00193                                 );
00194 
00195                
if (Entry != 
NULL) {
00196                    
return Entry;
00197                }
00198             }
00199 
00200             Sibling = Sibling->Sibling;
00201         }
00202 
00203         Child = Child->Child;
00204     }
00205 
00206     
return NULL;
00207 }
}