Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dosexterr(DOS) — System V/386 Software Development System 3.2.2b

Media Vault

Software Library

Restoration Projects

Artifacts Sought

     Name
          dosexterr - Gets and stores extended error information.

     Syntax
          #include <dos.h>

          int dosexterr (buffer)
          struct DOSERROR {
          int exterror;            /*AX register contents*/
          char class;              /*BH register contents*/
          char action;             /*BL register contents*/
          char locus;              /*CH register contents*/
          } *buffer;

     Description
          The dosexterr function obtains the extended error
          information returned by the DOS system call 0x59 and stores
          the values in the structure that buffer points to. This
          function is useful when making system calls under DOS
          Versions 3.0 or later, which offer extended error handling.

          The structure type DOSERROR pointer argument causes
          dosexterr to return the value in AX without filling in the
          structure fields.

     Return Value
          The dosexterr function returns the value in the AX register
          (identical to the value in the exterror structure field).

     See Also
          perror(S)

     Notes
          The dosexterr function should be used only under DOS
          Versions 3.0 or later.

     Example
          #include <dos.h> #include <fcntl.h> #include <stdio.h>

          struct DOSERROR doserror; int fd;

          main( )
           {
                  if ((fd = open("test.dat", O_RDONLY)) == -1)
                   {
                          dosexterr( &doserror );
                          printf("error=%d, class=%d, action=%d,
          locus=%d\n",
                                doserror.exterror, doserror.class,
                                doserror.action, doserror.locus);
                   }
                  else
                          printf("Open succeeded so no extended");
                          printf(" information is printed\n");
           }

          This program tries to open the file test.dat. If the
          attempted open operation fails, the program uses dosexterr
          to display extended error information.

                                                (printed 6/18/89)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026