SetupDiClassNameFromGuid (setupapi)
Last changed: -99.24.187.145

.
Summary
The SetupDiClassGuidsFromName function retrieves the GUID(s) associated with the specified class name. This list is built based on the classes currently installed on the system.

C# Signature:

[DllImport("setupapi.dll", CharSet = CharSet.Auto, SetLastError = true)]

static extern Boolean SetupDiClassGuidsFromName(

                                                   string ClassN,
                                                   ref Guid guids,
                                                   UInt32 ClassNameSize,
                                                   ref UInt32 ReqSize
                                                );

VB Signature:

    <DllImport("setupapi.dll", _
    EntryPoint:="SetupDiClassNameFromGuidW", _
    SetLastError:=True, _
    CharSet:=CharSet.Unicode, _
    ExactSpelling:=True, _
    PreserveSig:=True, _
    CallingConvention:=CallingConvention.Winapi)> _
    Private Shared Function SetupDiClassNameFromGuid( _
    ByRef ClassGuid As GUID, _
    ByVal ClassName As StringBuilder, _
    ByVal ClassNameSize As Integer, _
    ByRef RequiredSize As Integer) As Boolean
    End Function

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Documentation