Chapter 11 - Interprocess Communications for Windows Workstations
API Support on Windows and Windows for Workgroups Workstations
Applications that use the Netbios and Named Pipe APIs are supported on workstations running either Windows or Windows for Workgroups (WFWG). This chapter describes how interprocess communications work in both environments.
Running Windows in 386 enhanced mode lets you create virtual machines. You can create multiple virtual machines to run more than one Netbios or Named Pipes application in multiple windows.
Named Pipe support is provided by using PCNETB and SETNETB to connect with a Netbios name service before running Windows or WFWG.
There are three procedures for providing support for Netbios applications on a Windows workstation. The first and second procedure provide support only for Windows workstations. The third procedure includes support for Windows for Workgroups workstations. The three procedures are:
![]()
Run PCNETB and SETNETB before running Windows. This lets you configure your workstation so all Netbios applications use a single Netbios naming service. There are three restrictions to this procedure: - The total number of Netbios sessions is limited to the number of sessions specified by the /SES switch in PCNETB, or by the Login Environment Setting in PCCONFIG. If you run multiple applications, they share all Netbios resources, including total sessions, total Netbios names, and the permanent node ID and machine name added by SETNETB.
- If you close an application window while there are outstanding Netbios requests, a DOS communications error message appears.
- Netbios software is loaded into every window open on the workstation. For windows not running Netbios applications, this procedure wastes memory.
![]()
Add the PCNETB and SETNETB commands to a WINSTART.BAT file you create. This file only lets you run Windows Netbios applications. You cannot run DOS Netbios applications. In addition, you cannot place PCNETB and SETNETB commands in a WINSTART.BAT file when you run WFWG. ![]()
Run PCNETB and SETNETB from a DOS window. This lets you run DOS Netbios applications from your workstation. Each window that runs a DOS Netbios application uses a unique instance of PCNETB and may use a unique Netbios naming service. This method also provides support for Netbios under Windows for Workgroups. Once you exit Windows, however, the connection is broken.
The two procedures that provide Netbios and Named Pipe support under Windows are described in the following sections, "To Run Netbios Commands Before Starting Windows" and "To Run Netbios Commands After Starting Windows." These procedures describe running PCNETB and SETNETB before and after running Windows.
The third procedure, which also provides support under Workgroups for Windows, is described in the section "To Run Netbios Applications from an MS-DOS Window."
Be sure you read Chapter 5 before starting any of these procedures. Chapter 5 explains how Netbios and Named Pipe APIs work in both Windows and WFWG environments.
To Run Netbios Commands Before Starting Windows
1. Use PCCONFIG to configure the workstation for Netbios support according to instructions in Chapter 7.
2. At a DOS prompt, enter ban to log in to the network.
3. Run SETNETB and specify the service name.
4. If you configured SETNETB in your VINES user profile, proceed to step 5. To run SETNETB manually, enter SETNETB on the DOS command line, according to instructions in Chapter 7.
5. Run Windows.
6. Run Netbios or Named Pipes applications.
With this procedure, your applications can be Windows or DOS applications, and you can run multiple applications. If you use the BAN/ NC option, however, the software you configured using PCCONFIG is not loaded.
This procedure affords the most flexibility. However, consider the following:
![]()
If you run multiple applications, they share all Netbios resources, including: - Total sessions
- Total Netbios names
- Permanent node ID and machine name added by SETNETB
![]()
If you add a Netbios name from within a window, the name applies to any other windows you open subsequently. If an application adds a Netbios name and then quits, the name is still registered to that machine. Another application attempting to add the same unique Netbios name gets an error.
To clear the Netbios name, either:
- Run another application to delete the name
- Run SETNETB again
- Reboot the system
![]()
If you close an application's window while there are outstanding Netbios requests, a DOS prompt communications error message appears. ![]()
Multiple applications that try to use the same Netbios name may experience anomalous behavior. For example, if two applications running in different windows issue a LISTEN for the same Netbios name, only one is satisfied by an incoming CALL for that name, as if the two LISTENs were issued from the same window.
To Run Netbios Commands After Starting Windows
1. Make sure Netbios or Named Pipe support is disabled in PCCONFIG.
2. Log in to the network.
3. Run Windows.
4. Open a DOS window through the DOS Prompt icon.
5. Run PCNETB if you run a Netbios application or INNS.EXE if you run a Named Pipe application.
6. Run SETNETB and specify the service name.
7. Run the Netbios or Named Pipe application.
Repeat steps 4 through 7 for each Netbios application you want to run.
Note: You can run only one DOS Named Pipes application in this procedure.
When you run SETNETB in more than one window and use the same Netbios naming service, specify the /PERMID:hex-value switch to assign a different permanent node ID to your virtualized Netbios machine. The /PERMID node ID is a a hex address of up to 12 digits. Otherwise, SETNETB returns an error message, "Service not available."
By default, SETNETB uses the LAN card address as a node ID. Running SETNETB in another window returns the same node ID unless you specify another ID with the /PERMID switch.
You do not need to use this switch if you run only one Netbios application or if you access different Netbios naming services for each window.
If you run a Windows Netbios or Named Pipe application, refer to "To Create Batch Files to Run Netbios Applications in Windows," which follows, for instructions on creating special batch files.
To Create Batch Files to Run Windows Netbios Applications
If you run a Windows Netbios or Named Pipe application (as opposed to a DOS Netbios or Named Pipe application), you must create two batch files. Create these batch files using any ASCII text editor or the Windows Notepad application.
The first file, BANSTART.BAT, modifies the AUTOEXEC.BAT file. BANSTART.BAT explicitly loads all VINES resident software, except for INNS or PCNETB, and loads REDIRNPx rather than REDIRx.
The comments (lines beginning with "rem") are for your information and do not need to be included in your BANSTART.BAT file. Your BANSTART.BAT file should include these lines:
ban /nc
rem Enter your LAN card driver.
3c503ban.com
rem For DOS 4.x, use redirnp4.
rem BAN would normally load redirx.
redirnp4
rem BAN loads PCNETB or INNS at this point.
z:login
win
The first line loads BAN with the /NC switch. The /NC switch prevents the communications environment from initializing, so loading the LAN driver can be done explicitly.
The next lines load the communications driver, the proper redirector, and initiates the login sequence. The last line starts Windows.
The second file, WINSTART.BAT, runs when Windows first starts. It is similar to an AUTOEXEC.BAT file that runs when DOS boots. You can configure the Windows WINSTART.BAT file to load Netbios support and attach to a Netbios service. If you do this, turn off the Load Netbios Support option in the Special Software Settings screen of PCCONFIG. Note that this procedure works only with Windows, not with Windows for Workgroups.
Your WINSTART.BAT file should include these lines:
PCNETB
rem or enter INNS.EXE
SETNETB /name:windownp1 nbservice@sales@wctus
To Run Windows Netbios or Named Pipe Applications Using a Batch File
1. Log in to the network using the BANSTART.BAT file rather than the AUTOEXEC.BAT file.
2. Make sure the WINSTART.BAT file described in the previous section, "To Create Batch Files to Run Windows Netbios Applications," is included in the same directory as the WIN.EXE file.
3. Start Windows.
4. Run your Windows Netbios or Named Pipe application.
API Support Under Windows and Windows for Workgroups
You can run a Netbios application from an MS-DOS window in either a Window or Windows for Workgroups environment. You must be sure that the software allocates a time slice to your background tasks. By default, no time slice is allocated to background tasks.
To Run Netbios Applications from an MS-DOS Window
1. Boot the workstation and run either Windows or Windows for Workgroups.
2. Double-click the MS-DOS Prompt icon in the Main group. An MS-DOS window appears on the screen.
3. Press ALT-ENTER to display the MS-DOS window.
4. Choose Settings from the control menu. The MS-DOS Prompt dialog box, Figure 11-1, appears.
5. Under Tasking Options, click on Background. An X appears in the box.
6. Click OK. You return to the MS-DOS window.
7. Run PCNETB and SETNETB using the command formats as specified in Chapter 7.
8. Run your DOS Netbios/Named Pipe application.
Using Banyan DOS Netbios with WFWG
When using Banyan DOS Netbios with Windows for Workgroups, observe the following guidelines:
![]()
Banyan DOS Netbios must be loaded before WFWG starts if you use it for sharing. ![]()
The default parameters for PCNETB may not be sufficient. If you receive error messages or notice poor performance, use the following settings for the /nam, /ses, and /cmd settings: /nam:32
/ses:16
/cmd:32
![]()
Depending on how you use the workstation, you may receive a message that NETHEAP needs to be increased. This message gives you instructions and suggests a new value for the NETHEAP setting. ![]()
Banyan DOS Netbios works only with the Netbios in VINES version 5.52 (5) or higher.
Enabling Network File Sharing Under WFWG
This section describes two scenarios for using Netbios with Windows for Workgroups to enable network file sharing. The scenarios described in this section work only with Windows for Workgroups 3.11 and involve:
![]()
Sharing resources over Banyan Netbios (applications and peer-to-peer file sharing) ![]()
Restricting Banyan Netbios to applications
Sharing Resources in a Workgroup over Netbios
All users in a workgroup who connect to the same Banyan Netbios naming service can share resources as specified by Windows for Workgroups regardless of physical location. They can also share resources with machines on the same LAN segment that are only using Microsoft's Netbios (such as Windows NT or NTAS workstations).
To Make Sure Users Sharing Resources Belong to the Same Workgroup
1. At each user's workstation, double-click the Network icon in the Control Panel. The Microsoft Windows Network dialog box appears.
2. Make sure the Workgroup text box displays the correct workgroup name.
3. Choose the OK button.
Configuring WFWG to Restrict Netbios to Applications
You can configure Windows for Workgroups so that Banyan Netbios can be used only by Netbios applications, but will not be used by Windows for Workgroups. This allows Netbios applications to use the distributed features of Banyan DOS Netbios while preventing the use of WFWG peer-to-peer connections (a security issue at some sites).
Configuring your workstation to restrict Netbios to applications involves:
![]()
Setting the default protocol ![]()
Editing the PROTOCOL.INI file ![]()
Editing the SYSTEM.INI file
To Set the Default Protocol for a WFWG Workstation
1. Double-click the Network Setup icon in the Network program group. The Network Setup dialog box appears.
2. Choose the Drivers button. The Network Drivers dialog box appears.
3. Select Banyan VINES.
4. Choose Set as Default Protocol. This sets VINES as the default protocol.
5. Choose the Close button. The Network Setup dialog box appears.
6. Choose the OK button.
To Edit the PROTOCOL.INI File for a WFWG Workstation
1. Open the PROTOCOL.INI file using a text editor.
2. Locate the [Network.Setup] section.
3. Increase all LANA settings in the network.setup section by one. For example, change LANA0 to LANA1. Do not leave any settings at LANA0.
4. Locate the [NETBEUI] section.
5. Change the LANABASE entry to match the LANA for ms$netbeui (usually 1) from the network.setup section. If there is no LANABASE entry, add the line (or the correct number for your setup):
LANABASE=1
6. Save and close the PROTOCOL.INI file.
To Edit the SYSTEM.INI File for a WFWG Workstation
1. Open the SYSTEM.INI file using a text editor.
2. Locate the [Network] section.
3. Add the following line to prevent WFWG from using LANA 0:
Exclude=0
The Exclude statement specifies that WFWG should not use the protocols represented by the LANA numbers assigned to this setting. This completes the workstation modifications. You must restart your workstation for these changes to take effect.
The next section describes the software programs that make up the Named Pipe support on either a Windows or WFWG workstation.
Named Pipe Software for Windows or WFWG Workstations
The software programs that make up the Named Pipe support on a Windows or Windows for Workgroups workstation depend on whether or not the workstation also needs to run a Netbios application. Table 11-1 describes the files necessary to run Named Pipe applications on Windows workstations.
The Banyan networking software components that allow a DOS client application to exchange information with an OS/2 Named Pipe server are shown in Figure 11-2.
To optimize the performance of your network software, you can specify the VINES protocol as the default network protocol.
To Optimize Network Software Performance
1. Double-click on the Windows Setup icon in the Main group window.
2. Choose Change Network Settings from the Options menu. The Network Settings dialog box appears.
3. Click on the Drivers button. The Network Drivers dialog box appears.
4. Select Banyan VINES protocol and click on the Set As Default Protocol button.
5. Click on the Close button. The Network Settings dialog box appears.
6. Click on the OK button. A dialog box appears, notifying you that system files have changed.
7. Click on the OK button. A dialog box appears, notifying you that you have to restart your workstation for your changes to take effect.
8. Restart your workstation.