MatthewKing / DeviceId

A simple library providing functionality to generate a 'device ID' that can be used to uniquely identify a computer.
MIT License
729 stars 118 forks source link

i am run on windows xp sp3,it crashed #15

Closed GaoJones closed 4 years ago

GaoJones commented 4 years ago

微信图片_20200624102009

MatthewKing commented 4 years ago

Hi.

Windows XP has been EOL since 2014. I don't have a Windows XP machine, nor do I have any way of attempting to reproduce this issue. Are you able to translate that error message to English please?

I'm planning to put some extra error handling in the GetMacAddressesUsingWmi method, which might help. But I don't have a timeline for the next release yet.

If none of the above help, I'd welcome a pull request.

Cheers

GaoJones commented 4 years ago

I recorded the stack trace info below, i am run a virtual machine(win xp sp3) at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode) at System.Management.PropertyData.RefreshPropertyInfo() at System.Management.PropertyDataCollection.get_Item(String propertyName) at System.Management.ManagementBaseObject.GetPropertyValue(String propertyName) at System.Management.ManagementBaseObject.get_Item(String propertyName) at DeviceId.Components.NetworkAdapterDeviceIdComponent.GetMacAddressesUsingWmi() at DeviceId.Components.NetworkAdapterDeviceIdComponent.GetValue() at DeviceId.Formatters.HashDeviceIdFormatter.<>c.b__3_1(IDeviceIdComponent x) at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.String.Join(String separator, IEnumerable1 values) at DeviceId.Formatters.HashDeviceIdFormatter.GetDeviceId(IEnumerable`1 components) at DeviceId.DeviceIdBuilder.ToString()

MatthewKing commented 4 years ago

Thanks. Do you have the actual error message?

MatthewKing commented 4 years ago

I've pushed a new commit to add some extra error handling. Can you check out the code and see if you can run it without errors? Thanks.

GaoJones commented 4 years ago

I've check out you lastest code and rebuild it,but it still throw exception 微信图片_20200624122514

MatthewKing commented 4 years ago

Are you sure you've compiled against the latest code from GitHub (not on NuGet)?

GaoJones commented 4 years ago

yes,I am sure it is you latest code,you can install VMWare and xp stystem to try it

MatthewKing commented 4 years ago

That's odd. However, as mentioned before, Windows XP has been EOL since 2014 so I'm not really able to investigate this one further. If you figure it out, I'll happily accept a pull request. Cheers!