ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

BOOLEAN NTAPI INIT_FUNCTION CmpSortDriverList ( IN PHHIVE  Hive,
IN HCELL_INDEX  ControlSet,
IN PLIST_ENTRY  DriverListHead 
)

Definition at line 562 of file cmboot.c.

Referenced by CmGetSystemDriverList().

{
    HCELL_INDEX Controls, GroupOrder, ListCell;
    UNICODE_STRING Name, DependList;
    PCM_KEY_VALUE ListNode;
    ULONG Length;
    PCM_KEY_NODE Node;
    ASSERT(Hive->ReleaseCellRoutine == NULL);

    /* Open the control key */
    Node = HvGetCell(Hive, ControlSet);
    ASSERT(Node);
    RtlInitUnicodeString(&Name, L"Control");
    Controls = CmpFindSubKeyByName(Hive, Node, &Name);
    if (Controls == HCELL_NIL) return FALSE;

    /* Open the service group order */
    Node = HvGetCell(Hive, Controls);
    ASSERT(Node);
    RtlInitUnicodeString(&Name, L"ServiceGroupOrder");
    GroupOrder = CmpFindSubKeyByName(Hive, Node, &Name);
    if (GroupOrder == HCELL_NIL) return FALSE;

    /* Open the list key */
    Node = HvGetCell(Hive, GroupOrder);
    ASSERT(Node);
    RtlInitUnicodeString(&Name, L"list");
    ListCell = CmpFindValueByName(Hive, Node, &Name);
    if (ListCell == HCELL_NIL) return FALSE;
    
    /* Now read the actual list */
    ListNode = HvGetCell(Hive, ListCell);
    ASSERT(ListNode);
    if (ListNode->Type != REG_MULTI_SZ) return FALSE;
    
    /* Copy it into a buffer */
    DependList.Buffer = (PWCHAR)CmpValueToData(Hive, ListNode, &Length);
    if (!DependList.Buffer) return FALSE;
    DependList.Length = DependList.MaximumLength = (USHORT)Length - sizeof(UNICODE_NULL);
    
    /* And start the recurive sort algorithm */
    return CmpDoSort(DriverListHead, &DependList);
}

Generated on Sun May 27 2012 06:06:31 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.