ISDS - MiniDriver-1 Fix

From OS2World.Com Wiki
Revision as of 22:17, 19 April 2020 by Jugbogdan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

There is a fix needed for the MiniDriver-1 in order for it to operate correctly on OS/2 Warp.

The graphics engine (GRE) in OS/2 Warp defines a new enable subfunction, subfunction 14 (decimal). MiniDriver-1 should return -1, GPI_ALTERROR, from OS2_PM_DRV_ENABLE() when the Warp GRE calls with subfunction 14, but in error, the MiniDriver-1 returns the contents of an uninitialized, automatic variable (ulrc) which is usually zero.

To correct the MiniDriver-1 code, add a "default" case to the switch statement in OS2_PM_DRV_ENABLE function in ENABLE.C. The default case will look something like this...

      default:
        // unknown, unsupported enable subfunction
        ulrc = -1;
        break;

and should be inserted at line 696 in ENABLE.C from DEVCON Device Driver Kit for OS/2 Version 1.0 - 1994.