⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 锁住硬盘.txt

📁 a program that can lock the hard disk
💻 TXT
字号:
#include<stdio.h>
#include<bios.h>
#include<conio.h>
int main(void)
{int res;
char a='N';
char buffer[512];
clrscr();
printf("This is a hard disk lock program.\n");
printf("Do you want to lock your hard disk?(Y/N):");
scanf("%c",&a);
if(a=='Y'||a=='y')
{res=biosdisk(2,0x80,0,0,1,1,buffer);
if(res)
{buffer[510]=0x0;
buffer[511]=0x0;
printf("Fail to read main boot sector!\n");
}
if(!res)
res=biosdisk(3,0x80,0,0,1,1,buffer);
(!res)?(printf("Writing main boot sector!\n"));

}
printf("Press any key to quit...");
getch();
return 0;

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -