snmpapi: Add stub for SnmpSvcGetUptime.

This commit is contained in:
Juan Lang 2009-12-07 12:02:07 -08:00 committed by Alexandre Julliard
parent 5719881ed5
commit b7f753a826
2 changed files with 19 additions and 1 deletions

View File

@ -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;
@ -135,6 +138,21 @@ BOOL WINAPI DllMain(
return TRUE;
}
/***********************************************************************
* 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.@)
*

View File

@ -11,7 +11,7 @@
@ stub SnmpSvcGenerateTrap
@ stub SnmpSvcGenerateWarmStartTrap
@ stub SnmpSvcGetEnterpriseOID
@ stub SnmpSvcGetUptime
@ stdcall SnmpSvcGetUptime()
@ stub SnmpSvcInitUptime
@ stub SnmpSvcReleaseMessage
@ stub SnmpSvcReportEvent