ntdll: Moved RegisterTraceGuids[AW] implementation to ntdll.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2016-02-24 19:35:01 +01:00 committed by Alexandre Julliard
parent f35c1b2dc1
commit d2d40b1da3
4 changed files with 62 additions and 66 deletions

View File

@ -661,8 +661,8 @@
@ stdcall RegisterServiceCtrlHandlerExA(str ptr ptr) @ stdcall RegisterServiceCtrlHandlerExA(str ptr ptr)
@ stdcall RegisterServiceCtrlHandlerExW(wstr ptr ptr) @ stdcall RegisterServiceCtrlHandlerExW(wstr ptr ptr)
@ stdcall RegisterServiceCtrlHandlerW(wstr ptr) @ stdcall RegisterServiceCtrlHandlerW(wstr ptr)
@ stdcall RegisterTraceGuidsA(ptr ptr ptr long ptr str str ptr) @ stdcall RegisterTraceGuidsA(ptr ptr ptr long ptr str str ptr) ntdll.EtwRegisterTraceGuidsA
@ stdcall RegisterTraceGuidsW(ptr ptr ptr long ptr wstr wstr ptr) @ stdcall RegisterTraceGuidsW(ptr ptr ptr long ptr wstr wstr ptr) ntdll.EtwRegisterTraceGuidsW
# @ stub RemoveTraceCallback # @ stub RemoveTraceCallback
# @ stub RemoveUsersFromEncryptedFile # @ stub RemoveUsersFromEncryptedFile
@ stdcall ReportEventA(long long long long ptr long long ptr ptr) @ stdcall ReportEventA(long long long long ptr long long ptr ptr)

View File

@ -741,70 +741,6 @@ BOOL WINAPI ReportEventW( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dw
return TRUE; return TRUE;
} }
/******************************************************************************
* RegisterTraceGuidsW [ADVAPI32.@]
*
* Register an event trace provider and the event trace classes that it uses
* to generate events.
*
* PARAMS
* RequestAddress [I] ControlCallback function
* RequestContext [I] Optional provider-defined context
* ControlGuid [I] GUID of the registering provider
* GuidCount [I] Number of elements in the TraceGuidReg array
* TraceGuidReg [I/O] Array of TRACE_GUID_REGISTRATION structures
* MofImagePath [I] not supported, set to NULL
* MofResourceName [I] not supported, set to NULL
* RegistrationHandle [O] Provider's registration handle
*
* RETURNS
* Success: ERROR_SUCCESS
* Failure: System error code
*
* FIXME
* Stub.
*/
ULONG WINAPI RegisterTraceGuidsW( WMIDPREQUEST RequestAddress,
PVOID RequestContext, LPCGUID ControlGuid, ULONG GuidCount,
PTRACE_GUID_REGISTRATION TraceGuidReg, LPCWSTR MofImagePath,
LPCWSTR MofResourceName, PTRACEHANDLE RegistrationHandle )
{
FIXME("(%p, %p, %s, %u, %p, %s, %s, %p): stub\n", RequestAddress, RequestContext,
debugstr_guid(ControlGuid), GuidCount, TraceGuidReg, debugstr_w(MofImagePath),
debugstr_w(MofResourceName), RegistrationHandle);
if (TraceGuidReg)
{
ULONG i;
for (i = 0; i < GuidCount; i++)
{
FIXME(" register trace class %s\n", debugstr_guid(TraceGuidReg[i].Guid));
TraceGuidReg[i].RegHandle = (HANDLE)0xdeadbeef;
}
}
*RegistrationHandle = (TRACEHANDLE)0xdeadbeef;
return ERROR_SUCCESS;
}
/******************************************************************************
* RegisterTraceGuidsA [ADVAPI32.@]
*
* See RegisterTraceGuidsW.
*
* FIXME
* Stub.
*/
ULONG WINAPI RegisterTraceGuidsA( WMIDPREQUEST RequestAddress,
PVOID RequestContext, LPCGUID ControlGuid, ULONG GuidCount,
PTRACE_GUID_REGISTRATION TraceGuidReg, LPCSTR MofImagePath,
LPCSTR MofResourceName, PTRACEHANDLE RegistrationHandle )
{
FIXME("(%p, %p, %s, %u, %p, %s, %s, %p): stub\n", RequestAddress, RequestContext,
debugstr_guid(ControlGuid), GuidCount, TraceGuidReg, debugstr_a(MofImagePath),
debugstr_a(MofResourceName), RegistrationHandle);
return ERROR_SUCCESS;
}
/****************************************************************************** /******************************************************************************
* StartTraceW [ADVAPI32.@] * StartTraceW [ADVAPI32.@]
* *

View File

@ -30,6 +30,8 @@
#include "wine/library.h" #include "wine/library.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "ntdll_misc.h" #include "ntdll_misc.h"
#include "wmistr.h"
#include "evntrace.h"
WINE_DEFAULT_DEBUG_CHANNEL(ntdll); WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
@ -335,3 +337,59 @@ BOOL WINAPI WinSqmIsOptedIn(void)
FIXME("() stub\n"); FIXME("() stub\n");
return FALSE; return FALSE;
} }
/******************************************************************************
* EtwRegisterTraceGuidsW (NTDLL.@)
*
* Register an event trace provider and the event trace classes that it uses
* to generate events.
*
* PARAMS
* RequestAddress [I] ControlCallback function
* RequestContext [I] Optional provider-defined context
* ControlGuid [I] GUID of the registering provider
* GuidCount [I] Number of elements in the TraceGuidReg array
* TraceGuidReg [I/O] Array of TRACE_GUID_REGISTRATION structures
* MofImagePath [I] not supported, set to NULL
* MofResourceName [I] not supported, set to NULL
* RegistrationHandle [O] Provider's registration handle
*
* RETURNS
* Success: ERROR_SUCCESS
* Failure: System error code
*/
ULONG WINAPI EtwRegisterTraceGuidsW( WMIDPREQUEST RequestAddress,
void *RequestContext, const GUID *ControlGuid, ULONG GuidCount,
TRACE_GUID_REGISTRATION *TraceGuidReg, const WCHAR *MofImagePath,
const WCHAR *MofResourceName, TRACEHANDLE *RegistrationHandle )
{
FIXME("(%p, %p, %s, %u, %p, %s, %s, %p): stub\n", RequestAddress, RequestContext,
debugstr_guid(ControlGuid), GuidCount, TraceGuidReg, debugstr_w(MofImagePath),
debugstr_w(MofResourceName), RegistrationHandle);
if (TraceGuidReg)
{
ULONG i;
for (i = 0; i < GuidCount; i++)
{
FIXME(" register trace class %s\n", debugstr_guid(TraceGuidReg[i].Guid));
TraceGuidReg[i].RegHandle = (HANDLE)0xdeadbeef;
}
}
*RegistrationHandle = (TRACEHANDLE)0xdeadbeef;
return ERROR_SUCCESS;
}
/******************************************************************************
* EtwRegisterTraceGuidsA (NTDLL.@)
*/
ULONG WINAPI EtwRegisterTraceGuidsA( WMIDPREQUEST RequestAddress,
void *RequestContext, const GUID *ControlGuid, ULONG GuidCount,
TRACE_GUID_REGISTRATION *TraceGuidReg, const char *MofImagePath,
const char *MofResourceName, TRACEHANDLE *RegistrationHandle )
{
FIXME("(%p, %p, %s, %u, %p, %s, %s, %p): stub\n", RequestAddress, RequestContext,
debugstr_guid(ControlGuid), GuidCount, TraceGuidReg, debugstr_a(MofImagePath),
debugstr_a(MofResourceName), RegistrationHandle);
return ERROR_SUCCESS;
}

View File

@ -41,6 +41,8 @@
# @ stub DbgUiStopDebugging # @ stub DbgUiStopDebugging
@ stub DbgUiWaitStateChange @ stub DbgUiWaitStateChange
@ stdcall DbgUserBreakPoint() @ stdcall DbgUserBreakPoint()
@ stdcall EtwRegisterTraceGuidsA(ptr ptr ptr long ptr str str ptr)
@ stdcall EtwRegisterTraceGuidsW(ptr ptr ptr long ptr wstr wstr ptr)
# @ stub KiFastSystemCall # @ stub KiFastSystemCall
# @ stub KiFastSystemCallRet # @ stub KiFastSystemCallRet
# @ stub KiIntSystemCall # @ stub KiIntSystemCall