Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

rules.h File Reference

Go to the source code of this file.

Defines

#define MAX_DESCRIPTION_LEN   256

Functions

BOOLEAN CmpMatchInfList (IN PVOID InfImage, IN ULONG ImageSize, IN PCHAR Section)


Define Documentation

#define MAX_DESCRIPTION_LEN   256
 

Definition at line 6 of file rules.h.

Referenced by CmpMatchMemoryRule(), CmpMatchNextMatchRule(), CmpMatchPModeRule(), CmpMatchPointerRule(), and CmpMatchSearchRule().


Function Documentation

BOOLEAN CmpMatchInfList (  IN PVOID  InfImage,
IN ULONG  ImageSize,
IN PCHAR  Section
) 
 

Definition at line 315 of file rules.c.

References CmpCloseInfFile(), CmpGenInstall(), CmpGetSectionLineIndex(), CmpMatchDescription(), CmpOpenInfFile(), DbgPrint, FALSE, gSearchAddress, NULL, and TRUE.

00323 : 00324 00325 Input Parameters: 00326 00327 InfImage - Pointer to the inf image in memory. 00328 00329 ImageSize - Size of the inf image. 00330 00331 Section - Section name containing the descriptions. 00332 00333 Description - 00334 00335 Return Value: 00336 00337 TRUE if the machine matches any one of the descriptions in the inf. 00338 00339 --*/ 00340 00341 { 00342 PCHAR computerName; 00343 ULONG i = 0; 00344 PVOID infHandle; 00345 BOOLEAN result = FALSE; 00346 00347 infHandle = CmpOpenInfFile(InfImage, ImageSize); 00348 00349 if (infHandle) 00350 { 00351 // 00352 // Do any clean-up specified in the inf. 00353 // 00354 00355 CmpGenInstall(infHandle, "Cleanup"); 00356 00357 // 00358 // Go through each description in this section and try to match 00359 // this machine to it. 00360 // 00361 00362 while ((computerName = CmpGetSectionLineIndex(infHandle, Section, i++, 0))) 00363 { 00364 // 00365 // Reset search result from previous description. 00366 // 00367 00368 gSearchAddress = NULL; 00369 00370 // 00371 // If this description matches, we are done. 00372 // NOTE: IF MORE THAN ONE DESCRIPTION MATCHES, 00373 // WE STOP AT THE FIRST ONE. 00374 // 00375 00376 if (CmpMatchDescription(infHandle, computerName)) 00377 { 00378 DbgPrint("CmpMatchInfList: Machine matches %s description!\n", computerName); 00379 result = TRUE; 00380 } 00381 } 00382 00383 CmpCloseInfFile(infHandle); 00384 } 00385 00386 // 00387 // None of the descriptions match. 00388 // 00389 00390 return (result); 00391 }


Generated on Sat May 15 19:45:31 2004 for test by doxygen 1.3.7