can external monitor adapterid be used to identify whether it is cloned or not?

mcangny 1 Reputation point
2021-03-22T17:15:05.353+00:00

Hello,

QueryDisplayConfig function returns the list of paths related to displays. In clone mode both cloned monitors has same adapterid. Is this information reliable?

Is there any document regarding winapi display library regarding display modes and id explained?

Best regards,
Murat.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
1,891 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Strive Sun-MSFT 421 Reputation points
    2021-03-23T03:29:02.923+00:00

    Hello, @mcangny

    In clone mode both cloned monitors has same adapterid. Is this information reliable?

    Judging from the test results, the api only returns the adapterid of a single display. There is no document showing that you can judge whether the monitor is in clone mode from this information.

    Is there any document regarding winapi display library regarding display modes and id explained?

    The DISPLAYCONFIG_TOPOLOGY_ID enumeration specifies the type of display topology.

    typedef enum DISPLAYCONFIG_TOPOLOGY_ID {  
      DISPLAYCONFIG_TOPOLOGY_INTERNAL,  
      DISPLAYCONFIG_TOPOLOGY_CLONE,  
      DISPLAYCONFIG_TOPOLOGY_EXTEND,  
      DISPLAYCONFIG_TOPOLOGY_EXTERNAL,  
      DISPLAYCONFIG_TOPOLOGY_FORCE_UINT32  
    } ;  
    

    Some code,

     QueryDisplayConfig(QDC_DATABASE_CURRENT, &requiredPaths, paths.data(), &requiredModes, modes.data(), &currentTopologyId);  
        switch (currentTopologyId)  
        {  
        case DISPLAYCONFIG_TOPOLOGY_INTERNAL:   
            break;  
        case DISPLAYCONFIG_TOPOLOGY_CLONE:   
        {  
            std::wcout << "CLONE Mode" << L"\n";  
            break;  
        }  
              
        case DISPLAYCONFIG_TOPOLOGY_EXTEND:   
        {  
            std::wcout << "EXTEND Mode" << L"\n";  
            break;  
        }  
        case DISPLAYCONFIG_TOPOLOGY_EXTERNAL:   
            break;  
        default: break;  
        }  
    

    ----------

    Thank you!

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.