Device Contention in Windows 95

Last reviewed: March 13, 1996
Article ID: Q130402
The information in this article applies to:
  • Microsoft Windows 95

SUMMARY

"Device contention" refers to the ability of Windows to arbitrate requests for the use of a device (usually a serial port) by more than one program, one of which is not a Windows-based program. Windows 95 does not by default allow a Windows-based program to use a serial port that was previously used by a non-Windows-based program running in a virtual machine (VM) until that VM is closed. This behavior is different from previous versions of Windows, in which the default behavior is for the device to be released after a two- second period of inactivity.

MORE INFORMATION

The state of Windows 95 device contention is determined by the value for the "COM<n>AutoAssign=<x>" setting in the [386Enh] section of the System.ini file, where <n> is the number of the serial port and <x> is a value from -1 to 1000.

The default setting in Windows 95 is -1. This setting causes Windows 95 to not release a serial port previously used by a non-Windows-based program running in a VM until that program's VM is closed. When an MS-DOS-based or Windows-based communications program requests the use of a serial port, Windows 95 checks to see if the port is in use. If the port is available, Windows 95 gives the program access to the port. You can change this behavior by adding "COM<n>AutoAssign=<x>" to the [386Enh] section of the System.ini file. The default value for this setting in Windows version 3.1 is 2, causing Windows to grant access to the port after two seconds of port inactivity. In Windows 95, this default has been changed for compatibility with some of the Windows 95 tools that have automatic answering capability (such as Microsoft Fax and Dial-Up Networking Server).

If a Windows-based program attempts to use the serial port before the VM is closed, you receive one of the following error messages:

  • Another program is using the selected Telephony device. Try again after the other program completes.
  • Cannot initialize port.

WARNING: If you set COM<n>AutoAssign=2, do not run a 32-bit communications program (such as HyperTerminal) and then attempt to run an MS-DOS-based communications program. Because of the way the 32-bit program controls the port, the MS-DOS-based program will be unable to access it and may cause your system to stop responding (hang).

If you need hot-swapping capability between an MS-DOS-based communications program and a Windows-based communication program, add the following entry to the [386Enh] section of the System.ini file:

   Com<n>AutoAssign=0

This setting allows an MS-DOS-based application to hand off a "hot port" to a Windows-based program with no delay. This is sometimes necessary in bulletin board administration. This configuration can cause some problems or instabilities because two programs can send commands to the modem at the same time.

NOTE: Although all the settings described in this article work, we recommend that you use the default setting of -1.


KBCategory: kbenv kberrmsg
KBSubcategory: wpp95 win95 wincomm
Additional reference words: 95 comxautoassign


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 13, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.