Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Other versions of this page are also available for the following:
Windows Mobile Not Supported Windows Embedded CE Supported
8/28/2008

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

Syntax

DWORD SnmpSvcGetUptime();

Parameters

None.

Return Value

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

Remarks

An extension agent should call the SnmpSvcGetUptimefunction 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 SnmpSvcGetUptimefunction to retrieve the number of centiseconds that the SNMP service has been running. Extension agents should use SnmpSvcGetUptimerather than calculate the uptime using the dwUptimeReferenceparameter. The service passes this parameter to the extension agent as the result of a call to the SnmpExtensionInitfunction. Because the dwUptimeReferenceparameter stores the elapsed time as a DWORDvalue in milliseconds, the time can wrap to zero and reflect an inaccurate time interval.

An extension agent that sends traps must initialize the timeStampparameter to the SnmpExtensionTrapfunction with the value returned by a call to the SnmpSvcGetUptimefunction.

Requirements

Header snmp.h
Library snmpapi.lib
Windows Embedded CE Windows CE 3.0 and later

See Also