PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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
SNMPSet (Function)
In French: SNMPEcrit
Writes one or more values onto an SNMP agent for which an SNMP session was started.
Example
// Modify the name of the agent contact
SessionID is int = SNMPStartSession("127.0.0.1", "private")
sDesc is string = SNMPSet(SessionID, ".1.3.6.1.2.1.1.4", ...
"Administrator", snmpTypeString)
// Modify the name of the agent contact
SessionID is int = SNMPStartSession("127.0.0.1", "private")
// Use the MIB file
SNMPLoadMIB("c:\windows\system32\mib_ii.mib")
sDesc is string = SNMPSet(SessionID, "iso.org.dod.internet.mgmt.mib-2.system.sysContact", ...
"Administrator", snmpTypeString)
Syntax

Writing a value onto an SNMP agent Hide the details

<Result> = SNMPSet(<Session Identifier> , <OID to Modify> , <Type of Value> , <Value to Write>)
<Result>: Boolean
  • True if the modification was performed,
  • False if an error occurred. ErrorInfo returns more details about the problem.
<Session Identifier>: Integer
Identifier of SNMP session, returned by SNMPStartSession.
<OID to Modify>: Character string (with quotes)
Identifier of the SNMP object to modify. This string can correspond to the identifier in numeric format or in text format (the MIB file that describes the OID must have been loaded by SNMPLoadMIB).
<Type of Value>: Integer variable
Type of the value to modify:
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.
<Value to Write>: Character string
Value of the OID to write.

Writing several values onto an SNMP agent Hide the details

<Result> = SNMPSet(<Session Identifier> , <Array of OIDs to Write> , <Array of Types> , <Array of Values>)
<Result>: Boolean
  • True if all the values have been modified,
  • False if at least one error occurred. ErrorInfo returns more details about the problem.
<Session Identifier>: Integer
Identifier of SNMP session, returned by SNMPStartSession.
<Array of OIDs to Write>: Array variable
Array of strings containing the OIDs to write. Each OID can correspond to the identifier in numeric format or in text format (the MIB file that describes the OID must have been loaded by SNMPLoadMIB).
<Array of Types>: Array variable
Array of integers, containing the types of the values to write. At least one dimension of this array must be equal to <Array of OIDs to Write>. 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.
<Array of Values>: Array variable
Array of strings containing the new values. At least one dimension of this array must be equal to <Array of OIDs to Write>.
Remarks

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