Commit b7f753a8 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

snmpapi: Add stub for SnmpSvcGetUptime.

parent 5719881e
......@@ -112,6 +112,8 @@ static void asn_any_free(AsnAny *any)
any->asnType = ASN_NULL;
}
static ULONGLONG startTime;
/***********************************************************************
* DllMain for SNMPAPI
*/
......@@ -127,6 +129,7 @@ BOOL WINAPI DllMain(
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDLL);
startTime = GetTickCount64();
break;
case DLL_PROCESS_DETACH:
break;
......@@ -136,6 +139,21 @@ BOOL WINAPI DllMain(
}
/***********************************************************************
* SnmpSvcGetUptime (SNMPAPI.@)
*
* BUGS
* This returns the number of centiseconds since the DLL was loaded,
* rather than the number of centiseconds since the SNMP service was
* started, since there isn't yet any SNMP service in Wine.
*/
DWORD WINAPI SnmpSvcGetUptime(void)
{
ULONGLONG now = GetTickCount64();
return (now - startTime) / 10;
}
/***********************************************************************
* SnmpUtilDbgPrint (SNMPAPI.@)
*
* NOTES
......
......@@ -11,7 +11,7 @@
@ stub SnmpSvcGenerateTrap
@ stub SnmpSvcGenerateWarmStartTrap
@ stub SnmpSvcGetEnterpriseOID
@ stub SnmpSvcGetUptime
@ stdcall SnmpSvcGetUptime()
@ stub SnmpSvcInitUptime
@ stub SnmpSvcReleaseMessage
@ stub SnmpSvcReportEvent
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment