0 Replies Latest reply on Apr 10, 2013 2:09 AM by linqiaqun

    ADL_Adapter_Active_Set failed

    linqiaqun

      I have several FirePro 2460 card. And I need to active all the displays. When I use ADL_Adapter_Active_Set to do this work, some of it failed and return -1.Can someone tell how this situaton happened. My code is as follow:

       

      iRet = ADL_Adapter_NumberOfAdapters_Get(&iAdpaterCount);

                if ((ADL_OK != iRet) || (iAdpaterCount < 2))

                {

                          printf("Get adapter count failed!\n");

       

       

                          return 0;

                }

       

       

                pAdapterInfo = (LPAdapterInfo)malloc(iAdpaterCount * sizeof(AdapterInfo));

                if (NULL == pAdapterInfo)

                {

                          printf("Alloc adapter information failed!\n");

       

       

                          return 0;

                }

       

       

                iRet = ADL_Adapter_AdapterInfo_Get(pAdapterInfo, iAdpaterCount * sizeof(AdapterInfo));

                if (ADL_OK != iRet)

                {

                          printf("Get adapter information failed!\n");

       

       

                          return 0;

                }

       

       

                for (int i = 0; i < iAdpaterCount; i++)

                {

                          iAdapterIndex = pAdapterInfo[i].iAdapterIndex;

       

       

                          iRet = ADL_Adapter_Active_Get(iAdapterIndex, &iStatus);

                          if ((ADL_OK != iRet) || (ADL_TRUE == iStatus))

                          {

                                    continue;

                          }

       

       

                          iStatus = ADL_TRUE;

                          iRet = ADL_Adapter_Active_Set(iAdapterIndex, iStatus, &iNewlyActive);

      }