PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Tip: browsing the values of an OID
  • Limitation
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
SNMPGetNext (Function)
In French: SNMPLitSuivant
Reads the value found after the last value retrieved for an SNMP agent.
Note: This function can be called only if SNMPGet was used at least once. In this case, SNMPGetNext reads the next value of the SNMP agent. Otherwise, the OID found before the OID to read must be specified in SNMPGetNext.
Example
// Read the description of the local system
SessionID is int = SNMPStartSession("127.0.0.1")
nType is int
sDesc is string = SNMPGet(SessionID, ".1.3.6.1.2.1.1.1", nType)

sOID is string
sInfo is string
// Read the next value
sInfo = SNMPGetNext(SessionID, sOID, nType)
Syntax
<Result> = SNMPGetNext(<Session Identifier> [, <Previous OID> [, <Returned Type>]])
<Result>: Ansi character string
  • Value of the OID returned by the agent. The type of the value is retrieved in an integer variable (<Returned Type>).
  • Empty string ("") if an error occurred. In this case, the ErrorOccurred variable is set to True and ErrorInfo returns more details about the problem.
<Session Identifier>: Integer
Identifier of SNMP session, returned by SNMPStartSession.
<Previous OID>: Optional character string (with quotes)
Identifier of the SNMP object found before the SNMP object to read. This string can correspond to the identifier in text format or in numeric format (the MIB file that describes the OID must have been loaded by SNMPLoadMIB).
Once the function has been run, this parameter contains the OID of the element read (in numeric format).
<Returned Type>: Optional Integer variable
If this parameter is specified, the variable will be assigned with the type of the retrieved value. The following constants are available:
snmpTypeIPAddressThe OID contains an IP address.
snmpTypeBitsThe OID contains bits.
snmpTypeStringThe OID contains a string.
snmpTypeCounter32The OID is a counter (signed integer on 32 bits).
snmpTypeCounter64The OID is a counter (signed integer on 64 bits).
snmpTypeUnsignedIntegerThe OID contains an unsigned integer.
snmpTypeIntegerThe OID contains an integer.
snmpTypeProgressBarThe OID contains a progress bar.
snmpTypeNullThe OID is not associated with a value (a branch with child elements but without value by itself for example).
snmpTypeOIDThe OID contains an OID.
snmpTypeOpaqueThe OID contains a value that cannot be interpreted directly.
snmpTypeTicksThe OID contains a number of ticks.
Remarks

Tip: browsing the values of an OID

If the first identifier of the OID of an agent to browse is unknown, use the following syntax:
SNMPGetNext(<Identifier>, "0")

Limitation

The SNMPxxx functions can only be used from Windows 2000 (they cannot be used with the following systems: Windows 98, Me or NT4).
Components
WINDEVWEBDEV - Server codeReports and Queries wd230com.dll
Minimum required version
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment