函数名: dosexterr
功 能: 获取扩展DOS错误信息
用 法: #include <dos.h>
int dosexterr(struct DOSERR *dblkp);
程序例:
#include <stdio.h>
#include <dos.h>
int main(void)
{
FILE *fp;
struct DOSERROR info;
fp = fopen("perror.dat","r");
if (!fp) perror("Unable to open file for
reading");
dosexterr(&info);
printf("Extended DOS error \
information:\n");
printf(" Extended error: \
%d\n",info.exterror);
printf(" Class: \
%x\n",info.class);
printf(" Action: \
%x\n",info.action);
printf(" Error Locus: \
%x\n",info.locus);
return 0;
}