diff --git a/Nefarius.Utilities.DeviceManagement.sln.DotSettings b/Nefarius.Utilities.DeviceManagement.sln.DotSettings index d23ed84..4429ce3 100644 --- a/Nefarius.Utilities.DeviceManagement.sln.DotSettings +++ b/Nefarius.Utilities.DeviceManagement.sln.DotSettings @@ -1,6 +1,7 @@  True True + True True True True diff --git a/README.md b/README.md index d719e86..df9340c 100644 --- a/README.md +++ b/README.md @@ -24,11 +24,9 @@ Managed wrappers around SetupAPI, Cfgmgr32, NewDev and DrvStore native APIs on W ### Generating documentation -```PowerShell -dotnet build -c:Release -dotnet tool install --global Nefarius.Tools.XMLDoc2Markdown -xmldoc2md .\bin\netstandard2.0\Nefarius.Utilities.DeviceManagement.dll .\docs\ -``` +- `dotnet build -c:Release` +- `dotnet tool install --global Nefarius.Tools.XMLDoc2Markdown` +- `xmldoc2md .\bin\netstandard2.0\Nefarius.Utilities.DeviceManagement.dll .\docs\` ## Examples diff --git a/src/PnP/PnPDevice.cs b/src/PnP/PnPDevice.cs index eb7aed5..5b5fa19 100644 --- a/src/PnP/PnPDevice.cs +++ b/src/PnP/PnPDevice.cs @@ -1,4 +1,5 @@ #nullable enable + using System; using System.Diagnostics.CodeAnalysis; using System.IO; @@ -26,7 +27,7 @@ public partial class PnPDevice : IPnPDevice, IEquatable private readonly uint _instanceHandle; /// - /// The used when creating this instance. + /// The used when creating this instance. /// private readonly DeviceLocationFlags _locationFlags; @@ -794,7 +795,8 @@ public bool Equals(PnPDevice other) return true; } - return string.Equals(DeviceId, other.DeviceId, StringComparison.InvariantCultureIgnoreCase); + // Instance ID distinguishes unique instances of devices, even of the same Hardware ID + return string.Equals(InstanceId, other.InstanceId, StringComparison.InvariantCultureIgnoreCase); } ///