2 * Win32 advapi functions
4 * Copyright 1995 Sven Verdoolaege
5 * Copyright 1998 Juergen Schmied
6 * Copyright 2003 Mike Hearn
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
33 #include "wine/unicode.h"
34 #include "wine/debug.h"
36 #include "advapi32_misc.h"
38 WINE_DEFAULT_DEBUG_CHANNEL(advapi
);
39 WINE_DECLARE_DEBUG_CHANNEL(eventlog
);
41 /******************************************************************************
42 * BackupEventLogA [ADVAPI32.@]
44 * Saves the event log to a backup file.
47 * hEventLog [I] Handle to event log to backup.
48 * lpBackupFileName [I] Name of the backup file.
51 * Success: nonzero. File lpBackupFileName will contain the contents of
55 BOOL WINAPI
BackupEventLogA( HANDLE hEventLog
, LPCSTR lpBackupFileName
)
60 backupW
= SERV_dup(lpBackupFileName
);
61 ret
= BackupEventLogW(hEventLog
, backupW
);
67 /******************************************************************************
68 * BackupEventLogW [ADVAPI32.@]
70 * See BackupEventLogA.
72 BOOL WINAPI
BackupEventLogW( HANDLE hEventLog
, LPCWSTR lpBackupFileName
)
74 FIXME("(%p,%s) stub\n", hEventLog
, debugstr_w(lpBackupFileName
));
76 if (!lpBackupFileName
)
78 SetLastError(ERROR_INVALID_PARAMETER
);
84 SetLastError(ERROR_INVALID_HANDLE
);
88 if (GetFileAttributesW(lpBackupFileName
) != INVALID_FILE_ATTRIBUTES
)
90 SetLastError(ERROR_ALREADY_EXISTS
);
97 /******************************************************************************
98 * ClearEventLogA [ADVAPI32.@]
100 * Clears the event log and optionally saves the log to a backup file.
103 * hEvenLog [I] Handle to event log to clear.
104 * lpBackupFileName [I] Name of the backup file.
107 * Success: nonzero. if lpBackupFileName != NULL, lpBackupFileName will
108 * contain the contents of hEvenLog and the log will be cleared.
109 * Failure: zero. Fails if the event log is empty or if lpBackupFileName
112 BOOL WINAPI
ClearEventLogA( HANDLE hEventLog
, LPCSTR lpBackupFileName
)
117 backupW
= SERV_dup(lpBackupFileName
);
118 ret
= ClearEventLogW(hEventLog
, backupW
);
124 /******************************************************************************
125 * ClearEventLogW [ADVAPI32.@]
127 * See ClearEventLogA.
129 BOOL WINAPI
ClearEventLogW( HANDLE hEventLog
, LPCWSTR lpBackupFileName
)
131 FIXME("(%p,%s) stub\n", hEventLog
, debugstr_w(lpBackupFileName
));
135 SetLastError(ERROR_INVALID_HANDLE
);
142 /******************************************************************************
143 * CloseEventLog [ADVAPI32.@]
145 * Closes a read handle to the event log.
148 * hEventLog [I/O] Handle of the event log to close.
154 BOOL WINAPI
CloseEventLog( HANDLE hEventLog
)
156 FIXME("(%p) stub\n", hEventLog
);
160 SetLastError(ERROR_INVALID_HANDLE
);
167 /******************************************************************************
168 * ControlTraceW [ADVAPI32.@]
170 * Control a givel event trace session
173 ULONG WINAPI
ControlTraceW( TRACEHANDLE hSession
, LPCWSTR SessionName
, PEVENT_TRACE_PROPERTIES Properties
, ULONG control
)
175 FIXME("(%s, %s, %p, %d) stub\n", wine_dbgstr_longlong(hSession
), debugstr_w(SessionName
), Properties
, control
);
176 return ERROR_SUCCESS
;
179 /******************************************************************************
180 * ControlTraceA [ADVAPI32.@]
185 ULONG WINAPI
ControlTraceA( TRACEHANDLE hSession
, LPCSTR SessionName
, PEVENT_TRACE_PROPERTIES Properties
, ULONG control
)
187 FIXME("(%s, %s, %p, %d) stub\n", wine_dbgstr_longlong(hSession
), debugstr_a(SessionName
), Properties
, control
);
188 return ERROR_SUCCESS
;
191 /******************************************************************************
192 * FlushTraceA [ADVAPI32.@]
194 ULONG WINAPI
FlushTraceA ( TRACEHANDLE hSession
, LPCSTR SessionName
, PEVENT_TRACE_PROPERTIES Properties
)
196 return ControlTraceA( hSession
, SessionName
, Properties
, EVENT_TRACE_CONTROL_FLUSH
);
199 /******************************************************************************
200 * FlushTraceW [ADVAPI32.@]
202 ULONG WINAPI
FlushTraceW ( TRACEHANDLE hSession
, LPCWSTR SessionName
, PEVENT_TRACE_PROPERTIES Properties
)
204 return ControlTraceW( hSession
, SessionName
, Properties
, EVENT_TRACE_CONTROL_FLUSH
);
208 /******************************************************************************
209 * DeregisterEventSource [ADVAPI32.@]
211 * Closes a write handle to an event log
214 * hEventLog [I/O] Handle of the event log.
220 BOOL WINAPI
DeregisterEventSource( HANDLE hEventLog
)
222 FIXME("(%p) stub\n", hEventLog
);
226 /******************************************************************************
227 * EnableTraceEx [ADVAPI32.@]
229 ULONG WINAPI
EnableTraceEx( LPCGUID provider
, LPCGUID source
, TRACEHANDLE hSession
, ULONG enable
,
230 UCHAR level
, ULONGLONG anykeyword
, ULONGLONG allkeyword
, ULONG enableprop
,
231 PEVENT_FILTER_DESCRIPTOR filterdesc
)
233 FIXME("(%s, %s, %s, %u, %u, %s, %s, %u, %p): stub\n", debugstr_guid(provider
),
234 debugstr_guid(source
), wine_dbgstr_longlong(hSession
), enable
, level
,
235 wine_dbgstr_longlong(anykeyword
), wine_dbgstr_longlong(allkeyword
),
236 enableprop
, filterdesc
);
238 return ERROR_SUCCESS
;
241 /******************************************************************************
242 * EnableTraceEx2 [ADVAPI32.@]
244 ULONG WINAPI
EnableTraceEx2( TRACEHANDLE handle
, LPCGUID provider
, ULONG control
, UCHAR level
,
245 ULONGLONG match_any
, ULONGLONG match_all
, ULONG timeout
,
246 PENABLE_TRACE_PARAMETERS params
)
248 FIXME("(%s, %s, %u, %u, %s, %s, %u, %p): stub\n", wine_dbgstr_longlong(handle
),
249 debugstr_guid(provider
), control
, level
, wine_dbgstr_longlong(match_any
),
250 wine_dbgstr_longlong(match_all
), timeout
, params
);
252 return ERROR_SUCCESS
;
255 /******************************************************************************
256 * EnableTrace [ADVAPI32.@]
258 ULONG WINAPI
EnableTrace( ULONG enable
, ULONG flag
, ULONG level
, LPCGUID guid
, TRACEHANDLE hSession
)
260 FIXME("(%d, 0x%x, %d, %s, %s): stub\n", enable
, flag
, level
,
261 debugstr_guid(guid
), wine_dbgstr_longlong(hSession
));
263 return ERROR_SUCCESS
;
266 /******************************************************************************
267 * GetEventLogInformation [ADVAPI32.@]
269 * Retrieve some information about an event log.
272 * hEventLog [I] Handle to an open event log.
273 * dwInfoLevel [I] Level of information (only EVENTLOG_FULL_INFO)
274 * lpBuffer [I/O] The buffer for the returned information
275 * cbBufSize [I] The size of the buffer
276 * pcbBytesNeeded [O] The needed bytes to hold the information
279 * Success: TRUE. lpBuffer will hold the information and pcbBytesNeeded shows
280 * the needed buffer size.
283 BOOL WINAPI
GetEventLogInformation( HANDLE hEventLog
, DWORD dwInfoLevel
, LPVOID lpBuffer
, DWORD cbBufSize
, LPDWORD pcbBytesNeeded
)
285 EVENTLOG_FULL_INFORMATION
*efi
;
287 FIXME("(%p, %d, %p, %d, %p) stub\n", hEventLog
, dwInfoLevel
, lpBuffer
, cbBufSize
, pcbBytesNeeded
);
289 if (dwInfoLevel
!= EVENTLOG_FULL_INFO
)
291 SetLastError(ERROR_INVALID_LEVEL
);
297 SetLastError(ERROR_INVALID_HANDLE
);
301 if (!lpBuffer
|| !pcbBytesNeeded
)
303 /* FIXME: This will be handled properly when eventlog is moved
306 SetLastError(RPC_X_NULL_REF_POINTER
);
310 *pcbBytesNeeded
= sizeof(EVENTLOG_FULL_INFORMATION
);
311 if (cbBufSize
< sizeof(EVENTLOG_FULL_INFORMATION
))
313 SetLastError(ERROR_INSUFFICIENT_BUFFER
);
317 /* Pretend the log is not full */
318 efi
= (EVENTLOG_FULL_INFORMATION
*)lpBuffer
;
324 /******************************************************************************
325 * GetNumberOfEventLogRecords [ADVAPI32.@]
327 * Retrieves the number of records in an event log.
330 * hEventLog [I] Handle to an open event log.
331 * NumberOfRecords [O] Number of records in the log.
334 * Success: nonzero. NumberOfRecords will contain the number of records in
338 BOOL WINAPI
GetNumberOfEventLogRecords( HANDLE hEventLog
, PDWORD NumberOfRecords
)
340 FIXME("(%p,%p) stub\n", hEventLog
, NumberOfRecords
);
342 if (!NumberOfRecords
)
344 SetLastError(ERROR_INVALID_PARAMETER
);
350 SetLastError(ERROR_INVALID_HANDLE
);
354 *NumberOfRecords
= 0;
359 /******************************************************************************
360 * GetOldestEventLogRecord [ADVAPI32.@]
362 * Retrieves the absolute record number of the oldest record in an even log.
365 * hEventLog [I] Handle to an open event log.
366 * OldestRecord [O] Absolute record number of the oldest record.
369 * Success: nonzero. OldestRecord contains the record number of the oldest
373 BOOL WINAPI
GetOldestEventLogRecord( HANDLE hEventLog
, PDWORD OldestRecord
)
375 FIXME("(%p,%p) stub\n", hEventLog
, OldestRecord
);
379 SetLastError(ERROR_INVALID_PARAMETER
);
385 SetLastError(ERROR_INVALID_HANDLE
);
394 /******************************************************************************
395 * GetTraceEnableFlags [ADVAPI32.@]
397 ULONG WINAPI
GetTraceEnableFlags( TRACEHANDLE handle
)
399 FIXME("(%s) stub\n", wine_dbgstr_longlong(handle
));
403 /******************************************************************************
404 * GetTraceEnableLevel [ADVAPI32.@]
406 UCHAR WINAPI
GetTraceEnableLevel( TRACEHANDLE handle
)
408 FIXME("(%s) stub\n", wine_dbgstr_longlong(handle
));
409 return TRACE_LEVEL_VERBOSE
;
412 /******************************************************************************
413 * GetTraceLoggerHandle [ADVAPI32.@]
415 TRACEHANDLE WINAPI
GetTraceLoggerHandle( PVOID buf
)
417 FIXME("(%p) stub\n", buf
);
418 SetLastError(ERROR_ACCESS_DENIED
);
419 return INVALID_PROCESSTRACE_HANDLE
;
422 /******************************************************************************
423 * NotifyChangeEventLog [ADVAPI32.@]
425 * Enables an application to receive notification when an event is written
429 * hEventLog [I] Handle to an event log.
430 * hEvent [I] Handle to a manual-reset event object.
436 BOOL WINAPI
NotifyChangeEventLog( HANDLE hEventLog
, HANDLE hEvent
)
438 FIXME("(%p,%p) stub\n", hEventLog
, hEvent
);
442 /******************************************************************************
443 * OpenBackupEventLogA [ADVAPI32.@]
445 * Opens a handle to a backup event log.
448 * lpUNCServerName [I] Universal Naming Convention name of the server on which
449 * this will be performed.
450 * lpFileName [I] Specifies the name of the backup file.
453 * Success: Handle to the backup event log.
456 HANDLE WINAPI
OpenBackupEventLogA( LPCSTR lpUNCServerName
, LPCSTR lpFileName
)
458 LPWSTR uncnameW
, filenameW
;
461 uncnameW
= SERV_dup(lpUNCServerName
);
462 filenameW
= SERV_dup(lpFileName
);
463 handle
= OpenBackupEventLogW(uncnameW
, filenameW
);
465 heap_free(filenameW
);
470 /******************************************************************************
471 * OpenBackupEventLogW [ADVAPI32.@]
473 * See OpenBackupEventLogA.
475 HANDLE WINAPI
OpenBackupEventLogW( LPCWSTR lpUNCServerName
, LPCWSTR lpFileName
)
477 FIXME("(%s,%s) stub\n", debugstr_w(lpUNCServerName
), debugstr_w(lpFileName
));
481 SetLastError(ERROR_INVALID_PARAMETER
);
485 if (lpUNCServerName
&& lpUNCServerName
[0])
487 FIXME("Remote server not supported\n");
488 SetLastError(RPC_S_SERVER_UNAVAILABLE
);
492 if (GetFileAttributesW(lpFileName
) == INVALID_FILE_ATTRIBUTES
)
494 SetLastError(ERROR_FILE_NOT_FOUND
);
498 return (HANDLE
)0xcafe4242;
501 /******************************************************************************
502 * OpenEventLogA [ADVAPI32.@]
504 * Opens a handle to the specified event log.
507 * lpUNCServerName [I] UNC name of the server on which the event log is
509 * lpSourceName [I] Name of the log.
512 * Success: Handle to an event log.
515 HANDLE WINAPI
OpenEventLogA( LPCSTR uncname
, LPCSTR source
)
517 LPWSTR uncnameW
, sourceW
;
520 uncnameW
= SERV_dup(uncname
);
521 sourceW
= SERV_dup(source
);
522 handle
= OpenEventLogW(uncnameW
, sourceW
);
529 /******************************************************************************
530 * OpenEventLogW [ADVAPI32.@]
534 HANDLE WINAPI
OpenEventLogW( LPCWSTR uncname
, LPCWSTR source
)
536 FIXME("(%s,%s) stub\n", debugstr_w(uncname
), debugstr_w(source
));
540 SetLastError(ERROR_INVALID_PARAMETER
);
544 if (uncname
&& uncname
[0])
546 FIXME("Remote server not supported\n");
547 SetLastError(RPC_S_SERVER_UNAVAILABLE
);
551 return (HANDLE
)0xcafe4242;
554 /******************************************************************************
555 * QueryAllTracesW [ADVAPI32.@]
557 * Query information for started event trace sessions
560 ULONG WINAPI
QueryAllTracesW( PEVENT_TRACE_PROPERTIES
* parray
, ULONG arraycount
, PULONG psessioncount
)
562 FIXME("(%p, %d, %p) stub\n", parray
, arraycount
, psessioncount
);
564 if (psessioncount
) *psessioncount
= 0;
565 return ERROR_SUCCESS
;
568 /******************************************************************************
569 * QueryAllTracesA [ADVAPI32.@]
571 * See QueryAllTracesW.
573 ULONG WINAPI
QueryAllTracesA( PEVENT_TRACE_PROPERTIES
* parray
, ULONG arraycount
, PULONG psessioncount
)
575 FIXME("(%p, %d, %p) stub\n", parray
, arraycount
, psessioncount
);
577 if (psessioncount
) *psessioncount
= 0;
578 return ERROR_SUCCESS
;
581 /******************************************************************************
582 * ReadEventLogA [ADVAPI32.@]
584 * Reads a whole number of entries from an event log.
587 * hEventLog [I] Handle of the event log to read.
588 * dwReadFlags [I] see MSDN doc.
589 * dwRecordOffset [I] Log-entry record number to start at.
590 * lpBuffer [O] Buffer for the data read.
591 * nNumberOfBytesToRead [I] Size of lpBuffer.
592 * pnBytesRead [O] Receives number of bytes read.
593 * pnMinNumberOfBytesNeeded [O] Receives number of bytes required for the
600 BOOL WINAPI
ReadEventLogA( HANDLE hEventLog
, DWORD dwReadFlags
, DWORD dwRecordOffset
,
601 LPVOID lpBuffer
, DWORD nNumberOfBytesToRead
, DWORD
*pnBytesRead
, DWORD
*pnMinNumberOfBytesNeeded
)
603 FIXME("(%p,0x%08x,0x%08x,%p,0x%08x,%p,%p) stub\n", hEventLog
, dwReadFlags
,
604 dwRecordOffset
, lpBuffer
, nNumberOfBytesToRead
, pnBytesRead
, pnMinNumberOfBytesNeeded
);
606 SetLastError(ERROR_HANDLE_EOF
);
610 /******************************************************************************
611 * ReadEventLogW [ADVAPI32.@]
615 BOOL WINAPI
ReadEventLogW( HANDLE hEventLog
, DWORD dwReadFlags
, DWORD dwRecordOffset
,
616 LPVOID lpBuffer
, DWORD nNumberOfBytesToRead
, DWORD
*pnBytesRead
, DWORD
*pnMinNumberOfBytesNeeded
)
618 FIXME("(%p,0x%08x,0x%08x,%p,0x%08x,%p,%p) stub\n", hEventLog
, dwReadFlags
,
619 dwRecordOffset
, lpBuffer
, nNumberOfBytesToRead
, pnBytesRead
, pnMinNumberOfBytesNeeded
);
621 SetLastError(ERROR_HANDLE_EOF
);
625 /******************************************************************************
626 * RegisterEventSourceA [ADVAPI32.@]
628 * Returns a registered handle to an event log.
631 * lpUNCServerName [I] UNC name of the source server.
632 * lpSourceName [I] Specifies the name of the event source to retrieve.
635 * Success: Handle to the event log.
636 * Failure: NULL. Returns ERROR_INVALID_HANDLE if lpSourceName specifies the
637 * Security event log.
639 HANDLE WINAPI
RegisterEventSourceA( LPCSTR lpUNCServerName
, LPCSTR lpSourceName
)
641 UNICODE_STRING lpUNCServerNameW
;
642 UNICODE_STRING lpSourceNameW
;
645 FIXME("(%s,%s): stub\n", debugstr_a(lpUNCServerName
), debugstr_a(lpSourceName
));
647 RtlCreateUnicodeStringFromAsciiz(&lpUNCServerNameW
, lpUNCServerName
);
648 RtlCreateUnicodeStringFromAsciiz(&lpSourceNameW
, lpSourceName
);
649 ret
= RegisterEventSourceW(lpUNCServerNameW
.Buffer
,lpSourceNameW
.Buffer
);
650 RtlFreeUnicodeString (&lpUNCServerNameW
);
651 RtlFreeUnicodeString (&lpSourceNameW
);
655 /******************************************************************************
656 * RegisterEventSourceW [ADVAPI32.@]
658 * See RegisterEventSourceA.
660 HANDLE WINAPI
RegisterEventSourceW( LPCWSTR lpUNCServerName
, LPCWSTR lpSourceName
)
662 FIXME("(%s,%s): stub\n", debugstr_w(lpUNCServerName
), debugstr_w(lpSourceName
));
663 return (HANDLE
)0xcafe4242;
666 /******************************************************************************
667 * ReportEventA [ADVAPI32.@]
669 * Writes an entry at the end of an event log.
672 * hEventLog [I] Handle of an event log.
673 * wType [I] See MSDN doc.
674 * wCategory [I] Event category.
675 * dwEventID [I] Event identifier.
676 * lpUserSid [I] Current user's security identifier.
677 * wNumStrings [I] Number of insert strings in lpStrings.
678 * dwDataSize [I] Size of event-specific raw data to write.
679 * lpStrings [I] Buffer containing an array of string to be merged.
680 * lpRawData [I] Buffer containing the binary data.
683 * Success: nonzero. Entry was written to the log.
687 * The ReportEvent function adds the time, the entry's length, and the
688 * offsets before storing the entry in the log. If lpUserSid != NULL, the
689 * username is also logged.
691 BOOL WINAPI
ReportEventA ( HANDLE hEventLog
, WORD wType
, WORD wCategory
, DWORD dwEventID
,
692 PSID lpUserSid
, WORD wNumStrings
, DWORD dwDataSize
, LPCSTR
*lpStrings
, LPVOID lpRawData
)
694 LPWSTR
*wideStrArray
;
699 FIXME("(%p,0x%04x,0x%04x,0x%08x,%p,0x%04x,0x%08x,%p,%p): stub\n", hEventLog
,
700 wType
, wCategory
, dwEventID
, lpUserSid
, wNumStrings
, dwDataSize
, lpStrings
, lpRawData
);
702 if (wNumStrings
== 0) return TRUE
;
703 if (!lpStrings
) return TRUE
;
705 wideStrArray
= heap_alloc(sizeof(LPWSTR
) * wNumStrings
);
706 for (i
= 0; i
< wNumStrings
; i
++)
708 RtlCreateUnicodeStringFromAsciiz(&str
, lpStrings
[i
]);
709 wideStrArray
[i
] = str
.Buffer
;
711 ret
= ReportEventW(hEventLog
, wType
, wCategory
, dwEventID
, lpUserSid
,
712 wNumStrings
, dwDataSize
, (LPCWSTR
*)wideStrArray
, lpRawData
);
713 for (i
= 0; i
< wNumStrings
; i
++)
714 heap_free( wideStrArray
[i
] );
715 heap_free(wideStrArray
);
719 /******************************************************************************
720 * ReportEventW [ADVAPI32.@]
724 BOOL WINAPI
ReportEventW( HANDLE hEventLog
, WORD wType
, WORD wCategory
, DWORD dwEventID
,
725 PSID lpUserSid
, WORD wNumStrings
, DWORD dwDataSize
, LPCWSTR
*lpStrings
, LPVOID lpRawData
)
729 FIXME("(%p,0x%04x,0x%04x,0x%08x,%p,0x%04x,0x%08x,%p,%p): stub\n", hEventLog
,
730 wType
, wCategory
, dwEventID
, lpUserSid
, wNumStrings
, dwDataSize
, lpStrings
, lpRawData
);
734 if (wNumStrings
== 0) return TRUE
;
735 if (!lpStrings
) return TRUE
;
737 for (i
= 0; i
< wNumStrings
; i
++)
741 case EVENTLOG_SUCCESS
:
742 TRACE_(eventlog
)("%s\n", debugstr_w(lpStrings
[i
]));
744 case EVENTLOG_ERROR_TYPE
:
745 ERR_(eventlog
)("%s\n", debugstr_w(lpStrings
[i
]));
747 case EVENTLOG_WARNING_TYPE
:
748 WARN_(eventlog
)("%s\n", debugstr_w(lpStrings
[i
]));
751 TRACE_(eventlog
)("%s\n", debugstr_w(lpStrings
[i
]));
758 /******************************************************************************
759 * StartTraceW [ADVAPI32.@]
761 * Register and start an event trace session
764 ULONG WINAPI
StartTraceW( PTRACEHANDLE pSessionHandle
, LPCWSTR SessionName
, PEVENT_TRACE_PROPERTIES Properties
)
766 FIXME("(%p, %s, %p) stub\n", pSessionHandle
, debugstr_w(SessionName
), Properties
);
767 if (pSessionHandle
) *pSessionHandle
= 0xcafe4242;
768 return ERROR_SUCCESS
;
771 /******************************************************************************
772 * StartTraceA [ADVAPI32.@]
777 ULONG WINAPI
StartTraceA( PTRACEHANDLE pSessionHandle
, LPCSTR SessionName
, PEVENT_TRACE_PROPERTIES Properties
)
779 FIXME("(%p, %s, %p) stub\n", pSessionHandle
, debugstr_a(SessionName
), Properties
);
780 if (pSessionHandle
) *pSessionHandle
= 0xcafe4242;
781 return ERROR_SUCCESS
;
784 /******************************************************************************
785 * StopTraceW [ADVAPI32.@]
787 * Stop an event trace session
790 ULONG WINAPI
StopTraceW( TRACEHANDLE session
, LPCWSTR session_name
, PEVENT_TRACE_PROPERTIES properties
)
792 FIXME("(%s, %s, %p) stub\n", wine_dbgstr_longlong(session
), debugstr_w(session_name
), properties
);
793 return ERROR_SUCCESS
;
796 /******************************************************************************
797 * StopTraceA [ADVAPI32.@]
802 ULONG WINAPI
StopTraceA( TRACEHANDLE session
, LPCSTR session_name
, PEVENT_TRACE_PROPERTIES properties
)
804 FIXME("(%s, %s, %p) stub\n", wine_dbgstr_longlong(session
), debugstr_a(session_name
), properties
);
805 return ERROR_SUCCESS
;
808 /******************************************************************************
809 * TraceEvent [ADVAPI32.@]
811 ULONG WINAPI
TraceEvent( TRACEHANDLE SessionHandle
, PEVENT_TRACE_HEADER EventTrace
)
813 FIXME("%s %p\n", wine_dbgstr_longlong(SessionHandle
), EventTrace
);
814 return ERROR_CALL_NOT_IMPLEMENTED
;
817 /******************************************************************************
818 * EventProviderEnabled [ADVAPI32.@]
821 BOOLEAN WINAPI
EventProviderEnabled( REGHANDLE handle
, UCHAR level
, ULONGLONG keyword
)
823 FIXME("%s, %u, %s: stub\n", wine_dbgstr_longlong(handle
), level
, wine_dbgstr_longlong(keyword
));
827 /******************************************************************************
828 * EventActivityIdControl [ADVAPI32.@]
831 ULONG WINAPI
EventActivityIdControl(ULONG code
, GUID
*guid
)
835 if (!once
++) FIXME("0x%x, %p: stub\n", code
, guid
);
836 return ERROR_SUCCESS
;
839 /******************************************************************************
840 * EventWriteTransfer [ADVAPI32.@]
842 ULONG WINAPI
EventWriteTransfer( REGHANDLE handle
, PCEVENT_DESCRIPTOR descriptor
, LPCGUID activity
,
843 LPCGUID related
, ULONG count
, PEVENT_DATA_DESCRIPTOR data
)
845 FIXME("%s, %p, %s, %s, %u, %p: stub\n", wine_dbgstr_longlong(handle
), descriptor
,
846 debugstr_guid(activity
), debugstr_guid(related
), count
, data
);
847 return ERROR_SUCCESS
;
850 /******************************************************************************
851 * QueryTraceW [ADVAPI32.@]
853 ULONG WINAPI
QueryTraceW( TRACEHANDLE handle
, LPCWSTR sessionname
, PEVENT_TRACE_PROPERTIES properties
)
855 FIXME("%s %s %p: stub\n", wine_dbgstr_longlong(handle
), debugstr_w(sessionname
), properties
);
856 return ERROR_CALL_NOT_IMPLEMENTED
;
859 /******************************************************************************
860 * OpenTraceA [ADVAPI32.@]
862 TRACEHANDLE WINAPI
OpenTraceA( PEVENT_TRACE_LOGFILEA logfile
)
866 if (!once
++) FIXME("%p: stub\n", logfile
);
867 SetLastError(ERROR_ACCESS_DENIED
);
868 return INVALID_PROCESSTRACE_HANDLE
;
871 /******************************************************************************
872 * OpenTraceW [ADVAPI32.@]
874 TRACEHANDLE WINAPI
OpenTraceW( PEVENT_TRACE_LOGFILEW logfile
)
878 if (!once
++) FIXME("%p: stub\n", logfile
);
879 SetLastError(ERROR_ACCESS_DENIED
);
880 return INVALID_PROCESSTRACE_HANDLE
;
883 /******************************************************************************
884 * ProcessTrace [ADVAPI32.@]
886 ULONG WINAPI
ProcessTrace( PTRACEHANDLE HandleArray
, ULONG HandleCount
, LPFILETIME StartTime
, LPFILETIME EndTime
)
888 FIXME("%p %u %p %p: stub\n", HandleArray
, HandleCount
, StartTime
, EndTime
);
889 return ERROR_CALL_NOT_IMPLEMENTED
;
892 /******************************************************************************
893 * TraceMessage [ADVAPI32.@]
895 ULONG WINAPIV
TraceMessage( TRACEHANDLE handle
, ULONG flags
, LPGUID guid
, USHORT number
, ... )
900 __ms_va_start( valist
, number
);
901 ret
= TraceMessageVa( handle
, flags
, guid
, number
, valist
);
902 __ms_va_end( valist
);
906 /******************************************************************************
907 * TraceMessageVa [ADVAPI32.@]
909 ULONG WINAPI
TraceMessageVa( TRACEHANDLE handle
, ULONG flags
, LPGUID guid
, USHORT number
,
912 FIXME("(%s %x %s %d) : stub\n", wine_dbgstr_longlong(handle
), flags
, debugstr_guid(guid
), number
);
913 return ERROR_SUCCESS
;
916 /******************************************************************************
917 * CloseTrace [ADVAPI32.@]
919 ULONG WINAPI
CloseTrace( TRACEHANDLE handle
)
921 FIXME("%s: stub\n", wine_dbgstr_longlong(handle
));
922 return ERROR_INVALID_HANDLE
;
925 /******************************************************************************
926 * EnumerateTraceGuids [ADVAPI32.@]
928 ULONG WINAPI
EnumerateTraceGuids(PTRACE_GUID_PROPERTIES
*propertiesarray
,
929 ULONG arraycount
, PULONG guidcount
)
931 FIXME("%p %d %p: stub\n", propertiesarray
, arraycount
, guidcount
);
932 return ERROR_INVALID_PARAMETER
;
935 /******************************************************************************
936 * TraceSetInformation [ADVAPI32.@]
938 ULONG WINAPI
TraceSetInformation(TRACEHANDLE handle
, TRACE_INFO_CLASS infoclass
, VOID
* info
, ULONG len
)
940 FIXME("%s %d %p %d: stub\n", wine_dbgstr_longlong(handle
), infoclass
, info
, len
);
941 return ERROR_CALL_NOT_IMPLEMENTED
;