#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; }