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) ...@@ -112,6 +112,8 @@ static void asn_any_free(AsnAny *any)
any->asnType = ASN_NULL; any->asnType = ASN_NULL;
} }
static ULONGLONG startTime;
/*********************************************************************** /***********************************************************************
* DllMain for SNMPAPI * DllMain for SNMPAPI
*/ */
...@@ -127,6 +129,7 @@ BOOL WINAPI DllMain( ...@@ -127,6 +129,7 @@ BOOL WINAPI DllMain(
return FALSE; /* prefer native version */ return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDLL); DisableThreadLibraryCalls(hInstDLL);
startTime = GetTickCount64();
break; break;
case DLL_PROCESS_DETACH: case DLL_PROCESS_DETACH:
break; break;
...@@ -136,6 +139,21 @@ BOOL WINAPI DllMain( ...@@ -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.@) * SnmpUtilDbgPrint (SNMPAPI.@)
* *
* NOTES * NOTES
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
@ stub SnmpSvcGenerateTrap @ stub SnmpSvcGenerateTrap
@ stub SnmpSvcGenerateWarmStartTrap @ stub SnmpSvcGenerateWarmStartTrap
@ stub SnmpSvcGetEnterpriseOID @ stub SnmpSvcGetEnterpriseOID
@ stub SnmpSvcGetUptime @ stdcall SnmpSvcGetUptime()
@ stub SnmpSvcInitUptime @ stub SnmpSvcInitUptime
@ stub SnmpSvcReleaseMessage @ stub SnmpSvcReleaseMessage
@ stub SnmpSvcReportEvent @ 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