* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
+#define WIN32_NO_STATUS
+
+#include <config.h>
#include <stdio.h>
#include <stdarg.h>
-#include "windef.h"
-#include "winbase.h"
-#include "snmp.h"
+#include <windef.h>
+#include <winbase.h>
+#include <snmp.h>
-#include "wine/debug.h"
+#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(snmpapi);
any->asnType = ASN_NULL;
}
+static ULONGLONG startTime;
+
/***********************************************************************
* DllMain for SNMPAPI
*/
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDLL);
- break;
- case DLL_PROCESS_DETACH:
+ startTime = GetTickCount64();
break;
}
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.@)
*
* probably ignored by Microsoft's compiler in this case. So declare it
* correctly in Wine so it works with all compilers.
*/
-VOID WINAPI SnmpUtilDbgPrint(INT loglevel, LPSTR format, ...)
+VOID WINAPIV SnmpUtilDbgPrint(INT loglevel, LPSTR format, ...)
{
FIXME("(%d, %s)\n", loglevel, debugstr_a(format));
}