Commit d36e7c08 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wsnmp32: Add stub implementations for a couple of functions.

parent 6d02c19f
......@@ -16493,7 +16493,8 @@ wine_fn_config_dll ws2_32 enable_ws2_32 implib
wine_fn_config_test dlls/ws2_32/tests ws2_32_test
wine_fn_config_dll wshom.ocx enable_wshom_ocx
wine_fn_config_test dlls/wshom.ocx/tests wshom.ocx_test
wine_fn_config_dll wsnmp32 enable_wsnmp32
wine_fn_config_dll wsnmp32 enable_wsnmp32 implib
wine_fn_config_test dlls/wsnmp32/tests wsnmp32_test
wine_fn_config_dll wsock32 enable_wsock32 implib
wine_fn_config_dll wtsapi32 enable_wtsapi32 implib
wine_fn_config_dll wuapi enable_wuapi
......
......@@ -3167,7 +3167,8 @@ WINE_CONFIG_DLL(ws2_32,,[implib])
WINE_CONFIG_TEST(dlls/ws2_32/tests)
WINE_CONFIG_DLL(wshom.ocx)
WINE_CONFIG_TEST(dlls/wshom.ocx/tests)
WINE_CONFIG_DLL(wsnmp32)
WINE_CONFIG_DLL(wsnmp32,,[implib])
WINE_CONFIG_TEST(dlls/wsnmp32/tests)
WINE_CONFIG_DLL(wsock32,,[implib])
WINE_CONFIG_DLL(wtsapi32,,[implib])
WINE_CONFIG_DLL(wuapi)
......
MODULE = wsnmp32.dll
MODULE = wsnmp32.dll
IMPORTLIB = wsnmp32
C_SRCS = wsnmp32.c
......
TESTDLL = wsnmp32.dll
IMPORTS = wsnmp32
C_SRCS = \
wsnmp.c
@MAKE_TEST_RULES@
/*
* Copyright 2013 Hans Leidekker for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <stdlib.h>
#include <windef.h>
#include <winbase.h>
#include <winsnmp.h>
#include "wine/test.h"
static void test_SnmpStartup(void)
{
SNMPAPI_STATUS status;
smiUINT32 major, minor, level, translate_mode, retransmit_mode;
status = SnmpStartup( NULL, NULL, NULL, NULL, NULL );
ok( status == SNMPAPI_SUCCESS, "got %u\n", status );
status = SnmpCleanup();
ok( status == SNMPAPI_SUCCESS, "got %u\n", status );
major = minor = level = translate_mode = retransmit_mode = 0xdeadbeef;
status = SnmpStartup( &major, &minor, &level, &translate_mode, &retransmit_mode );
ok( status == SNMPAPI_SUCCESS, "got %u\n", status );
trace( "major %u minor %u level %u translate_mode %u retransmit_mode %u\n",
major, minor, level, translate_mode, retransmit_mode );
status = SnmpCleanup();
ok( status == SNMPAPI_SUCCESS, "got %u\n", status );
}
START_TEST (wsnmp)
{
test_SnmpStartup();
}
......@@ -19,6 +19,7 @@
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winsnmp.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(wsnmp32);
......@@ -37,3 +38,34 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
}
return TRUE;
}
SNMPAPI_STATUS WINAPI SnmpCleanup( void )
{
FIXME( "\n" );
return SNMPAPI_SUCCESS;
}
SNMPAPI_STATUS WINAPI SnmpSetRetransmitMode( smiUINT32 retransmit_mode )
{
FIXME( "%u\n", retransmit_mode );
return SNMPAPI_SUCCESS;
}
SNMPAPI_STATUS WINAPI SnmpSetTranslateMode( smiUINT32 translate_mode )
{
FIXME( "%u\n", translate_mode );
return SNMPAPI_SUCCESS;
}
SNMPAPI_STATUS WINAPI SnmpStartup( smiLPUINT32 major, smiLPUINT32 minor, smiLPUINT32 level,
smiLPUINT32 translate_mode, smiLPUINT32 retransmit_mode )
{
FIXME( "%p, %p, %p, %p, %p\n", major, minor, level, translate_mode, retransmit_mode );
if (major) *major = 2;
if (minor) *minor = 0;
if (level) *level = SNMPAPI_V2_SUPPORT;
if (translate_mode) *translate_mode = SNMPAPI_UNTRANSLATED_V1;
if (retransmit_mode) *retransmit_mode = SNMPAPI_ON;
return SNMPAPI_SUCCESS;
}
100 stub SnmpGetTranslateMode
101 stub SnmpSetTranslateMode
101 stdcall SnmpSetTranslateMode(long)
102 stub SnmpGetRetransmitMode
103 stub SnmpSetRetransmitMode
103 stdcall SnmpSetRetransmitMode(long)
104 stub SnmpGetTimeout
105 stub SnmpSetTimeout
106 stub SnmpSetRetry
......@@ -9,8 +9,8 @@
108 stub _SnmpConveyAgentAddress@4
109 stub _SnmpSetAgentAddress@4
120 stub SnmpGetVendorInfo
200 stub SnmpStartup
201 stub SnmpCleanup
200 stdcall SnmpStartup(ptr ptr ptr ptr ptr)
201 stdcall SnmpCleanup()
202 stub SnmpOpen
203 stub SnmpClose
204 stub SnmpSendMsg
......
......@@ -589,6 +589,7 @@ SRCDIR_INCLUDES = \
winsafer.h \
winscard.h \
winsmcrd.h \
winsnmp.h \
winsock.h \
winsock2.h \
winspool.h \
......
/*
* Copyright 2013 Hans Leidekker for CodeWeavers.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_WINSNMP_H
#define __WINE_WINSNMP_H
#ifdef __cplusplus
extern "C" {
#endif
typedef int smiINT, *smiLPINT;
typedef smiINT smiINT32, *smiLPINT32;
typedef unsigned int smiUINT32, *smiLPUINT32;
typedef smiUINT32 SNMPAPI_STATUS;
#define SNMPAPI_NO_SUPPORT 0
#define SNMPAPI_V1_SUPPORT 1
#define SNMPAPI_V2_SUPPORT 2
#define SNMPAPI_M2M_SUPPORT 3
#define SNMPAPI_TRANSLATED 0
#define SNMPAPI_UNTRANSLATED_V1 1
#define SNMPAPI_UNTRANSLATED_V2 2
#define SNMPAPI_OFF 0
#define SNMPAPI_ON 1
#define SNMPAPI_FAILURE 0
#define SNMPAPI_SUCCESS 1
SNMPAPI_STATUS WINAPI SnmpCleanup(void);
SNMPAPI_STATUS WINAPI SnmpSetRetransmitMode(smiUINT32);
SNMPAPI_STATUS WINAPI SnmpSetTranslateMode(smiUINT32);
SNMPAPI_STATUS WINAPI SnmpStartup(smiLPUINT32,smiLPUINT32,smiLPUINT32,smiLPUINT32,smiLPUINT32);
#ifdef __cplusplus
}
#endif
#endif /* __WINE_WINSNMP_H */
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