amsi: Add stub implementations for a couple of functions.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Hans Leidekker 2019-03-07 14:14:13 +01:00 committed by Alexandre Julliard
parent e581835a8c
commit 65f30810c1
5 changed files with 111 additions and 6 deletions

View File

@ -1 +1,4 @@
MODULE = amsi.dll
C_SRCS = \
main.c

View File

@ -1,12 +1,12 @@
@ stub AmsiCloseSession
@ stub AmsiInitialize
@ stub AmsiOpenSession
@ stub AmsiScanBuffer
@ stub AmsiScanString
@ stdcall AmsiCloseSession(ptr ptr)
@ stdcall AmsiInitialize(wstr ptr)
@ stdcall AmsiOpenSession(ptr ptr)
@ stdcall AmsiScanBuffer(ptr ptr long wstr ptr ptr)
@ stdcall AmsiScanString(ptr wstr wstr ptr ptr)
@ stub AmsiUacInitialize
@ stub AmsiUacScan
@ stub AmsiUacUninitialize
@ stub AmsiUninitialize
@ stdcall AmsiUninitialize(ptr)
@ stub DllCanUnloadNow
@ stub DllGetClassObject
@ stub DllRegisterServer

65
dlls/amsi/main.c 100644
View File

@ -0,0 +1,65 @@
/*
* Copyright 2019 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 "windef.h"
#include "winbase.h"
#include "amsi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(amsi);
HRESULT WINAPI AmsiInitialize( const WCHAR *appname, HAMSICONTEXT *context )
{
FIXME( "%s, %p\n", debugstr_w(appname), context );
*context = (HAMSICONTEXT)0xdeadbeef;
return S_OK;
}
HRESULT WINAPI AmsiOpenSession( HAMSICONTEXT context, HAMSISESSION *session )
{
FIXME( "%p, %p\n", context, session );
*session = (HAMSISESSION)0xdeadbeef;
return S_OK;
}
void WINAPI AmsiCloseSession( HAMSICONTEXT context, HAMSISESSION session )
{
FIXME( "%p, %p\n", context, session );
}
HRESULT WINAPI AmsiScanBuffer( HAMSICONTEXT context, void *buffer, ULONG length, const WCHAR *name,
HAMSISESSION session, AMSI_RESULT *result )
{
FIXME( "%p, %p, %u, %s, %p, %p\n", context, buffer, length, debugstr_w(name), session, result );
*result = AMSI_RESULT_NOT_DETECTED;
return S_OK;
}
HRESULT WINAPI AmsiScanString( HAMSICONTEXT context, const WCHAR *string, const WCHAR *name,
HAMSISESSION session, AMSI_RESULT *result )
{
FIXME( "%p, %s, %s, %p, %p\n", context, debugstr_w(string), debugstr_w(name), session, result );
*result = AMSI_RESULT_NOT_DETECTED;
return S_OK;
}
void WINAPI AmsiUninitialize( HAMSICONTEXT context )
{
FIXME( "%p\n", context );
}

View File

@ -11,6 +11,7 @@ SOURCES = \
advpub.h \
af_irda.h \
amaudio.h \
amsi.idl \
amstream.idl \
amvideo.idl \
appcompatapi.h \

36
include/amsi.idl 100644
View File

@ -0,0 +1,36 @@
/*
* Copyright 2019 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
*/
cpp_quote("DECLARE_HANDLE(HAMSICONTEXT);")
cpp_quote("DECLARE_HANDLE(HAMSISESSION);")
typedef [v1_enum] enum AMSI_RESULT
{
AMSI_RESULT_CLEAN = 0x00,
AMSI_RESULT_NOT_DETECTED = 0x01,
AMSI_RESULT_BLOCKED_BY_ADMIN_START = 0x4000,
AMSI_RESULT_BLOCKED_BY_ADMIN_END = 0x4fff,
AMSI_RESULT_DETECTED = 0x8000,
} AMSI_RESULT;
cpp_quote("void WINAPI AmsiCloseSession(HAMSICONTEXT,HAMSISESSION);")
cpp_quote("HRESULT WINAPI AmsiInitialize(const WCHAR*,HAMSICONTEXT*);")
cpp_quote("HRESULT WINAPI AmsiOpenSession(HAMSICONTEXT,HAMSISESSION*);")
cpp_quote("HRESULT WINAPI AmsiScanBuffer(HAMSICONTEXT,void*,ULONG,const WCHAR*,HAMSISESSION,AMSI_RESULT*);")
cpp_quote("HRESULT WINAPI AmsiScanString(HAMSICONTEXT,const WCHAR*,const WCHAR *,HAMSISESSION,AMSI_RESULT*);")
cpp_quote("void WINAPI AmsiUninitialize(HAMSICONTEXT);")