[译]如何清除CMOS
By robot-v1.0
本文链接 https://www.kyfws.com/applications/how-to-clear-cmos-zh/
版权声明 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
- 2 分钟阅读 - 549 个词 阅读量 0[译]如何清除CMOS
原文地址:https://www.codeproject.com/Articles/5529/How-to-Clear-CMOS
原文作者:Balkrishna Talele
译文由本站 robot-v1.0 翻译
前言
The two line code to clear cmos password or to clear whole cmos
两行代码可清除cmos密码或清除整个cmos
介绍(Introduction)
在MFC应用程序中添加以下代码,或创建Win32动态链接库,然后添加代码.它仅在Win9x上运行良好,尚未在XP/NT上进行测试,希望它不能在基于NT的技术上运行.(Add the following code in an MFC application or make Win32 Dynamic link library and then add the code. It works fine on Win9x only, it was not tested on XP/NT and hope it won’t work on NT based tech.)
该代码的意图仅是出于教育目的.此代码适用于那些懒得打开柜子并取出面糊的人.没有指定远程CMOS清除例程,因此不应该发布任何问题.(The intension of this code is only for educational purposes. This code is for those who are too lazy to open their cabinet and remove the batter. No remote CMOS clearing routine is specified, so no questions should be posted for the same.)
如何使用它(How To Use It)
来吧,你知道如何…(Come on, you know how to…)
int __stdcall Clear_Cmos( )
{
_outp(0x70,0x2E); //password will get cleared
_outp(0x71,0xFF);
/* if you want to clear whole CMOS
use following code
for(int i=0;i<256;i++) // whole cmos will get cleared
{
_outp(0x70,i);
_outp(0x71,i);
}
*/
return 0;
}
历史(History)
- 27(27)日(th)2003年11月:初始职位(November, 2003: Initial post)
许可
本文以及所有相关的源代码和文件均已获得The Code Project Open License (CPOL)的许可。
C++ VC6 MFC Visual-Studio Dev 新闻 翻译