[译]Windows XP/2003的MAC地址转换器
By robot-v1.0
本文链接 https://www.kyfws.com/applications/mac-address-changer-for-windows-xp-2003-zh/
版权声明 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
- 5 分钟阅读 - 2030 个词 阅读量 0[译]Windows XP/2003的MAC地址转换器
原文地址:https://www.codeproject.com/Articles/10493/MAC-Address-Changer-for-Windows-XP-2003
原文作者:Nish Nishant
译文由本站 robot-v1.0 翻译
前言
A freeware program (with source code) that allows you to change the MAC ID of your network adapter
一个免费软件程序(带有源代码),可让您更改网络适配器的MAC ID
- 下载源(VC ++ 2005 Beta 2)-23.4 KB(Download source (VC++ 2005 Beta 2) - 23.4 KB)
- 下载二进制文件(MFC 8静态发布版本)-150.7 KB(Download binary (MFC 8 static release build) - 150.7 KB)
图1:唯一的主对话框的屏幕截图(Fig. 1 : Screenshot of the one and only main dialog)
图2:您可以在命令提示符下使用getmac列出n/w适配器的MAC地址(Fig. 2 : You can use getmac from a command prompt to list MAC Addresses of your n/w adapters)
总览(Overview)
我的电缆ISP确实做了一些非常不寻常且令人讨厌的事情:它将电缆调制解调器锁定到N/W卡的MAC地址,从而使用户无法更改其网卡或使用其他计算机.当我父亲拜访我时,这非常不便,因为他无法将笔记本电脑插入互联网,而且我家里没有局域网,因此可以插入.我的一位Linuxian朋友建议我更改MAC ID,这显然是在基于Linux的计算机上的一个命令操作.(My cable ISP does something really unusual and annoying: it locks a cable modem to the N/W card’s MAC address, thereby disallowing a user from either changing his network card or using a different machine. When my dad visits me, this is most inconvenient as he cannot plug his laptop into the internet and I don’t have a LAN at home he can plug into. A Linuxian friend of mine suggested that I change the MAC ID, which is apparently a one-command operation on Linux-based machines.)
我四处搜寻,发现在Windows下更改MAC涉及更改某些注册表值并重置网络适配器.我几乎不相信父亲和他的笔记本电脑,因此您可以想象我对信任他修改注册表和重置网络适配器的感受.我对编码并不特别着迷;我这样做是为了谋生和业余爱好,但我认为在业余时间为父亲编写GUI应用程序是一个谨慎的主意.这就是Windows XP/2003的MAC Address Changer诞生的方式.(I Googled around and found that changing the MAC under Windows involved changing certain registry values and resetting the network adapter. I barely trust my dad with his laptop, so you can imagine how I felt about trusting him to modify the registry and reset network adapters. I am not particularly crazy about coding; I do it for a living as well as an off-work hobby, but I thought it’d be a prudent idea to write a GUI application for my dad in my spare time. That’s how MAC Address Changer for Windows XP/2003 came into being.)
要求(Requirements)
- Windows XP/Windows 2003(Windows XP / Windows 2003)
运作方式(Operations)
更改MAC ID(Change the MAC ID)
在编辑框中输入MAC地址,然后单击"更改"按钮.它会验证您输入的ID,因此您无法输入"我是鸡鹰"之类的MAC或类似的愚蠢信息.(Enter a MAC Address into the edit box and click the Change button. It validates the ID you’ve entered, so you cannot enter a MAC like “I am a chicken hawk” or something goofy like that.)
重置MAC ID(Reset the MAC ID)
这会将MAC地址重置为适配器默认值.(This’ll reset the MAC address to the adapter default.)
注意事项(Things to Note)
- 通常,这两种操作都非常简单.但是有时,对于某些网络适配器,适配器的编程重置将失败.在这种情况下,您将看到一个消息框,告诉您需要手动重置适配器.(Normally, both operations would be pretty straightforward. Sometimes though, with some network adapters, programmatic reset of the adapters will fail. In that case, you’ll get a message box telling you that you’ll need to manually reset the adapter.)
- 如果您没有对HKLM注册表项层次结构的写权限,则这两个操作都将失败.(If you don’t have write-access to the HKLM registry key hierarchy, both operations fail.)
程序用法(Program Usage)
该程序可以免费用于商业和非商业目的.(The program can be used freely for commercial and non-commercial purposes.)
源代码(Source Code)
包括了源代码(希望能发表体面的评论).我使用VC ++ 2005 Beta 2(MFC对话框应用程序,但没有(The source code (decently commented, I hope) has been included. I used VC++ 2005 Beta 2 (MFC dialog application without the) /clr
选项),因此您将需要打开项目文件.所有的文本UI都是从资源中获取的,因此拥有其他语言的版本(例如说德语或法语)应该非常容易.如果有人修改了源代码,我要求保留原始的版权评论标题.(option), so you’ll need that to open the project files. All the textual UI is taken from the resource, so it should be pretty easy to have versions for other languages, say German or French for instance. If anyone modifies the source code, I request that my original copyright comment headers be left intact.)
伪法定警告(Pseudo-Statutory Warning)
此程序可能不适用于某些网络适配器,并且如果不断更改/重置MAC ID,可能会导致适配器停止正常工作.某些网络管理员可能已禁止更改MAC地址的做法,因此,在使用此程序之前,您可能需要先咨询sys-admin.(This program may not work with some network adapters and it might cause an adapter to stop working normally if MAC IDs are incessantly changed/reset. Some network administrators might have forbidden the practice of changing MAC addresses, so you might want to check with your sys-admin before you use this program.)
结论(Conclusion)
此应用程序是出于个人需要而写的,如果它对其他人有用,那就太好了.如果不是,那么很好,那么什么也不会丢失.已为感兴趣的人提供了源代码.(This application was written out of personal necessity and if it is useful to other people, well and good. If not, oh well, then nothing is lost anyway. The source code has been provided for interested people.)
历史(History)
- 2005年5月19日:开始进行计划(May 19, 2005: Began work on program)
- 2005年5月25日:进行了修复,使程序可以在Windows 2003上运行(May 25, 2005: Made fixes to allow program to run on Windows 2003)
- 2005年5月27日:程序(带有源代码)首次在The Code Project上发布(May 27, 2005: Program (with source code) first published on The Code Project)
许可
本文以及所有相关的源代码和文件均已获得The Code Project Open License (CPOL)的许可。
C++ Windows Visual-Studio MFC VS2005 Dev 新闻 翻译