snmpapi: Add stub for SnmpSvcGetUptime.
This commit is contained in:
parent
5719881ed5
commit
b7f753a826
|
@ -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.@)
|
||||
*
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
@ stub SnmpSvcGenerateTrap
|
||||
@ stub SnmpSvcGenerateWarmStartTrap
|
||||
@ stub SnmpSvcGetEnterpriseOID
|
||||
@ stub SnmpSvcGetUptime
|
||||
@ stdcall SnmpSvcGetUptime()
|
||||
@ stub SnmpSvcInitUptime
|
||||
@ stub SnmpSvcReleaseMessage
|
||||
@ stub SnmpSvcReportEvent
|
||||
|
|
Loading…
Reference in New Issue