How to get hardware MAC address on Windows

前端 未结 3 1322
滥情空心
滥情空心 2020-12-29 09:23

I\'m playing around with retrieving the MAC address from the NIC - there are a variety of ways to get it, this article covers the most common:

http://www.codeguru.co

3条回答
  •  萌比男神i
    2020-12-29 09:43

    My guess is that in the linked CodeGuru article, the Miniport solution is likely to overcome the problem you describe, albeit painful to implement. The reason I think this is that I have used the GetAdaptersInfo solution myself in the past, and noticed that the MAC address will change without reboot when an adapter is added, e.g. a Bluetooth adapter providing PAN services.

    Perhaps rather than rebooting after changing the registry setting, you could try stopping and restarting the relevent network services. You could easily check this manually prior to looking for a programmatic solution.

    (n.b. the above is all guess work. If you try it and it works, perhaps add a post for those trying to do the same in future).

提交回复
热议问题