Partager via


SnmpExtensionInitEx (Compact 2013)

3/26/2014

This function is called by the Microsoft SNMP service to identify any additional management information base (MIB) subtrees the SNMP extension agent supports. This function is an element of the SNMP Extension Agent API.

Syntax

BOOL SnmpExtensionInitEx(
  AsnObjectIdentifier* pNextSupportedRegion 
);

Parameters

  • pNextSupportedRegion
    [out] Pointer to an AsnObjectIdentifier structure to receive the next MIB subtree that the extension agent supports.

Return Value

If the pNextSupportedRegionparameter has been initialized with an additional MIB subtree, the return value is TRUE.

If there are no more MIB subtrees to register, the return value is FALSE.

Remarks

The SNMP service repeatedly calls the SnmpExtensionInitEx function entry point so the extension agent can register support for additional MIB subtrees.

The SNMP service makes a copy of the AsnObjectIdentifier structure the extension agent returns in the pNextSupportedRegion parameter. The extension agent must allocate and deallocate the resources associated with the original structure. It can do this when the SNMP service calls the SnmpExtensionClose function.

If there are two agents with the same region, the first one in the list has priority. If that query happens to return nosuchname, then the first agent will continue down the list and the second agent can attempt the query. The list of regions in the registry is determined by the order in which the subagents are loaded. Typically overlapping subagents are not a problem; when it does occur, the one listed earlier in the registry has higher precedence.

Requirements

Header

snmp.h

Library

snmp.lib

See Also

Reference

SNMP Functions
SnmpExtensionInit
SnmpExtensionClose
AsnObjectIdentifier