Category : C++ Source Code
Archive   : VCCRT1.ZIP
Filename : DOSERR.C

 
Output of file : DOSERR.C contained in archive : VCCRT1.ZIP
/***
*doserr.c - get DOS extended error
*
* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
*
*Purpose:
* defines dosexterr() - get DOS extended error
*
*******************************************************************************/

#include
#include
#include


/***
*int _dosexterr(buffer) - get DOS extended error codes
*
*Purpose:
* Gets the DOS extended error information via DOS call 59H, and puts
* it in buffer. If buffer == NULL, the structure is not filled in.
* Returns the value in the AX register after the call.
*
*Entry:
* struct DOSERROR *buffer - pointer to buffer to fill in.
*
*Exit:
* fills in the structure pointed to by buffer (unless buffer == NULL),
* and returns the value in the AX register after the call (same as the
* exterror field of buffer).
*
*Exceptions:
*
*******************************************************************************/

int
_dosexterr (err)
REG1 struct _DOSERROR *err;
{
_WINSTATIC union _REGS regs;

regs.h.ah = 0x59; /* get extended error info */
regs.x.bx = 0;
_intdos(®s,®s);

if (err){
err->exterror = regs.x.ax;
err->errclass = regs.h.bh;
err->action = regs.h.bl;
err->locus = regs.h.ch;
}

return(regs.x.ax);
}


  3 Responses to “Category : C++ Source Code
Archive   : VCCRT1.ZIP
Filename : DOSERR.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/