I use it to get all the displays' information like this:
int displayCount = 0;
LPADLDisplayInfo displaysInfo = NULL;
ADL_Main_Memory_Free((void**)&displaysInfo);
int ret = ADL_Display_DisplayInfo_Get(-1, &displayCount, &displaysInfo, 0);
But it failed and return -5. I checked it in the ADL_SDK_4.0, it should mean "Invalid ADL index passed".
And the API's detail description told me the first parameter could be -1 in order to retrieve all displays' information.
The text reads as follows:
[in] iAdapterIndex The ADL index handle of the desired adapter. A value of -1 returns all displays in the system across multiple GPUs.
How could I use this API to retrieve all displays' information?
Solved! Go to Solution.
Unfortunately the help is misleading. “ADL_Display_DisplayInfo_Get” ADL call does not support -1 value for
adapter index. You will have to call the function multiple times passing individual and valid adapter indexes to get list of all display info in the system. The ADL_Sample project from the SDK demonstrates how to get list of adapters and how to get list of displays for each adapter.
Unfortunately the help is misleading. “ADL_Display_DisplayInfo_Get” ADL call does not support -1 value for
adapter index. You will have to call the function multiple times passing individual and valid adapter indexes to get list of all display info in the system. The ADL_Sample project from the SDK demonstrates how to get list of adapters and how to get list of displays for each adapter.
thanks for your reply!