Plug and Play modems can be installed improperly and produce duplicate entries in the Modem Control Panel (two instances of the same modem). Add sections called PosDup and NoResDup to your PnP modems to prevent this.
If you are writing an INF file for a one-manufacturer, one-model modem device, there is no reason to put a PosDup or NoResDup section in the first draft of your INF file. If you run into duplicate installation problems during testing the installation of your modem, consider adding these sections to your INF file to fix the problem.
Some parallel port driven modems use LPTENUM PNP ID strings. For those devices generally no fix is required along the lines of NoResDup or PosDup.
Both PosDup and NoResDup sections end of doing the same thing if in an INF file for your modem. If a devnode for the device identified in the PosDup or NoResDup section is found in the devnode tree, the contents of that node are deleted and installation of your device is completed (the INF file is run to completion). In other words, use a PosDup or a NoResDup section in your INF to "get rid of the old device and install the new device."
If you use NoResDup, the operation described above is done arbitrarily, no questions asked. On the other hand, if you use PosDup, the resource duplication described above is done only if resources used by two devices are in conflict.
There is another major difference between NoResDup and PosDup. If you use NoResDup, simply finding a devnode for the device identified in the NoResDup section triggers the operation described above. If you put a NoResDup section in your INF file, this check is always made. On the other hand, if you use PosDup, the operation described above is triggered only if Configuration Manager detects a resource conflict.
The PosDup section is intended for the following scenario: When the user installs first Windows 95, a legacy internal modem in the machine and it is autodetected and its resources are entered in the comm port devnode (*PNP500); then enumeration comes along as second step in Windows 95 installation but this enumeration step causes no problems. Later the user gets a new internal modem and INF file, turns off the machine, installs the new internal modem, and restarts machine. Enumeration takes place and discovers the new modem. If there is a PosDup section in your the file that names *PNP500 then the enumerator will check *PNP500 for resource conflict and if it finds it deletes the contents of the old devnode before creating a new one for your modem. Be sure to test your INF using this scenario.
When Windows 95 is first installed, autodetection is done followed by enumeration. On subsequent restarts of Windows 95, only enumeration is done.
PosDup is an abbreviation for "possible duplicate." PosDup sections are used to prevent more than one installation of your modem. An example PosDup section from an INF file is
[Modem12.PosDup] *PNP0500
In this example, "Modem12" refers to the name of a modem in the Install section of the INF and "*PNP0500" refers to the node of the devnode tree for the serial port. This example PosDup section instructs the Windows 95 device installer to perform an extra step when it is running the script in the Install section of your INF file. When it encounters the Install section item that installs Modem12, the installer checks the serial port node of the devnode tree to see if that modem is currently installed. If it is, the installer deletes the existing devnode and runs the rest of the Modem12 Install section script to rebuild the devnode. This prevents a duplicate installation.
Examples usages of PosDup sections in modem INF files are shown below. To see other examples, search all existing Windows 95 INF files for "PosDup."
For ISAPNP modems the following commented changes are indicated. The changes are quite different than those used for a Serenum modem.
; Use PosDup and PNP ID, PosDup means possible duplicate ; *PNP0500 generally is a standard fixed devnode entry [Modem12.PosDup] *PNP0500 [Models] %Modem12% = Modem12,, UNIMODEM6A25C644 %Modem12% = Modem12, ISAPNP\BRI0A49_DEV0000 ; The strings section is not generally modified for ISAPNP modems
Some modems have several PNP devices. For example some modems contain both a DMA channel speakerphone device and a modem. Each device has its own PNP ID. If the device has no defined driver or resource in Win95 (in this case the DMA speakerphone device), place the second or additional unused modem ID strings in a special INF called NODRIVER.INF which effectively makes that "driverless device" accounted for in the Windows 95 registry.
[Boca] %*BRI0200.DeviceDesc%=NODRIVER,*BRI0200 [NODRIVER] [ControlFlags] ExcludeFromSelect=*BRI0200 [Strings] Msft="Microsoft" NoneName="Other detected devices" BocaMfg="Boca Research" *BRI0200.DeviceDesc="Boca Complete Office Communicator (Audio)" [Modem12.PosDup] *PNP0500 %Modem12% = Modem12,, UNIMODEM6A25C644 ; Boca Complete Office Communicator %Modem12% = Modem12, ISAPNP\BRI0A49_DEV0000 ; Boca Complete Office
If you use ExcludeFromSelect entries in your INF file, the name of your modem is excluded from the Select Device dialog during modem installation, as well as all other user interfaces.
Note that using ExcludeFromSelect in the multifunction card case does not exclude your daughter modem device from the Device Manager dialogs the users may employ to change a device driver for a daughter device.
NoResDup is an abbreviation for "no resource duplication." NoResDup sections are used to override the previous installation of a compatible modem. An example NoResDup section from an INF file is shown below, along with the Install section:
[Modem24.NoResDup] UNIMODEMC5D7521C, UNIMODEM7750BAAF, UNIMODEM705078AF ; Modem has two entries: one for serenum ID and one for the unimodem ID [Models] %Modem41PNP% = Modem24, SERENUM\PPI1907 ; PC288LCD V.34 %Modem41% = Modem24, UNIMODEMC5D7521C ; PC288LCD V.34
In this example, "Modem24" refers to the name of a modem in the Install section of the INF and the Unimodem ID of three modems that use equivalent resources are listed.
This example NoResDup section instructs the Windows 95 device installer to perform an extra step when it is running the script in the Install section of your INF file. When it encounters the Install section item that installs Modem24, the installer checks the devnode tree to see if a modem is currently installed with any of the modem ID strings listed in the NoResDup section are currently installed. If one is, the installer completely replaces it by running script in the Install section for Modem24.
An example usage of a NoResDup section in a modem INF file is shown below. To see other examples, search all existing Windows 95 INF files for "NoResDup."
For Serenum PnP modems the following commented INF section illustrate the technique.
; Below, exclude generic friendly strings from pick list [ControlFlags] ExcludeFromSelect=SERENUM\PPI1907 ; PC288LCD V.34 PNP ; Three unimodem ID strings appear below, generally use all applicable ; modem ID strings installed by modem24. ; Notice that commas separate each ID - this is the only format allowed [Modem24.NoResDup] UNIMODEMC5D7521C, UNIMODEM7750BAAF, UNIMODEM705078AF ; Provide all possible legacy ID strings (using Modem24 install) ; appearing in this INF ; Modem has two entries: one for serenum ID and one for the ; unimodem ID [Models] %Modem41PNP% = Modem24, SERENUM\PPI1907 ; PC288LCD V.34 %Modem41% = Modem24, UNIMODEMC5D7521C ; PC288LCD V.34 [Strings] Mfg = "Practical Peripherals" odem41PNP="Practical Peripherals PC288LCD V.34 Plug & Play" Modem41="Practical Peripherals PC288LCD V.34"
If your modem is a Plug and Play modem and you used NoResDup or PosDUp sections in your INF file to guarantee that your modem is not installed twice, then you must test this with at least the following test scenarios:
If your modem can be installed using all three of these procedures, and there are no duplicate installations of your modem, then the NoResDup and PosDup sections in your INF file are working correctly.
To check that your NoResDup or PosDup sections do not interfere with normal enumeration, do the following:
1. Physically install your Plug and Play modem.
2. Force enumeration by either shutting down the computer and then restarting it (cold boot) or click the Refresh button in the Device Manager.
3. Check the Control Panel or Device Manager to make sure your modem has been installed only once.
Once you are sure your modem INF file passes the normal enumeration scenario without duplicate installation, run the following test procedure:
1. Physically install your Plug and Play modem.
2. Force enumeration by either shutting down the computer and then restarting it (cold boot) or click the Refresh button in the Device Manager.
3. Run the Add New Modem wizard from the Control Panel, using the auto-detection option.
4. Check the Control Panel or Device Manager to make sure your modem has been installed only once.
Note that in some cases, even though you are using PosDup or NoResDup sections correctly in your modem INF file, enumeration followed by auto-detection will produce a duplicate modem entry in the Control Panel. This will be fixed in future Windows 95 releases.
Once you are sure your modem INF file passes both the normal enumeration and the enumeration followed by auto-detection scenarios without duplicate installation, run the following test procedure:
1. Physically install your Plug and Play modem.
2. Restart the computer.
3. Check the Control Panel to see if restarting the computer caused enumeration to use your INF file to install your modem. If so, use the Control Panel to remove your modem.
4. Run the Add New Modem wizard from the Control Panel, using the auto-detection option.
5. Once the Add New Modem wizard is done, enumeration is always run automatically, so no specific action is required of you to achieve the auto-detection followed by enumeration sequence.
6. Check the Control Panel or Device Manager to make sure your modem has been installed only once.