internal DeviceInterfaceInstance(string link_path, Guid class_guid) { SymbolicLinkPath = link_path; Class = class_guid; InstanceId = DeviceUtils.GetProperty(link_path, DevicePropertyKeys.DEVPKEY_Device_InstanceId).GetString(); _device_path = new Lazy <string>(MapWin32ToDevicePath); _properties = new Lazy <List <DeviceProperty> >(GetAllProperties); }
private static Guid GetDeviceInterfaceClass(string link_path) { return(DeviceUtils.GetProperty(link_path, DevicePropertyKeys.DEVPKEY_DeviceInterface_ClassGuid).GetGuid() ?? throw new ArgumentException("Unknown device interface instance.")); }
private SecurityDescriptor GetSecurityDescriptor() { return(DeviceUtils.GetProperty(_devinst, DevicePropertyKeys.DEVPKEY_Device_Security)?.GetSecurityDescriptor()); }