HOWTO: Add an SNMP Extension Agent to the NT Registry

ID: Q128729


The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) for Windows NT


SUMMARY

After developing a new extension agent DLL, you must configure the registry so that the SNMP extension agent is loaded when the SNMP service is started. This article shows you how.


MORE INFORMATION

You can use REGEDT32.EXE to configure the registry, or you can have your SNMP extension agent installation program configure the registry using the Win32 registry APIs.

To configure an SNMP extension agent in the registry, follow these steps:

  1. Walk down:
    
          HKEY_LOCAL_MACHINE\ 
             SYSTEM\ 
             CurrentControlSet\ 
             Services\ 
             SNMP\ 
             Parameter\ 
             ExtensionAgents 
    You'll notice at least one entry like this:
    1:REG_SZ:SOFTWARE\Microsoft\LANManagerMIB2Agent\CurrentVersion
    Add an entry for the new extension agent. For the SNMP Toaster sample in the SDK, the entry is:
    3:REG_SZ:SOFTWARE\CompanyName\toaster\CurrentVersion
    This entry provides a pointer to another registery entry (see step 2) that contains the physical path where the extension agent DLL can be found. Note that "CompanyName" and "toaster" strings can be any other meaningful strings that will be used in Step 2.


  2. Go to:
    HKEY_LOCAL_MACHINE\SOFTWARE
    Create keys that correspond to the new entry in step 1:
    CompanyName\toaster\CurrentVersion


  3. Assign the path of the extension agent DLL as the value to the CurrentVersion key in step 2. For the SNMP toaster sample agent DLL, the entry is:
    Pathname:REG_SZ:D:\mstools\samples\snmp\testdll\testdl.dll


  4. Note that names and values in the NT registry are case sensitive.


  5. Restart the SNMP service from the control panel. The new extension agent DLL will be loaded. Event Viewer in the administrative tools can be used to view errors encountered during the startup process of the SNMP service and extension agents.



REFERENCES

SNMP.TXT in the \BIN directory of the Win32 SDK.

Windows NT Resource Guide, Chapters 10-14.

Additional query words:

Keywords : kbnetwork kbNTOS350 kbSDKPlatform kbSNMP kbGrpNet
Version : NT:
Platform : NT
Issue type :


Last Reviewed: January 10, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.