Microsoft KB Archive/232719

{|
 * width="100%"|

HOWTO: Windows 95/98 Session Management Modules (4/5)

 * }

ID: Q232719

-

The information in this article applies to:


 * Microsoft Windows 98, on platform(s):
 * The Microsoft Windows operating system versions 95, 98
 * Microsoft Windows 95 Driver Development Kit (DDK)
 * Microsoft Windows 98 Driver Development Kit (DDK)

-

SUMMARY
Dial-Up Networking uses Session Management Modules to abstract the interface presented by the Dial-up server. This is the fourth of five Knowledge Base articles describing the use of Session Management Modules.

4. Setting Up an External Session Management Module
Two elements are required to set up an external Session Management Module for Windows 95 Dial-Up Networking.

4.1. Session Management Module Setup Dynamic Linked Library (SMMSetup.dll)
SMMSetup.dll contains utilities to modify the machine-dependent Dial-Up Networking information in the registry layout which cannot be specified statically in the setup .inf file. These are: a) the SMM order for a Dial-Up adapter and b) the list of the overlaid SMM.

4.1.1. Modifying the Session Management Module Order
To run the utility, the setup utility in SMMSetup.dll must be invoked with the following command line:

"i" Rundll32.exe will load SMMSetup.dll and start executing the SMM_Setup entry point. Three options are available for the command.

a The  key will be appended at the end of the SMM list for the DRIVERS\ key.

i The  key will be inserted at the beginning of the SMM list for the DRIVERS\ key.

d The  key will be deleted from the SMM list for the DRIVERS\ key.

Multiple  parameters can be specified in a single call; the command will operate on each parameter from left to right. The command line is specified as a part of the setup .inf file for the external SMM.

4.1.2. Modifying the List of Overlaid Session Management Module
To run the utility, the setup utility in SMMSetup.dll must be invoked with the following command line:

"d" Rundll32.exe will load SMMSetup.dll and start executing the Overlaid_SMM entry point. Two options are available for the command.

i The  value will be inserted into the overlaid SMM list by replacing the current pathname in the Path value and moving the current pathname to the SMM list in the  key.

d The  value will be deleted from the overlaid SMM list whether it is in the Path value or the SMM list in the  key.

r The existing Overlaid SMM chain is removed and replaced with the  list (with the first  at the beginning of the chain). Multiple  parameters can be specified in a single call; the command will operate on each name from right to left. The command line is specified as a part of the setup .inf file for the external SMM.

4.2. Session Management Module Setup .inf file
Dial-Up Networking uses the standard Windows Setup program to add the Session Management Module into the Dial-Up Networking registry layout. The Windows Setup program requires a setup .inf file. The following highlights the required sections in the .inf file:

[DestinationDirs] SMM_SYS_CopyFiles  =11

[Optional Components] EXT_SMM

[EXT_SMM] OptionDesc=%SMM_Desc% Tip=%SMM_Tip% CopyFiles=SMM_SYS_CopyFiles AddReg=SMM_Reg IconIndex= 21                  ;Dial-up networking mini-icon for dialogs

[SMM_SYS_CopyFiles] extsmm.dll smmsetup.dll

[SMM_Reg] HKLM, SYSTEM\CurrentControlSet\Services\RemoteAccess\Authentication\SMM_Files\EXTSMM, Desc,, %SMM_Desc% HKLM, SYSTEM\CurrentControlSet\Services\RemoteAccess\Authentication\SMM_Files\EXTSMM, Usage,1,01,00,00,00 HKLM, SYSTEM\CurrentControlSet\Services\RemoteAccess\Authentication\SMM_Files\EXTHOOK, Options,1,17,00,00,00 HKLM, SYSTEM\CurrentControlSet\Services\RemoteAccess\Authentication\SMM_Files\EXTHOOK, Protocols,1,07,00,00,00 HKLM, Software\Microsoft\Windows\CurrentVersion\RunOnce,"%SMMSetup_Order_Desc%",,"rundll32.exe smmsetup.dll,SMM_Setup /a MAC EXTHOOK" HKLM, Software\Microsoft\Windows\CurrentVersion\RunOnce,"%SMMSetup_Overlay_Desc%",,"rundll32.exe smmsetup.dll,Overlaid_SMM /i EXTHOOK extsmm.dll"
 * Session Management Module registration
 * Session Management Module registration
 * RunOnce for SMMSetup utility
 * RunOnce for SMMSetup utility


 * User-visible strings
 * User-visible strings

[Strings] SMM_Desc = "External Session Management Module name" SMM_Tip  = "Allows you to do additional session management over Dial-up Networking" SMM_Desc     = "External Session Management Module" SMMSetup_Order_Desc = "External SMM Order Setup" SMMSetup_Overlaid_Desc = "External SMM Overlaying List Setup" When a user wants to install an external SMM this .inf setup file and all the SMM modules and the SMMSetup.dll should be on the provided diskettes. The steps for installing an SMM are:


 * 1) Click Start, go to Settings and double-click Control Panel.
 * 2) Double-click Add/Remove Programs.
 * 3) Click the Windows Setup tab.
 * 4) Open the Windows Setup page in the "Add/Remove Programs" icon in Control Panel.
 * 5) Click Have Disk.
 * 6) Insert the diskettes with the .inf setup file when prompted. The next page will display the external SMM item.
 * 7) Check the item and click Install.

The Windows Setup program uses the information from this .inf setup file as follows:

 [DestinationDirs] "SMM_SYS_CopyFiles  =11" This section tells Setup to copy the external files to the Windows system directory:

<pre class="CODESAMP">[Optional Components] This section lists the items that can be set up from this .inf file. EXT_SMM is the only item:

<pre class="CODESAMP">[EXTHOOK] This section contains the following values:

<pre class="CODESAMP">[SMM_SYS_CopyFiles] This section contains the list of files to be copied to the Windows system directory.

<pre class="CODESAMP">[SMM_Reg] The lines below the Session Management Module registration comment sets up the Dial-Up Networking registry layout for the Session Management Module except for the SMM order. The line below the RunOnce for SMMSetup utility comment tells the Windows Setup to execute the SMM setup utility during the installation.