dosexterr
raw OCR
Gets extended DOS error information.
Defined in header <dos.h>
Syntax
#include <dos.h>
int dosexterr(struct DOSERROR *eblkp);
Portability
| DOS | UNIX | Windows | ANSI C | C++ only |
|---|---|---|---|---|
| ■ | ■ |
Remarks
| This function fills in the DOSERROR | structure pointed to by eblkp with |
extended error information after a DOS call has failed. The structure is defined as follows:
struct DOSERROR {
| int de_exterror; | /* extended error */ |
| char de_class; | /* error class */ |
| char de_action; | /* action */ |
| char de_locus; }; The values in this structure are obtained by way of DOS call 0x59. A de_exterror value of 0 indicates that the prior DOS call did not result in an error. | /* error locus */ |
Return value
dosexterr returns the value de_exterror.
Example
#include <stdio.h>
#include <dos.h>
int main (void)
{
FILE *fp;
struct DOSERROR info;
fp = fopenC'perror.dat", "r");
if (!fp) perror("Unable to open file for reading"]
dosexterr(&info) ;
printf IExtended DOS error information: \n"i
printf I Extended error: %d\n" info.de_exterror)
printf I Class: %x\n" ,info.de_class);
printf I Action: %x\n" info.de_action);
printf I Error Locus: %x\n" ,info.de locus);
return
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/dos.h/dosexterr/
· short form /3.1/dosexterr/