none
Wich class could give me the GUID value of my second GPU on SB2 ? RRS feed

  • Question

  • Hi all,

    In my program, how can I have the GUID value of the second GPU on my SB2 ?

    I was thinking to use the class win32_VideoController because it can enumerated all GPU on SB2. But the GUID value of the GPU seems not be here.

    Is there any class I can use ?

    Thanks.

    Tuesday, March 10, 2020 6:58 PM

All replies

  • Hello,

    What is a GPU, what is SB2 ??????


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Tuesday, March 10, 2020 7:54 PM
    Moderator
  • Hello,

    I want to provide a simpler way to get the GUID value through UI interface operations.

    1. Open the computer's task manager, select "Performance", and view the details of the GPU.

    2. Then in the search box on the taskbar, type "device manager" and select from the menu.

    3. Right-click the device manager, select Properties> Details tab, and select Device Class GUID from the drop-down menu.

    3. Then you can get the GUID value as shown below.

    I hope to help you.

    Best wishes,

    Julie



    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Wednesday, March 11, 2020 5:55 AM
    Moderator
  • Hi,

    I want it to be the software I'm programming that does it.

    That's why I thought using win32_VideoController class.

    But the GUID of GPUs (graphic board) of my SB2 (Surface-Book 2) seems not to be a property of this class.

    Then I'm looking for a class that contains this property.

    Best Regards.
    Wednesday, March 11, 2020 8:36 AM
  • Which GUID are you talking about ?

    In which screen do you see it ?

    (the GUID in Device Manager is the Class GUID,  from SetupDi APIs)


    • Edited by Castorix31 Wednesday, March 11, 2020 12:20 PM
    Wednesday, March 11, 2020 12:19 PM
  • Hi,

    I am trying to read the GUID value through the registry, but by using the OpenSubKey method, I can only detect the SubKeyNames under this Class Guid.

    Imports Microsoft.Win32
    
    Public Class Form1
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            checkReg_vcredist()
        End Sub
    
        Private Sub checkReg_vcredist()
            Dim regKey As String = "SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\"
    
            Using uninstallKey As Microsoft.Win32.RegistryKey = Registry.LocalMachine.OpenSubKey(regKey, False)
    
                If uninstallKey IsNot Nothing Then
                    Dim productKeys As String() = uninstallKey.GetSubKeyNames()
    
                    For Each keyName In productKeys
                        MsgBox(keyName)
                    Next
                End If
            End Using
        End Sub
    End Class

    In addition, as shown in the figure below, the Guid of the current computer GPU is not unique. It is similar to other computers. I guess this may be related to computer hardware information.

    Hope it be helpful to you.

    Best Regards,

    Julie


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, March 16, 2020 8:56 AM
    Moderator
  • In addition, as shown in the figure below, the Guid of the current computer GPU is not unique. 


    As I said , those are Standard GUIDs from SetupDi APIs

    5b45201d-f2f2-4f3b-85bb-30ff1f953599 in this screen is the Guid for

    GUID_DEVINTERFACE_DISPLAY_ADAPTER

    Monday, March 16, 2020 9:21 AM