SetupApiSetupDiGetClassDevs Method
Returns a handle to a device information set that contains requested device information elements for a local computer.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("SetupApi.dll", CharSet = CharSet.Unicode)]
public static IntPtr SetupDiGetClassDevs(
IntPtr classGuid,
string enumerator,
IntPtr hwndParent,
SetupApiDeviceFiter flags
)
<DllImportAttribute("SetupApi.dll", CharSet := CharSet.Unicode>]
Public Shared Function SetupDiGetClassDevs (
classGuid As IntPtr,
enumerator As String,
hwndParent As IntPtr,
flags As SetupApiDeviceFiter
) As IntPtr
Dim classGuid As IntPtr
Dim enumerator As String
Dim hwndParent As IntPtr
Dim flags As SetupApiDeviceFiter
Dim returnValue As IntPtr
returnValue = SetupApi.SetupDiGetClassDevs(classGuid,
enumerator, hwndParent, flags)
public:
[DllImportAttribute(L"SetupApi.dll", CharSet = CharSet::Unicode)]
static IntPtr SetupDiGetClassDevs(
IntPtr classGuid,
String^ enumerator,
IntPtr hwndParent,
SetupApiDeviceFiter flags
)
[<DllImportAttribute("SetupApi.dll", CharSet = CharSet.Unicode)>]
static member SetupDiGetClassDevs :
classGuid : IntPtr *
enumerator : string *
hwndParent : IntPtr *
flags : SetupApiDeviceFiter -> IntPtr
No code example is currently available or this language may not be supported.
- classGuid IntPtr
-
A pointer to the GUID for a device setup class or a device interface class.
This pointer is optional and can be Zero.
- enumerator String
-
A string that specifies:
- An identifier (ID) of a Plug and Play (PnP) enumerator.
This ID can either be the value's globally unique identifier (GUID) or symbolic name.
For example, "PCI" can be used to specify the PCI PnP value.
Other examples of symbolic names for PnP values include "USB," "PCMCIA," and "SCSI".
- A PnP device instance ID.
When specifying a PnP device instance ID, DIGCF_DEVICEINTERFACE must be set in the Flags parameter.
This pointer is optional and can be NULL.
If an enumeration value is not used to select devices, set Enumerator to NULL.
- hwndParent IntPtr
-
A handle to the top-level window to be used for a user interface that is
associated with installing a device instance in the device information set.
This handle is optional and can be Zero.
- flags SetupApiDeviceFiter
-
Flags that specifies control options that filter the
device information elements that are added to the device information set.
IntPtr
If the operation succeeds, returns a handle to a device information set
that contains all installed devices that matched the supplied parameters.
If the operation fails, the function returns INVALID_HANDLE_VALUE [ New IntPtr(-1) ].
To get extended error information, call
GetLastWin32Error.