From cd819b58a124eccd6c2322819f799e8870853896 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 03:02:57 +0100
Subject: ntdll: Move EventRegister from advapi32 to ntdll.

---
 dlls/advapi32/advapi32.spec |  2 +-
 dlls/advapi32/eventlog.c    | 11 -----------
 dlls/ntdll/misc.c           | 12 ++++++++++++
 dlls/ntdll/ntdll.spec       |  1 +
 4 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec
index 88f7fee..6a015e4 100644
--- a/dlls/advapi32/advapi32.spec
+++ b/dlls/advapi32/advapi32.spec
@@ -272,7 +272,7 @@
 @ stdcall EventActivityIdControl(long ptr)
 @ stdcall EventEnabled(int64 ptr)
 @ stdcall EventProviderEnabled(int64 long int64)
-@ stdcall EventRegister(ptr ptr ptr ptr)
+@ stdcall EventRegister(ptr ptr ptr ptr) ntdll.EtwEventRegister
 @ stdcall EventSetInformation(int64 long ptr long)
 @ stdcall EventUnregister(int64)
 @ stdcall EventWrite(int64 ptr long ptr)
diff --git a/dlls/advapi32/eventlog.c b/dlls/advapi32/eventlog.c
index 93c164d..4beda0f 100644
--- a/dlls/advapi32/eventlog.c
+++ b/dlls/advapi32/eventlog.c
@@ -815,17 +815,6 @@ ULONG WINAPI UnregisterTraceGuids( TRACEHANDLE RegistrationHandle )
 }
 
 /******************************************************************************
- * EventRegister [ADVAPI32.@]
- */
-ULONG WINAPI EventRegister( LPCGUID provider, PENABLECALLBACK callback, PVOID context, PREGHANDLE handle )
-{
-    FIXME("%s, %p, %p, %p\n", debugstr_guid(provider), callback, context, handle);
-
-    *handle = 0xdeadbeef;
-    return ERROR_SUCCESS;
-}
-
-/******************************************************************************
  * EventUnregister [ADVAPI32.@]
  */
 ULONG WINAPI EventUnregister( REGHANDLE handle )
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
index 0f6c5df..fadba20 100644
--- a/dlls/ntdll/misc.c
+++ b/dlls/ntdll/misc.c
@@ -32,6 +32,7 @@
 #include "ntdll_misc.h"
 #include "wmistr.h"
 #include "evntrace.h"
+#include "evntprov.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
 
@@ -338,6 +339,17 @@ BOOL WINAPI WinSqmIsOptedIn(void)
     return FALSE;
 }
 
+/*********************************************************************
+ *                  EtwEventRegister   (NTDLL.@)
+ */
+ULONG WINAPI EtwEventRegister( LPCGUID provider, PENABLECALLBACK callback, PVOID context, PREGHANDLE handle )
+{
+    FIXME("%s, %p, %p, %p\n", debugstr_guid(provider), callback, context, handle);
+
+    *handle = 0xdeadbeef;
+    return ERROR_SUCCESS;
+}
+
 /******************************************************************************
  *                  EtwRegisterTraceGuidsW (NTDLL.@)
  *
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 0ccd79f..57a11b6 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -41,6 +41,7 @@
 # @ stub DbgUiStopDebugging
 @ stub DbgUiWaitStateChange
 @ stdcall DbgUserBreakPoint()
+@ stdcall EtwEventRegister(ptr ptr ptr ptr)
 @ stdcall EtwRegisterTraceGuidsA(ptr ptr ptr long ptr str str ptr)
 @ stdcall EtwRegisterTraceGuidsW(ptr ptr ptr long ptr wstr wstr ptr)
 # @ stub KiFastSystemCall
-- 
2.7.1

