home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************************\
- *
- *
- * PROCEDURE - Get Version
- *
- * PURPOSE - Returns the DESQview major/minor version numbers, and
- * sets the inDV flag to the same value. The high byte
- * of the return value is the major version number, and
- * the low byte is the minor.
- *
- *
- * GENERAL ALGORITHM - Call the DOS set date function with an invalid date
- * of 'DESQ'. DESQview will respond to this if present.
- *
- * INPUT - none.
- *
- * OUTPUT - the DESQview API version number.
- *
- * SYSTEM - Borland's Turbo C++ v1.0 on an EPSON EQUITY III+
- * running MS-DOS v4.01 & DESQview v2.26. Should operate
- * under any MS/PC-DOS 2.x or greater & DESQview 2.x or
- * greater.
- *
- * HISTORY:
- * 90-07-28 - Initiated Mark Potter
- *
- \***************************************************************************/
-
- #include <dos.h>
- #include "dvaware.h"
-
- unsigned int dv_get_version(
- void
- ) {
- _CX = 0x4445; /* 'DE' */ // set CX to 4445H; DX to 5351H
- _DX = 0x5351; /* 'SQ' */ // (an invalid date)
- _AX = 0x2B01; // DOS' set data function
- geninterrupt( 0x21 ); // call DOS
- if ( _AL != 0xFF ) // if DOS didn't see as invalid
- _AX = _BX; // AH=major ver; AL=minor ver
- else // DOS saw as invalid
- _AX = 0; // no desqview
- inDV = _AX; // Save version in inDV flag
- return _AX; // Return version number
- }
-
- // END DVGETVER.CPP
-