From 046821d509d3ea7c2600840b9f911ee391ee2cef Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 29 Mar 2018 08:42:32 +1100 Subject: [PATCH] Updated fltmgr.sys-filters patchset Added Implement FltGetRoutineAddress. --- ...r.sys-Implement-FltGetRoutineAddress.patch | 50 +++++++++++++++++++ patches/patchinstall.sh | 2 + 2 files changed, 52 insertions(+) create mode 100644 patches/fltmgr.sys-filters/0005-fltmgr.sys-Implement-FltGetRoutineAddress.patch diff --git a/patches/fltmgr.sys-filters/0005-fltmgr.sys-Implement-FltGetRoutineAddress.patch b/patches/fltmgr.sys-filters/0005-fltmgr.sys-Implement-FltGetRoutineAddress.patch new file mode 100644 index 00000000..cba0cfdd --- /dev/null +++ b/patches/fltmgr.sys-filters/0005-fltmgr.sys-Implement-FltGetRoutineAddress.patch @@ -0,0 +1,50 @@ +From 2449a79995ca680bb2b19ef558b2d060cd7cc196 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Wed, 28 Mar 2018 17:41:31 +1100 +Subject: [PATCH] fltmgr.sys: Implement FltGetRoutineAddress + +Signed-off-by: Alistair Leslie-Hughes +--- + 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 + diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 0290a45e..47c59373 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -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