Version: 2.8.5
Create custom SNMP Manager, Trap and Agent applications for monitoring and controlling network devices.

Snmp Manager ActiveX Control

Use the Manager control to easily add SNMP manager functionality to your application. Provides an easy-to-use interface that handles the details of querying SNMP agents that exist on the network. Features include:

  • Supports SNMP versions 1 and 2.
  • Requires no other system support besides basic Winsock transport.
  • No knowledge of SNMP message formats required.
  • Reads MIB files and compiles them into easy-to-use objects.
  • Manager control has built-in timeout mechanism for requests so you don't have to implement your own.
  • Build a message by setting properties, adding variables (OIDs) using simple Variable Objects, and sending the message. It doesn't get any easier!

Development Environments

  • Visual Studio .NET (.NET Framework)
  • Visual Basic (VB)
  • Visual C++ (VC++)
  • FoxPro
  • PowerBuilder
  • Delphi
  • C++ Builder
  • ASP
  • Office 97/2000

Interface

Public Properties
AgentName Name (hostname or IP address in dot notation) of the SNMP agent associated with the Message property.
AgentPort Port number used by the SNMP agent associated with the Message property.
AgentVariable Make a single variable Get/Set request. Set the property to a value, and a request of type snmpSet1 executes. Assign the property to a variable, and a request of type snmpGet1 executes. In both cases, execution blocks until confirmation is received from the agent.
Blocked A True value indicates the control is currently executing a blocking method (Timeout is greater than 0), which has neither completed nor timed out with a ptTimeout error.
LocalAddress Returns the address in use while the socket is active and an empty string when the UDP socket is closed.
LocalPort Returns the port number in use while the socket is active and 0 when the socket is closed. When the Protocol property of the UDP Control is not ptUdp, LocalPort returns 0.
Message Current SnmpMessage Object.
SendDatagramCount Number of datagrams queued for sending.
Timeout Controls the blocking behavior of methods that can be used in blocking and non-blocking ways.
Public Methods
Abort Abort any blocking method and release all system resources.
About Show the About Box.
Close Release system resources.
Open Allocate a socket for sending and receiving datagrams.
Send Encode and send an SNMP message.
Trace Start or stop the accumulation of trace or debug data. Once started, this method accumulates data until it is turned off.
Public Events
Error Fires when an error condition occurs.
Response Fires after a response has been received and decoded into the Message property. Use the Message, AgentName, and AgentPort properties to obtain the decoded message and its source.
Send Fires when the system accepts a datagram for transmission.
Trap Fires after a trap message has been received from an agent and decoded into the Message property. Use the Message, AgentName, and AgentPort properties to obtain the decoded message and its source.

Code Example

How easy is the Manager control to use? Check out the following VB example below, which demonstrates requesting a variable from an agent, displaying the agent's response, then setting a variable on the agent.

Dim Value As SnmpVariable

'AgentPort property defaults to 161.
Manager1.Message.Reset

Manager1.AgentName = "agent.dart.com"
Manager1.AgentPort = 161

'Get the sysContact for the agent using the AgentVariable property
Set Value = Manager1.AgentVariable("1.3.6.1.2.1.1.4.0")

' Display the value
List1.AddItem Value.Value

'Set the sysDescr for the agent using the AgentVariable property
Manager1.Message.Reset
Value.Type = snmpOctetString
Value.Value = "450mhz with WinNT 4.0"
Manager1.AgentVariable("1.3.6.1.2.1.1.1.0") = Value

Related Products: