[NTDLL] Implement the Etw*Trace functions relying on EtwControlTrace

This commit is contained in:
Pierre Schweitzer 2018-12-09 10:29:02 +01:00
parent 53a313f456
commit de7c959c4e
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B
2 changed files with 80 additions and 8 deletions

View file

@ -48,8 +48,8 @@
48 stdcall -stub EtwCreateTraceInstanceId(ptr ptr) 48 stdcall -stub EtwCreateTraceInstanceId(ptr ptr)
49 stdcall EtwEnableTrace(long long long ptr double) 49 stdcall EtwEnableTrace(long long long ptr double)
50 stdcall -stub EtwEnumerateTraceGuids(ptr long ptr) 50 stdcall -stub EtwEnumerateTraceGuids(ptr long ptr)
51 stdcall -stub EtwFlushTraceA(double str ptr) 51 stdcall EtwFlushTraceA(double str ptr)
52 stdcall -stub EtwFlushTraceW(double wstr ptr) 52 stdcall EtwFlushTraceW(double wstr ptr)
53 stdcall EtwGetTraceEnableFlags(double) 53 stdcall EtwGetTraceEnableFlags(double)
54 stdcall EtwGetTraceEnableLevel(double) 54 stdcall EtwGetTraceEnableLevel(double)
55 stdcall EtwGetTraceLoggerHandle(ptr) 55 stdcall EtwGetTraceLoggerHandle(ptr)
@ -57,23 +57,23 @@
57 stdcall -stub EtwNotificationRegistrationW(ptr long ptr long long) 57 stdcall -stub EtwNotificationRegistrationW(ptr long ptr long long)
58 stdcall EtwQueryAllTracesA(ptr long ptr) 58 stdcall EtwQueryAllTracesA(ptr long ptr)
59 stdcall EtwQueryAllTracesW(ptr long ptr) 59 stdcall EtwQueryAllTracesW(ptr long ptr)
60 stdcall -stub EtwQueryTraceA(double str ptr) 60 stdcall EtwQueryTraceA(double str ptr)
61 stdcall -stub EtwQueryTraceW(double wstr ptr) 61 stdcall EtwQueryTraceW(double wstr ptr)
62 stdcall -stub EtwReceiveNotificationsA(long long long long) 62 stdcall -stub EtwReceiveNotificationsA(long long long long)
63 stdcall -stub EtwReceiveNotificationsW(long long long long) 63 stdcall -stub EtwReceiveNotificationsW(long long long long)
64 stdcall EtwRegisterTraceGuidsA(ptr ptr ptr long ptr str str ptr) 64 stdcall EtwRegisterTraceGuidsA(ptr ptr ptr long ptr str str ptr)
65 stdcall EtwRegisterTraceGuidsW(ptr ptr ptr long ptr wstr wstr ptr) 65 stdcall EtwRegisterTraceGuidsW(ptr ptr ptr long ptr wstr wstr ptr)
66 stdcall EtwStartTraceA(ptr str ptr) 66 stdcall EtwStartTraceA(ptr str ptr)
67 stdcall EtwStartTraceW(ptr wstr ptr) 67 stdcall EtwStartTraceW(ptr wstr ptr)
68 stdcall -stub EtwStopTraceA(double str ptr) 68 stdcall EtwStopTraceA(double str ptr)
69 stdcall -stub EtwStopTraceW(double wstr ptr) 69 stdcall EtwStopTraceW(double wstr ptr)
70 stdcall EtwTraceEvent(double ptr) 70 stdcall EtwTraceEvent(double ptr)
71 stdcall -stub EtwTraceEventInstance(double ptr ptr ptr) 71 stdcall -stub EtwTraceEventInstance(double ptr ptr ptr)
72 varargs EtwTraceMessage(ptr long ptr long) 72 varargs EtwTraceMessage(ptr long ptr long)
73 stdcall -stub EtwTraceMessageVa(double long ptr long ptr) 73 stdcall -stub EtwTraceMessageVa(double long ptr long ptr)
74 stdcall EtwUnregisterTraceGuids(double) 74 stdcall EtwUnregisterTraceGuids(double)
75 stdcall -stub EtwUpdateTraceA(double str ptr) 75 stdcall EtwUpdateTraceA(double str ptr)
76 stdcall -stub EtwUpdateTraceW(double wstr ptr) 76 stdcall EtwUpdateTraceW(double wstr ptr)
77 stdcall -stub EtwpGetTraceBuffer(long long long long) 77 stdcall -stub EtwpGetTraceBuffer(long long long long)
78 stdcall -stub EtwpSetHWConfigFunction(ptr long) 78 stdcall -stub EtwpSetHWConfigFunction(ptr long)
79 stdcall -arch=i386 KiFastSystemCall() 79 stdcall -arch=i386 KiFastSystemCall()

View file

@ -202,4 +202,76 @@ ULONG WINAPI EtwQueryAllTracesA( PEVENT_TRACE_PROPERTIES * parray, ULONG arrayco
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
/******************************************************************************
* EtwFlushTraceA [NTDLL.@]
*
*/
ULONG WINAPI EtwFlushTraceA( TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
{
return EtwControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_FLUSH );
}
/******************************************************************************
* EtwFlushTraceW [NTDLL.@]
*
*/
ULONG WINAPI EtwFlushTraceW( TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
{
return EtwControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_FLUSH );
}
/******************************************************************************
* EtwQueryTraceA [NTDLL.@]
*
*/
ULONG WINAPI EtwQueryTraceA( TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
{
return EtwControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_QUERY );
}
/******************************************************************************
* EtwQueryTraceW [NTDLL.@]
*
*/
ULONG WINAPI EtwQueryTraceW( TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
{
return EtwControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_QUERY );
}
/******************************************************************************
* EtwStopTraceA [NTDLL.@]
*
*/
ULONG WINAPI EtwStopTraceA( TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
{
return EtwControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_STOP );
}
/******************************************************************************
* EtwStopTraceW [NTDLL.@]
*
*/
ULONG WINAPI EtwStopTraceW( TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
{
return EtwControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_STOP );
}
/******************************************************************************
* EtwUpdateTraceA [NTDLL.@]
*
*/
ULONG WINAPI EtwUpdateTraceA( TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
{
return EtwControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_UPDATE );
}
/******************************************************************************
* EtwUpdateTraceW [NTDLL.@]
*
*/
ULONG WINAPI EtwUpdateTraceW( TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
{
return EtwControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_UPDATE );
}
/* EOF */ /* EOF */