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

ID: Q232719


The information in this article applies to:


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.


MORE INFORMATION

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:

Rundll32.exe SMMSetup.dll, SMM_Setup /a|i|d <Dial-Up adapter name> <Session Management Module>[,<Session Management Module>[…]]
Rundll32.exe will load SMMSetup.dll and start executing the SMM_Setup entry point. Three options are available for the command.

a The <Session Management Module> key will be appended at the end of the SMM list for the DRIVERS\<Dial-Up Adapter name x> key.

i The <Session Management Module> key will be inserted at the beginning of the SMM list for the DRIVERS\<Dial-Up Adapter name x> key.

d The <Session Management Module> key will be deleted from the SMM list for the DRIVERS\<Dial-Up Adapter name x> key.

Multiple <Session Management Module> 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:

Rundll32.exe SMMSetup.dll,Overlaid_SMM /i|d|r <Session Management Module> <pathname>[,<pathname>[…]]
Rundll32.exe will load SMMSetup.dll and start executing the Overlaid_SMM entry point. Two options are available for the command.
i The <pathname> 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 <Overlaid_SMM> key.

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

r The existing Overlaid SMM chain is removed and replaced with the <pathname> list (with the first <pathname> at the beginning of the chain).
Multiple <pathname> 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]
;
; Session Management Module registration
;
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
;
; RunOnce for SMMSetup utility
;
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"

;****************************************************************************
; 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:

[Optional Components]  
This section lists the items that can be set up from this .inf file. EXT_SMM is the only item:


[EXTHOOK]  
This section contains the following values:

OptionDesc The displayed string value for the item in the selection box.
Tip The displayed string value for the description box when the item is selected.
CopyFiles SMM_SYS_CopyFiles indicates the section that contains the list of file(s) to copy.
AddReg SMM_Reg indicates the set of registry keys and values to add during installation.
IconIndex The integer value 21 is for a Dial-up networking mini-icon to be displayed in the selection box.


[SMM_SYS_CopyFiles]  
This section contains the list of files to be copied to the Windows system directory.

[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.


REFERENCES

For additional information about the use of Session Management Modules, please see the following articles in the Microsoft Knowledge Base:

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

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

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

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

Additional query words:


Keywords          : kbnetwork kbNDIS kbWinOS95 kbWinOS98 
Version           : WINDOWS:; Win95:; Win98:
Platform          : Win95 WINDOWS Win98 
Issue type        : kbhowto 

Last Reviewed: June 9, 1999