internal DeviceInformationSet(string enumerator, DeviceInformationClassFlags flags) { handle = SetupDiGetClassDevsEnumerator(IntPtr.Zero, enumerator, IntPtr.Zero, flags); if (handle.IsInvalid) { throw new Win32Exception(); } }
internal DeviceInformationSet(Guid guid, DeviceInformationClassFlags flags) { handle = SetupDiGetClassDevsGuid(ref guid, IntPtr.Zero, IntPtr.Zero, flags); if (handle.IsInvalid) { throw new Win32Exception(); } this.guid = guid; }
internal static extern unsafe DeviceInformationSetHandle SetupDiGetClassDevsEnumerator( IntPtr ClassGuid, [MarshalAs(UnmanagedType.LPTStr)] string Enumerator, IntPtr hwndParent, DeviceInformationClassFlags flags );
internal static extern unsafe DeviceInformationSetHandle SetupDiGetClassDevsGuid( ref Guid ClassGuid, IntPtr Enumerator, IntPtr hwndParent, DeviceInformationClassFlags flags );