SnmpSetTimeout

[This is preliminary documentation and subject to change.]

The WinSNMP SnmpSetTimeout function enables a WinSNMP manager application to change the time-out value for the transmission of SNMP message requests. The time-out value applies to calls that a WinSNMP manager application makes to the SnmpSendMsg function for a specified management entity. The Microsoft WinSNMP implementation stores the value in a database.

SNMPAPI_STATUS SnmpSetTimeout(
  HSNMP_ENTITY hEntity,        // destination management entity 
  smiTIMETICKS nPolicyTimeout  // new time-out value for database 
);
 

Parameters

hEntity
Handle to the destination management entity of interest.
nPolicyTimeout
Specifies a new time-out value, in hundredths of a second, for the management entity. This value replaces the value currently stored in the implementation's database.

If this parameter is equal to zero, and the current retransmission mode is equal to SNMPAPI_ON, the implementation selects a time-out value. The implementation uses this time-out value when it executes the WinSNMP manager application's retransmission policy.

Return Values

If the function succeeds, the return value is SNMPAPI_SUCCESS.

If the function fails, the return value is SNMPAPI_FAILURE. To get extended error information, call SnmpGetLastError. The SnmpGetLastError function can return one of the following errors.

Error Code Description
SNMPAPI_NOT_INITIALIZED The SnmpStartup function did not complete successfully.
SNMPAPI_ALLOC_ERROR An error occurred during memory allocation.
SNMPAPI_ENTITY_INVALID The hEntity parameter is invalid.
SNMPAPI_OTHER_ERROR An unknown or undefined error occurred.

Remarks

For additional information, see About Retransmission and Managing the Retransmission Policy.

QuickInfo

  Windows NT: Requires version 5.0 or later. Available as a redistributable for Windows NT 4.0.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in winsnmp.h.
  Import Library: Use wsnmp32.lib.

See Also

WinSNMP Manager API Overview, WinSNMP Functions, SnmpGetTimeout, SnmpSetRetransmitMode, SnmpGetRetransmitMode