PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • WLanguage Procedure
  • 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
SNMPTrapEnable (Function)
In French: SNMPTrapActive
Enables the interception of an SNMP "trap" sent by an agent.
Note: the SNMP interruption service must be installed on the computer and this service must be started. If the user is an administrator or a user with rights, the service starts automatically (except if it was explicitly disabled).
// Intercept all the traps
nTrapID is int
nTrapID = SNMPTrapEnable("TrapProc", "", "", "")
Syntax
<Result> = SNMPTrapEnable(<WLanguage Procedure> , <Agent Address> , <SNMP Community> , <Relevant OID>)
<Result>: Integer
  • Identifier of trap,
  • -1 if an error occurred. ErrorInfo returns more details about the problem.
<WLanguage Procedure>: Character string
WLanguage procedure that will be called whenever the SNMP agent sends a trap message (according to the requested filters). This procedure has the following format:
PROCEDURE <Procedure Name>(<Address>, <Community>, <OID>, <Type>, <Value>)
<Agent Address>: Character string (with quotes)
Address of agent whose traps will be received. This address can be given in the following format:
  • IP address in XXX.XXX.XXX.XXX format (125.5.110.100 for example).
  • URL containing the name of the server (www.WINDEV.com for example). This syntax is recommended.
This agent must be configured to send traps to the computer that runs the application.
If this parameter corresponds to an empty string (""), SNMPTrapEnable will e called on the traps of any agent.
<SNMP Community>: Character string (with quotes)
Name of SNMP community of traps. Used to filter the traps according to their community.
If this parameter corresponds to an empty string (""), SNMPTrapEnable will be called on the traps of any community.
<Relevant OID>: Character string
OID affected by the traps. Used to filter the traps according to the relevant OID.
If this parameter corresponds to an empty string (""), SNMPTrapEnable will be called on the traps of any OID.
Remarks

WLanguage Procedure

The WLanguage procedure will be called whenever the SNMP agent sends a trap message (according to the requested filters). This procedure has the following format:
PROCEDURE <Procedure Name>(<Address>, <Community>, <OID>, <Type>, <Value>)
In this code:
  • <Address> is a string. This parameter contains the IP address of the agent that generated the trap.
  • <Community> is a string. This parameter contains the community of the agent that generated the trap.
  • <OID> is an array of strings. This parameter contains the OID of the trap (in numeric format).
  • <Type> is an array of integers. This parameter contains the type of the returned OID.
  • <Value> is an array of strings. This parameter contains the value of the returned OID.
Caution: Change of format since version 120034D: The types of the parameters for the WLanguage procedure have been modified. in version 120034D, <OID> was a string, <Type> was an integer, <Value> was a string.

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
WINDEVReports and Queries wd230com.dll
Minimum required version
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment