示例#1
0
 internal static extern unsafe bool SetupDiEnumDeviceInterfaces(
     DeviceInformationSetHandle DeviceInfoSet,
     IntPtr DeviceInfoData,
     ref Guid InterfaceClassGuid,
     UInt32 MemberIndex,
     ref DeviceInterface.Native DeviceInterfaceData
     );
示例#2
0
 internal DeviceInformationSet(string enumerator, DeviceInformationClassFlags flags)
 {
     handle = SetupDiGetClassDevsEnumerator(IntPtr.Zero, enumerator, IntPtr.Zero, flags);
     if (handle.IsInvalid)
     {
         throw new Win32Exception();
     }
 }
示例#3
0
 internal static extern unsafe bool SetupDiGetDeviceInterfaceDetailW(
     DeviceInformationSetHandle DeviceInfoSet,
     ref DeviceInterface.Native DeviceInterfaceData,
     byte *DeviceInterfaceDetailData,
     UInt32 DeviceInterfaceDetailDataSize,
     ref UInt32 RequiredSize,
     IntPtr DeviceInfoData
     );
示例#4
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;
        }