Updated fltmgr.sys-filters patchset

Added Implement FltGetRoutineAddress.
This commit is contained in:
Alistair Leslie-Hughes 2018-03-29 08:42:32 +11:00
parent e15e1cf076
commit 046821d509
2 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,50 @@
From 2449a79995ca680bb2b19ef558b2d060cd7cc196 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 28 Mar 2018 17:41:31 +1100
Subject: [PATCH] fltmgr.sys: Implement FltGetRoutineAddress
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/fltmgr.sys/fltmgr.sys.spec | 2 +-
dlls/fltmgr.sys/main.c | 15 +++++++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/dlls/fltmgr.sys/fltmgr.sys.spec b/dlls/fltmgr.sys/fltmgr.sys.spec
index c217ad3..7b1ba29 100644
--- a/dlls/fltmgr.sys/fltmgr.sys.spec
+++ b/dlls/fltmgr.sys/fltmgr.sys.spec
@@ -79,7 +79,7 @@
@ stub FltGetLowerInstance
@ stub FltGetRequestorProcess
@ stub FltGetRequestorProcessId
-@ stub FltGetRoutineAddress
+@ stdcall FltGetRoutineAddress(str)
@ stub FltGetStreamContext
@ stub FltGetStreamHandleContext
@ stub FltGetSwappedBufferMdlAddress
diff --git a/dlls/fltmgr.sys/main.c b/dlls/fltmgr.sys/main.c
index cedcdb1..75234f3 100644
--- a/dlls/fltmgr.sys/main.c
+++ b/dlls/fltmgr.sys/main.c
@@ -64,3 +64,18 @@ void WINAPI FltUnregisterFilter (PFLT_FILTER filter)
{
FIXME( "(%p): stub\n", filter );
}
+
+void* WINAPI FltGetRoutineAddress(LPCSTR name)
+{
+ static const WCHAR fltmgrW[] = {'f','l','t','m','g','r','.','s','y','s',0};
+ HMODULE mod = GetModuleHandleW(fltmgrW);
+ void *func;
+
+ func = GetProcAddress(mod, name);
+ if (func)
+ TRACE( "%s -> %p\n", debugstr_a(name), func );
+ else
+ FIXME( "%s not found\n", debugstr_a(name) );
+
+ return func;
+}
--
1.9.1

View File

@ -3897,11 +3897,13 @@ if test "$enable_fltmgr_sys_filters" -eq 1; then
patch_apply fltmgr.sys-filters/0002-fltmgr.sys-Add-FltRegisterFilter-stub.patch
patch_apply fltmgr.sys-filters/0003-fltmgr.sys-Add-FltStartFiltering-stub.patch
patch_apply fltmgr.sys-filters/0004-fltmgr.sys-Add-FltUnregisterFilter-stub.patch
patch_apply fltmgr.sys-filters/0005-fltmgr.sys-Implement-FltGetRoutineAddress.patch
(
printf '%s\n' '+ { "Alistair Leslie-Hughes", "include/ddk: Add fltkernel.h.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "fltmgr.sys: Add FltRegisterFilter stub.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "fltmgr.sys: Add FltStartFiltering stub.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "fltmgr.sys: Add FltUnregisterFilter stub.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "fltmgr.sys: Implement FltGetRoutineAddress.", 1 },';
) >> "$patchlist"
fi