SnmpSvcGetUptime

The SnmpSvcGetUptime function retrieves the number of centiseconds that the SNMP service has been running. This function is an element of the SNMP Utility API.

DWORD SnmpSvcGetUptime();

Parameters

This function has no parameters.

Return Values

The function returns a DWORD value that is the number of centiseconds the SNMP service has been running.

Remarks

An extension agent should call the SnmpSvcGetUptime function only if the extension agent DLL is loaded within the address space of the SNMP service.

The SNMP extension agent DLL is encouraged to use the SnmpSvcGetUptime function to retrieve the number of centiseconds that the SNMP service has been running. Extension agents should use SnmpSvcGetUptime rather than calculate the uptime using the dwUptimeReference parameter. The service passes this parameter to the extension agent as the result of a call to the SnmpExtensionInit function. Because the dwUptimeReference parameter stores the elapsed time as a DWORD value in milliseconds, the time can wrap to zero and reflect an inaccurate time interval.

An extension agent that sends traps must initialize the timeStamp parameter to the SnmpExtensionTrap function with the value returned by a call to the SnmpSvcGetUptime function.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 3.0 and later Snmp.h   Snmpapi.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

SnmpExtensionInit, SnmpExtensionTrap

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.