int absread(int drive,int nsects,int sectno,void *buffer)本函数功能为读特定的 磁盘扇区,drive为驱动器号(0=A,1=B等),nsects为要读的扇区数,sectno为开始的逻 辑扇区号,buffer为保存所读数据的保存空间int abswrite(int drive,int nsects,int sectno,void *buffer)本函数功能为写特定的 磁盘扇区,drive为驱动器号(0=A,1=B等),nsects为要写的扇区数,sectno为开始的逻 辑扇区号,buffer为保存所写数据的所在空间void getdfree(int drive,struct dfree *dfreep)本函数用来取磁盘的自由空间, drive为磁盘号(0=当前,1=A等).函数将磁盘特性的由dfreep指向的dfree结构中. dfree结构如下: ┌───────────────────┐ │struct dfree │ │{ │ │ unsigned df_avail; /*有用簇个数*/ │ │ unsigned df_total; /*总共簇个数*/ │ │ unsigned df_bsec; /*每个扇区字节数*/│ │ unsigned df_sclus; /*每个簇扇区数*/ │ │} │ └───────────────────┘char far *getdta() 取磁盘转换地址DTAvoid setdta(char far *dta)设置磁盘转换地址DTAvoid getfat(int drive,fatinfo *fatblkp) 本函数返回指定驱动器drive(0=当前,1=A,2=B等)的文件分配表信息 并存入结构fatblkp中,结构如下: ┌──────────────────┐ │struct fatinfo │ │{ │ │ char fi_sclus; /*每个簇扇区数*/ │ │ char fi_fatid; /*文件分配表字节数*/│ │ int fi_nclus; /*簇的数目*/ │ │ int fi_bysec; /*每个扇区字节数*/ │ │} │ └──────────────────┘void getfatd(struct fatinfo *fatblkp) 本函数返回当前驱动器的文件分配表信息, 并存入结构fatblkp中,结构如下: ┌──────────────────┐ │struct fatinfo │ │{ │ │ char fi_sclus; /*每个簇扇区数*/ │ │ char fi_fatid; /*文件分配表字节数*/│ │ int fi_nclus; /*簇的数目*/ │ │ int fi_bysec; /*每个扇区字节数*/ │ │} │ └──────────────────┘
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货