test: geninst.h File Reference

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

# geninst.h File Reference

Go to the source code of this file.

## Functions

BOOLEAN | CmpGenInstall (IN PVOID InfHandle, IN PCHAR Section)

## Function Documentation

BOOLEAN CmpGenInstall | ( | IN PVOID | InfHandle,
|  | IN PCHAR | Section
| ) |

Definition at line 176 of file geninst.c.

References CmpGetKeyName(), CmpGetSectionLineIndex(), CmpSearchInfSection(), FALSE, gInfRuleTable, Name, NULL, NUM_OF_INF_RULES, and TRUE.

Referenced by CmpMatchInfList(), and CmpMatchInstallRule().

    00183                        :
    00184
    00185         This routine does a GenInstall of the section in the inf.
    00186
    00187     Input Parameters:
    00188
    00189         InfHandle - Handle to the inf to be read.
    00190
    00191         Section - Name of the section to be read.
    00192
    00193     Return Value:
    00194
    00195         TRUE iff the entire section was processed successfully.
    00196
    00197 --*/
    00198
    00199 {
    00200     ULONG   ruleNumber;
    00201     ULONG   i;
    00202     PCHAR   ruleName;
    00203     PCHAR   regSection;
    00204     BOOLEAN result = FALSE;
    00205
    00206     if (CmpSearchInfSection(InfHandle, Section))
    00207     {
    00208         //
    00209         // Go through all the rules in the section and try to process
    00210         // each of them.
    00211         //
    00212
    00213         for (   ruleNumber = 0;
    00214                 ruleName = CmpGetKeyName(InfHandle, Section, ruleNumber);
    00215                 ruleNumber++)
    00216         {
    00217
    00218             //
    00219             // Search for the proceesing function in our table.
    00220             //
    00221
    00222             for (   i = 0;
    00223                     i < NUM_OF_INF_RULES &&
    00224                         _stricmp(ruleName, gInfRuleTable[i].Name);
    00225                     i++);
    00226
    00227             if (    i >= NUM_OF_INF_RULES ||
    00228                     (regSection = CmpGetSectionLineIndex(   InfHandle,
    00229                                                             Section,
    00230                                                             ruleNumber,
    00231                                                             0)) == NULL ||
    00232                     !CmpSearchInfSection(InfHandle, Section))
    00233             {
    00234                 result = FALSE;
    00235                 break;
    00236             }
    00237
    00238             if (!(*gInfRuleTable[i].Action)(InfHandle, regSection, gInfRuleTable[i].RefData))
    00239             {
    00240                 result = FALSE;
    00241             }
    00242         }
    00243
    00244         //
    00245         // All inf rules processed.
    00246         //
    00247
    00248         if (ruleNumber)
    00249         {
    00250             result = TRUE;
    00251         }
    00252     }
    00253
    00254     return (result);
    00255 }