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

VOID TV2_AddDependantsToTree ( PSERVICEPROPSHEET  pDlgInfo,
HTREEITEM  hParent,
LPTSTR  lpServiceName 
)

Definition at line 122 of file dependencies_tv2.c.

Referenced by DependenciesPageProc(), and TV2_Initialize().

{

    LPENUM_SERVICE_STATUSW lpServiceStatus;
    LPTSTR lpNoDepends;
    DWORD count, i;
    BOOL bHasChildren;

    /* Get a list of service dependents */
    lpServiceStatus = TV2_GetDependants(lpServiceName, &count);
    if (lpServiceStatus)
    {
        for (i = 0; i < count; i++)
        {
            /* Does this item need a +/- box? */
            bHasChildren = TV2_HasDependantServices(lpServiceStatus[i].lpServiceName);

            /* Add it */
            AddItemToTreeView(pDlgInfo->hDependsTreeView2,
                              hParent,
                              lpServiceStatus[i].lpDisplayName,
                              lpServiceStatus[i].lpServiceName,
                              lpServiceStatus[i].ServiceStatus.dwServiceType,
                              bHasChildren);
        }

        HeapFree(GetProcessHeap(),
                 0,
                 lpServiceStatus);
    }
    else
    {
        /* If there is no parent, set the tree to 'no dependencies' */
        if (!hParent)
        {
            /* Load the 'No dependencies' string */
            AllocAndLoadString(&lpNoDepends, hInstance, IDS_NO_DEPENDS);

            AddItemToTreeView(pDlgInfo->hDependsTreeView2,
                              NULL,
                              lpNoDepends,
                              NULL,
                              0,
                              FALSE);

            HeapFree(ProcessHeap,
                     0,
                     lpNoDepends);

            /* Disable the window */
            EnableWindow(pDlgInfo->hDependsTreeView2, FALSE);
        }
    }
}

Generated on Sat May 26 2012 04:40:10 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.