逻辑锁为什么没有效果?
#include<bios.h>
#include<stdio.h>
#include<conio.h>
int main(void)
{int result;
char buffer[512];
clrscr();
result=biosdisk(2,0x80,0,0,1,1,buffer);
if(result)
{buffer[510]=0x0;
buffer[511]=0x0;
printf("fail to read main boot aector!\n");
}
if(!result) result=biosdisk(3,0x80,0,0,1,1,buffer);
(!result)?(printf("writing main boot sector successfully!\n")):(printf("fail to write main boot secor!\n"));
printf("press any key to quit....");
getch();
return 0;
}
编写完这段程序后,为什么系统会提示无法直接访问硬盘呢? 难道这种逻辑锁过期了???还是有什么地方不完善的?