From 618be0874a2fbdda10db8753c8a8371194abaf3a Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Wed, 24 Jan 2007 15:39:26 +0100 Subject: [PATCH] snmpapi: SnmpUtilDbgPrint() is a vararg and not an stdcall function. --- dlls/snmpapi/main.c | 9 ++++++++- dlls/snmpapi/snmpapi.spec | 2 +- include/snmp.h | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/snmpapi/main.c b/dlls/snmpapi/main.c index 539c8e1c598..04ec05d56ef 100644 --- a/dlls/snmpapi/main.c +++ b/dlls/snmpapi/main.c @@ -136,8 +136,15 @@ BOOL WINAPI DllMain( /*********************************************************************** * SnmpUtilDbgPrint (SNMPAPI.@) + * + * NOTES + * The Microsoft headers claim this function uses the stdcall calling + * convention. But stdcall functions cannot take a variable number of + * arguments so this does not make sense. The stdcall specification is + * 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)); } diff --git a/dlls/snmpapi/snmpapi.spec b/dlls/snmpapi/snmpapi.spec index 2ada7502599..385ca8ac7a4 100644 --- a/dlls/snmpapi/snmpapi.spec +++ b/dlls/snmpapi/snmpapi.spec @@ -20,7 +20,7 @@ @ stub SnmpUtilAnsiToUnicode @ stdcall SnmpUtilAsnAnyCpy(ptr ptr) @ stdcall SnmpUtilAsnAnyFree(ptr) -@ stdcall SnmpUtilDbgPrint(long str) +@ varargs SnmpUtilDbgPrint(long str) @ stdcall SnmpUtilIdsToA(ptr long) @ stdcall SnmpUtilMemAlloc(long) @ stdcall SnmpUtilMemFree(ptr) diff --git a/include/snmp.h b/include/snmp.h index aaece6c1ef1..2399d007a90 100644 --- a/include/snmp.h +++ b/include/snmp.h @@ -289,7 +289,7 @@ DWORD WINAPI SnmpSvcGetUptime(void); void WINAPI SnmpSvcSetLogLevel(int nLogLevel); void WINAPI SnmpSvcSetLogType(int nLogType); -void WINAPI SnmpUtilDbgPrint(int nLogLevel, LPSTR szFormat, ...); +void WINAPIV SnmpUtilDbgPrint(int nLogLevel, LPSTR szFormat, ...); #ifdef __cplusplus }