次の方法で共有


Extension-Agent Architecture

The most current extension-agent architecture uses the MIB-II extension agent and a fictitious Lanmgr-2 extension agent.

The master agent begins its initialization process by opening the SNMP\Parameters\ExtensionAgents subkey under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and enumerating the extension agents that are registered. Each value under this subkey represents another registry key in which an extension agent has stored configuration information. The following code example shows the configuration information for the subkey of an extension agent.

1 : REG_SZ : SOFTWARE\Microsoft\LANManagerMib2Agent\CurrentVersion
2 : REG_SZ : SOFTWARE\Microsoft\RFC1156Agent\CurrentVersion

Where SOFTWARE\Microsoft\LANManagerMib2Agent\CurrentVersion contains only the following.

Pathname : REG_EXPAND_SZ : lmmib2.dll
Windows CE does not support the expansion of SystemRoot – 
the only thing needed in the registry value is the name of the DLL – this differs from NT

SOFTWARE\Microsoft\RFC1156Agent\CurrentVersion contains only the following.

Pathname : REG_EXPAND_SZ : inetmib1.dll

The master agent requires the name of the library in order to load the extension-agent DLL through the LoadLibrary function.

The five Extension API functions are implemented in extension-agent DLLs and called by the SNMP service. Each extension-agent DLL uses only the Extension API to communicate with the SNMP service. An extension-agent DLL requires no active thread of execution, but you can create one if you need it. Each extension-agent DLL must export the following three entry points:

  • SnmpExtensionInit

  • SnmpExtensionQuery

  • SnmpExtensionTrap

    Note   The ExtensionInitEx, ExtensionQueryEx, and ExtensionClose functions are optional.

See Also

About SnmpExtensionInit | About SnmpExtensionQuery | About SnmpExtensionTrap | SNMP Extension Agent

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.