Uses the Simple Network Management Protocol (SNMP) to set a value on a target computer of network device.

Function Group Execution Windows Embedded Thin Client
SNMPSet System Info Synchronous Supported Not supported Supported


SNMPSet( strAddress, strCommunity, strOID, Value, optNumType )
The address of the target computer or device (e.g., "" or "localhost" ).
The SNMP community name (e.g., "public" ) when communicating with the target computer or device.
The Object ID (OID) to be set.
The value to be set to the specified OID.
A numeric value, or a tag of Integer type, specifying the data type of Value. This is an optional parameter, but if it is included, then it must have one of following values:
Value Type Description
0 OCTETSTRING An ctet string variable
1 INTEGER32 A 32-bit signed integer variable
2 TIMETICKS A timeticks variable
3 GAUGE32 A gauge variable
4 COUNTER32 A counter variable
5 IPADDRESS An IP address variable
6 OBJECTIDENTIFIER An object identifier variable
7 SEQUENCE An ASN sequence variable
8 OPAQUE An opaque variable

Returned value

Value Description
0 No error
−1 Invalid number of parameters
−2 Invalid parameter
−3 Cannot connect to the remote machine
−4 Cannot connect to the remote machine
−5 SET operation failed
−6 Invalid OID
−7 Invalid tag name
−8 Invalid tag type
−9 This function is not supported in the current OS


Tag Name Expression
  SNMPSet( "", "public", ".", 123, 1 ) //Sets an integer value of 123 to the specified OID on the localhost (