/* ドライブ幾何学機能失敗を得なさい、エラーメッセージを表示し、出なさい */
if(g.spt==0)
{
printf("\n Get Drive Geometry Function Fails....");
printf("\n Extensions Not Supported, Press any Key to
Exit...");
getch();
exit(1);
}
return *g.sectors; /* ドライブのセクターの数を戻しなさい */
}
void main()
{
unsigned long loop=0, Sectors_in_HDD2=0;
unsigned char buffer[61440]; /* 120のセクターと同等の61440バイトのデータバッファ */
unsigned long i=0;
char choice;
clrscr();
/* 付すハードディスクの合計がより少しそれから2表示したらエラーメッセージをおよび出なさい。 */
if(((char)peekb(0x0040, 0x0075))<2)
{
printf("\n\n You Must Have At least Two Hard Disks
Attached to your Computer To Run This");
printf("\n Program. This Program has been developed
to Wipe the Data of Second Hard Disk.");
printf("\n Press any Key to Exit... ");
getch();
exit(1);
}
Sectors_in_HDD2 = getdrivegeometry (0x81);
printf(" Total Sectors in Second Hard Disk =
%lu\n\n",
Sectors_in_HDD2);
|