Alistair Leslie-Hughes : fltmgr.sys: Implement FltGetRoutineAddress.

Alexandre Julliard julliard at winehq.org
Thu Apr 12 15:28:14 CDT 2018


Module: wine
Branch: master
Commit: a7b33a6a428c9920d8130819373b1554bbd206c4
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=a7b33a6a428c9920d8130819373b1554bbd206c4

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Wed Apr  4 23:18:22 2018 +0000

fltmgr.sys: Implement FltGetRoutineAddress.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/fltmgr.sys/fltmgr.sys.spec |  2 +-
 dlls/fltmgr.sys/main.c          | 15 +++++++++++++++
 include/ddk/fltkernel.h         |  1 +
 3 files changed, 17 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 2ffde97..16ca284 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;
+}
diff --git a/include/ddk/fltkernel.h b/include/ddk/fltkernel.h
index 00b7dc5..8ebebfa 100644
--- a/include/ddk/fltkernel.h
+++ b/include/ddk/fltkernel.h
@@ -654,6 +654,7 @@ typedef struct _FLT_REGISTRATION
 } FLT_REGISTRATION, *PFLT_REGISTRATION;
 
 
+void*    WINAPI FltGetRoutineAddress(LPCSTR name);
 NTSTATUS WINAPI FltRegisterFilter(PDRIVER_OBJECT, const FLT_REGISTRATION *, PFLT_FILTER *);
 NTSTATUS WINAPI FltStartFiltering(PFLT_FILTER);
 void     WINAPI FltUnregisterFilter(PFLT_FILTER);




More information about the wine-cvs mailing list