Beispiel #1
0
 internal DeviceInformationSet(string enumerator, DeviceInformationClassFlags flags)
 {
     handle = SetupDiGetClassDevsEnumerator(IntPtr.Zero, enumerator, IntPtr.Zero, flags);
     if (handle.IsInvalid)
     {
         throw new Win32Exception();
     }
 }
Beispiel #2
0
        internal DeviceInformationSet(Guid guid, DeviceInformationClassFlags flags)
        {
            handle = SetupDiGetClassDevsGuid(ref guid, IntPtr.Zero, IntPtr.Zero, flags);
            if (handle.IsInvalid)
            {
                throw new Win32Exception();
            }

            this.guid = guid;
        }
Beispiel #3
0
 internal static extern unsafe DeviceInformationSetHandle SetupDiGetClassDevsEnumerator(
     IntPtr ClassGuid,
     [MarshalAs(UnmanagedType.LPTStr)] string Enumerator,
     IntPtr hwndParent,
     DeviceInformationClassFlags flags
     );
Beispiel #4
0
 internal static extern unsafe DeviceInformationSetHandle SetupDiGetClassDevsGuid(
     ref Guid ClassGuid,
     IntPtr Enumerator,
     IntPtr hwndParent,
     DeviceInformationClassFlags flags
     );