Microsoft KB Archive/35627

From BetaArchive Wiki

File Handle Open Function Incompatibilities ID Number: Q35627

2.x 3.x 4.00 MS-DOS

Summary:

The MS-DOS File Handle Open function (interrupt 21h, function 3Dh) changed in its parameter usage between MS-DOS Versions 2.x and MS-DOS Versions 3.00 and later. The access codes of this service (the BYTE contained in the AL register passed to this DOS service) were extended in MS-DOS Versions 3.00 and later in order to support network file I/O and file inheritance (inheriting file handles from a parent process and through an overlay). When using MS-DOS Versions 2.x, the only valid access codes that can be used in this register are 00h, 01h, and 02h. Any other values will result in an error code of 0Ch returned by this service in the AX register. Because of this, programs written for MS-DOS Versions 3.00 and later that include support for networks and/or file inheritance will not work correctly on Version 2.x machines. Programs written for Versions 2.x are upwardly compatible to Versions 3.x, however. Programs should be careful to not set this register when running under MS-DOS Versions 2.x.