advapi32: Add stubs for FlushTrace[AW].
[wine/multimedia.git] / dlls / advapi32 / eventlog.c
blobdf44cd2a7d9d62e913610f7775baf2fa1602fe84
1 /*
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
23 #include <stdarg.h>
25 #include "windef.h"
26 #include "winbase.h"
27 #include "winerror.h"
28 #include "winternl.h"
29 #include "wmistr.h"
30 #include "evntrace.h"
32 #include "wine/unicode.h"
33 #include "wine/debug.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(advapi);
36 WINE_DECLARE_DEBUG_CHANNEL(eventlog);
38 static inline LPWSTR SERV_dup( LPCSTR str )
40 UINT len;
41 LPWSTR wstr;
43 if( !str )
44 return NULL;
45 len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 );
46 wstr = HeapAlloc( GetProcessHeap(), 0, len*sizeof (WCHAR) );
47 MultiByteToWideChar( CP_ACP, 0, str, -1, wstr, len );
48 return wstr;
51 /******************************************************************************
52 * BackupEventLogA [ADVAPI32.@]
54 * Saves the event log to a backup file.
56 * PARAMS
57 * hEventLog [I] Handle to event log to backup.
58 * lpBackupFileName [I] Name of the backup file.
60 * RETURNS
61 * Success: nonzero. File lpBackupFileName will contain the contents of
62 * hEvenLog.
63 * Failure: zero.
65 BOOL WINAPI BackupEventLogA( HANDLE hEventLog, LPCSTR lpBackupFileName )
67 LPWSTR backupW;
68 BOOL ret;
70 backupW = SERV_dup(lpBackupFileName);
71 ret = BackupEventLogW(hEventLog, backupW);
72 HeapFree(GetProcessHeap(), 0, backupW);
74 return ret;
77 /******************************************************************************
78 * BackupEventLogW [ADVAPI32.@]
80 * See BackupEventLogA.
82 BOOL WINAPI BackupEventLogW( HANDLE hEventLog, LPCWSTR lpBackupFileName )
84 FIXME("(%p,%s) stub\n", hEventLog, debugstr_w(lpBackupFileName));
86 if (!lpBackupFileName)
88 SetLastError(ERROR_INVALID_PARAMETER);
89 return FALSE;
92 if (!hEventLog)
94 SetLastError(ERROR_INVALID_HANDLE);
95 return FALSE;
98 if (GetFileAttributesW(lpBackupFileName) != INVALID_FILE_ATTRIBUTES)
100 SetLastError(ERROR_ALREADY_EXISTS);
101 return FALSE;
104 return TRUE;
107 /******************************************************************************
108 * ClearEventLogA [ADVAPI32.@]
110 * Clears the event log and optionally saves the log to a backup file.
112 * PARAMS
113 * hEvenLog [I] Handle to event log to clear.
114 * lpBackupFileName [I] Name of the backup file.
116 * RETURNS
117 * Success: nonzero. if lpBackupFileName != NULL, lpBackupFileName will
118 * contain the contents of hEvenLog and the log will be cleared.
119 * Failure: zero. Fails if the event log is empty or if lpBackupFileName
120 * exists.
122 BOOL WINAPI ClearEventLogA( HANDLE hEventLog, LPCSTR lpBackupFileName )
124 LPWSTR backupW;
125 BOOL ret;
127 backupW = SERV_dup(lpBackupFileName);
128 ret = ClearEventLogW(hEventLog, backupW);
129 HeapFree(GetProcessHeap(), 0, backupW);
131 return ret;
134 /******************************************************************************
135 * ClearEventLogW [ADVAPI32.@]
137 * See ClearEventLogA.
139 BOOL WINAPI ClearEventLogW( HANDLE hEventLog, LPCWSTR lpBackupFileName )
141 FIXME("(%p,%s) stub\n", hEventLog, debugstr_w(lpBackupFileName));
143 if (!hEventLog)
145 SetLastError(ERROR_INVALID_HANDLE);
146 return FALSE;
149 return TRUE;
152 /******************************************************************************
153 * CloseEventLog [ADVAPI32.@]
155 * Closes a read handle to the event log.
157 * PARAMS
158 * hEventLog [I/O] Handle of the event log to close.
160 * RETURNS
161 * Success: nonzero
162 * Failure: zero
164 BOOL WINAPI CloseEventLog( HANDLE hEventLog )
166 FIXME("(%p) stub\n", hEventLog);
168 if (!hEventLog)
170 SetLastError(ERROR_INVALID_HANDLE);
171 return FALSE;
174 return TRUE;
177 /******************************************************************************
178 * ControlTraceW [ADVAPI32.@]
180 * Control a givel event trace session
183 ULONG WINAPI ControlTraceW( TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control )
185 FIXME("(%s, %s, %p, %d) stub\n", wine_dbgstr_longlong(hSession), debugstr_w(SessionName), Properties, control);
186 return ERROR_SUCCESS;
189 /******************************************************************************
190 * ControlTraceA [ADVAPI32.@]
192 * See ControlTraceW.
195 ULONG WINAPI ControlTraceA( TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control )
197 FIXME("(%s, %s, %p, %d) stub\n", wine_dbgstr_longlong(hSession), debugstr_a(SessionName), Properties, control);
198 return ERROR_SUCCESS;
201 /******************************************************************************
202 * FlushTraceA [ADVAPI32.@]
204 ULONG WINAPI FlushTraceA ( TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
206 return ControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_FLUSH );
209 /******************************************************************************
210 * FlushTraceW [ADVAPI32.@]
212 ULONG WINAPI FlushTraceW ( TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
214 return ControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_FLUSH );
218 /******************************************************************************
219 * DeregisterEventSource [ADVAPI32.@]
221 * Closes a write handle to an event log
223 * PARAMS
224 * hEventLog [I/O] Handle of the event log.
226 * RETURNS
227 * Success: nonzero
228 * Failure: zero
230 BOOL WINAPI DeregisterEventSource( HANDLE hEventLog )
232 FIXME("(%p) stub\n", hEventLog);
233 return TRUE;
236 /******************************************************************************
237 * EnableTrace [ADVAPI32.@]
239 ULONG WINAPI EnableTrace( ULONG enable, ULONG flag, ULONG level, LPCGUID guid, TRACEHANDLE hSession )
241 FIXME("(%d, 0x%x, %d, %s, %s): stub\n", enable, flag, level,
242 debugstr_guid(guid), wine_dbgstr_longlong(hSession));
244 return ERROR_SUCCESS;
247 /******************************************************************************
248 * GetEventLogInformation [ADVAPI32.@]
250 * Retrieve some information about an event log.
252 * PARAMS
253 * hEventLog [I] Handle to an open event log.
254 * dwInfoLevel [I] Level of information (only EVENTLOG_FULL_INFO)
255 * lpBuffer [I/O] The buffer for the returned information
256 * cbBufSize [I] The size of the buffer
257 * pcbBytesNeeded [O] The needed bytes to hold the information
259 * RETURNS
260 * Success: TRUE. lpBuffer will hold the information and pcbBytesNeeded shows
261 * the needed buffer size.
262 * Failure: FALSE.
264 BOOL WINAPI GetEventLogInformation( HANDLE hEventLog, DWORD dwInfoLevel, LPVOID lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
266 EVENTLOG_FULL_INFORMATION *efi;
268 FIXME("(%p, %d, %p, %d, %p) stub\n", hEventLog, dwInfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded);
270 if (dwInfoLevel != EVENTLOG_FULL_INFO)
272 SetLastError(ERROR_INVALID_LEVEL);
273 return FALSE;
276 if (!hEventLog)
278 SetLastError(ERROR_INVALID_HANDLE);
279 return FALSE;
282 if (!lpBuffer || !pcbBytesNeeded)
284 /* FIXME: This will be handled properly when eventlog is moved
285 * to a higher level
287 SetLastError(RPC_X_NULL_REF_POINTER);
288 return FALSE;
291 *pcbBytesNeeded = sizeof(EVENTLOG_FULL_INFORMATION);
292 if (cbBufSize < sizeof(EVENTLOG_FULL_INFORMATION))
294 SetLastError(ERROR_INSUFFICIENT_BUFFER);
295 return FALSE;
298 /* Pretend the log is not full */
299 efi = (EVENTLOG_FULL_INFORMATION *)lpBuffer;
300 efi->dwFull = 0;
302 return TRUE;
305 /******************************************************************************
306 * GetNumberOfEventLogRecords [ADVAPI32.@]
308 * Retrieves the number of records in an event log.
310 * PARAMS
311 * hEventLog [I] Handle to an open event log.
312 * NumberOfRecords [O] Number of records in the log.
314 * RETURNS
315 * Success: nonzero. NumberOfRecords will contain the number of records in
316 * the log.
317 * Failure: zero
319 BOOL WINAPI GetNumberOfEventLogRecords( HANDLE hEventLog, PDWORD NumberOfRecords )
321 FIXME("(%p,%p) stub\n", hEventLog, NumberOfRecords);
323 if (!NumberOfRecords)
325 SetLastError(ERROR_INVALID_PARAMETER);
326 return FALSE;
329 if (!hEventLog)
331 SetLastError(ERROR_INVALID_HANDLE);
332 return FALSE;
335 *NumberOfRecords = 0;
337 return TRUE;
340 /******************************************************************************
341 * GetOldestEventLogRecord [ADVAPI32.@]
343 * Retrieves the absolute record number of the oldest record in an even log.
345 * PARAMS
346 * hEventLog [I] Handle to an open event log.
347 * OldestRecord [O] Absolute record number of the oldest record.
349 * RETURNS
350 * Success: nonzero. OldestRecord contains the record number of the oldest
351 * record in the log.
352 * Failure: zero
354 BOOL WINAPI GetOldestEventLogRecord( HANDLE hEventLog, PDWORD OldestRecord )
356 FIXME("(%p,%p) stub\n", hEventLog, OldestRecord);
358 if (!OldestRecord)
360 SetLastError(ERROR_INVALID_PARAMETER);
361 return FALSE;
364 if (!hEventLog)
366 SetLastError(ERROR_INVALID_HANDLE);
367 return FALSE;
370 *OldestRecord = 0;
372 return TRUE;
375 /******************************************************************************
376 * NotifyChangeEventLog [ADVAPI32.@]
378 * Enables an application to receive notification when an event is written
379 * to an event log.
381 * PARAMS
382 * hEventLog [I] Handle to an event log.
383 * hEvent [I] Handle to a manual-reset event object.
385 * RETURNS
386 * Success: nonzero
387 * Failure: zero
389 BOOL WINAPI NotifyChangeEventLog( HANDLE hEventLog, HANDLE hEvent )
391 FIXME("(%p,%p) stub\n", hEventLog, hEvent);
392 return TRUE;
395 /******************************************************************************
396 * OpenBackupEventLogA [ADVAPI32.@]
398 * Opens a handle to a backup event log.
400 * PARAMS
401 * lpUNCServerName [I] Universal Naming Convention name of the server on which
402 * this will be performed.
403 * lpFileName [I] Specifies the name of the backup file.
405 * RETURNS
406 * Success: Handle to the backup event log.
407 * Failure: NULL
409 HANDLE WINAPI OpenBackupEventLogA( LPCSTR lpUNCServerName, LPCSTR lpFileName )
411 LPWSTR uncnameW, filenameW;
412 HANDLE handle;
414 uncnameW = SERV_dup(lpUNCServerName);
415 filenameW = SERV_dup(lpFileName);
416 handle = OpenBackupEventLogW(uncnameW, filenameW);
417 HeapFree(GetProcessHeap(), 0, uncnameW);
418 HeapFree(GetProcessHeap(), 0, filenameW);
420 return handle;
423 /******************************************************************************
424 * OpenBackupEventLogW [ADVAPI32.@]
426 * See OpenBackupEventLogA.
428 HANDLE WINAPI OpenBackupEventLogW( LPCWSTR lpUNCServerName, LPCWSTR lpFileName )
430 FIXME("(%s,%s) stub\n", debugstr_w(lpUNCServerName), debugstr_w(lpFileName));
432 if (!lpFileName)
434 SetLastError(ERROR_INVALID_PARAMETER);
435 return NULL;
438 if (lpUNCServerName && lpUNCServerName[0])
440 FIXME("Remote server not supported\n");
441 SetLastError(RPC_S_SERVER_UNAVAILABLE);
442 return NULL;
445 if (GetFileAttributesW(lpFileName) == INVALID_FILE_ATTRIBUTES)
447 SetLastError(ERROR_FILE_NOT_FOUND);
448 return NULL;
451 return (HANDLE)0xcafe4242;
454 /******************************************************************************
455 * OpenEventLogA [ADVAPI32.@]
457 * Opens a handle to the specified event log.
459 * PARAMS
460 * lpUNCServerName [I] UNC name of the server on which the event log is
461 * opened.
462 * lpSourceName [I] Name of the log.
464 * RETURNS
465 * Success: Handle to an event log.
466 * Failure: NULL
468 HANDLE WINAPI OpenEventLogA( LPCSTR uncname, LPCSTR source )
470 LPWSTR uncnameW, sourceW;
471 HANDLE handle;
473 uncnameW = SERV_dup(uncname);
474 sourceW = SERV_dup(source);
475 handle = OpenEventLogW(uncnameW, sourceW);
476 HeapFree(GetProcessHeap(), 0, uncnameW);
477 HeapFree(GetProcessHeap(), 0, sourceW);
479 return handle;
482 /******************************************************************************
483 * OpenEventLogW [ADVAPI32.@]
485 * See OpenEventLogA.
487 HANDLE WINAPI OpenEventLogW( LPCWSTR uncname, LPCWSTR source )
489 FIXME("(%s,%s) stub\n", debugstr_w(uncname), debugstr_w(source));
491 if (!source)
493 SetLastError(ERROR_INVALID_PARAMETER);
494 return NULL;
497 if (uncname && uncname[0])
499 FIXME("Remote server not supported\n");
500 SetLastError(RPC_S_SERVER_UNAVAILABLE);
501 return NULL;
504 return (HANDLE)0xcafe4242;
507 /******************************************************************************
508 * QueryAllTracesW [ADVAPI32.@]
510 * Query information for started event trace sessions
513 ULONG WINAPI QueryAllTracesW( PEVENT_TRACE_PROPERTIES * parray, ULONG arraycount, PULONG psessioncount )
515 FIXME("(%p, %d, %p) stub\n", parray, arraycount, psessioncount);
517 if (psessioncount) *psessioncount = 0;
518 return ERROR_SUCCESS;
521 /******************************************************************************
522 * QueryAllTracesA [ADVAPI32.@]
524 * See QueryAllTracesW.
526 ULONG WINAPI QueryAllTracesA( PEVENT_TRACE_PROPERTIES * parray, ULONG arraycount, PULONG psessioncount )
528 FIXME("(%p, %d, %p) stub\n", parray, arraycount, psessioncount);
530 if (psessioncount) *psessioncount = 0;
531 return ERROR_SUCCESS;
534 /******************************************************************************
535 * ReadEventLogA [ADVAPI32.@]
537 * Reads a whole number of entries from an event log.
539 * PARAMS
540 * hEventLog [I] Handle of the event log to read.
541 * dwReadFlags [I] see MSDN doc.
542 * dwRecordOffset [I] Log-entry record number to start at.
543 * lpBuffer [O] Buffer for the data read.
544 * nNumberOfBytesToRead [I] Size of lpBuffer.
545 * pnBytesRead [O] Receives number of bytes read.
546 * pnMinNumberOfBytesNeeded [O] Receives number of bytes required for the
547 * next log entry.
549 * RETURNS
550 * Success: nonzero
551 * Failure: zero
553 BOOL WINAPI ReadEventLogA( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
554 LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
556 FIXME("(%p,0x%08x,0x%08x,%p,0x%08x,%p,%p) stub\n", hEventLog, dwReadFlags,
557 dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
558 return FALSE;
561 /******************************************************************************
562 * ReadEventLogW [ADVAPI32.@]
564 * See ReadEventLogA.
566 BOOL WINAPI ReadEventLogW( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
567 LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
569 FIXME("(%p,0x%08x,0x%08x,%p,0x%08x,%p,%p) stub\n", hEventLog, dwReadFlags,
570 dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
571 return FALSE;
574 /******************************************************************************
575 * RegisterEventSourceA [ADVAPI32.@]
577 * Returns a registered handle to an event log.
579 * PARAMS
580 * lpUNCServerName [I] UNC name of the source server.
581 * lpSourceName [I] Specifies the name of the event source to retrieve.
583 * RETURNS
584 * Success: Handle to the event log.
585 * Failure: NULL. Returns ERROR_INVALID_HANDLE if lpSourceName specifies the
586 * Security event log.
588 HANDLE WINAPI RegisterEventSourceA( LPCSTR lpUNCServerName, LPCSTR lpSourceName )
590 UNICODE_STRING lpUNCServerNameW;
591 UNICODE_STRING lpSourceNameW;
592 HANDLE ret;
594 FIXME("(%s,%s): stub\n", debugstr_a(lpUNCServerName), debugstr_a(lpSourceName));
596 RtlCreateUnicodeStringFromAsciiz(&lpUNCServerNameW, lpUNCServerName);
597 RtlCreateUnicodeStringFromAsciiz(&lpSourceNameW, lpSourceName);
598 ret = RegisterEventSourceW(lpUNCServerNameW.Buffer,lpSourceNameW.Buffer);
599 RtlFreeUnicodeString (&lpUNCServerNameW);
600 RtlFreeUnicodeString (&lpSourceNameW);
601 return ret;
604 /******************************************************************************
605 * RegisterEventSourceW [ADVAPI32.@]
607 * See RegisterEventSourceA.
609 HANDLE WINAPI RegisterEventSourceW( LPCWSTR lpUNCServerName, LPCWSTR lpSourceName )
611 FIXME("(%s,%s): stub\n", debugstr_w(lpUNCServerName), debugstr_w(lpSourceName));
612 return (HANDLE)0xcafe4242;
615 /******************************************************************************
616 * ReportEventA [ADVAPI32.@]
618 * Writes an entry at the end of an event log.
620 * PARAMS
621 * hEventLog [I] Handle of an event log.
622 * wType [I] See MSDN doc.
623 * wCategory [I] Event category.
624 * dwEventID [I] Event identifier.
625 * lpUserSid [I] Current user's security identifier.
626 * wNumStrings [I] Number of insert strings in lpStrings.
627 * dwDataSize [I] Size of event-specific raw data to write.
628 * lpStrings [I] Buffer containing an array of string to be merged.
629 * lpRawData [I] Buffer containing the binary data.
631 * RETURNS
632 * Success: nonzero. Entry was written to the log.
633 * Failure: zero.
635 * NOTES
636 * The ReportEvent function adds the time, the entry's length, and the
637 * offsets before storing the entry in the log. If lpUserSid != NULL, the
638 * username is also logged.
640 BOOL WINAPI ReportEventA ( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
641 PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCSTR *lpStrings, LPVOID lpRawData)
643 LPWSTR *wideStrArray;
644 UNICODE_STRING str;
645 int i;
646 BOOL ret;
648 FIXME("(%p,0x%04x,0x%04x,0x%08x,%p,0x%04x,0x%08x,%p,%p): stub\n", hEventLog,
649 wType, wCategory, dwEventID, lpUserSid, wNumStrings, dwDataSize, lpStrings, lpRawData);
651 if (wNumStrings == 0) return TRUE;
652 if (!lpStrings) return TRUE;
654 wideStrArray = HeapAlloc(GetProcessHeap(), 0, sizeof(LPWSTR) * wNumStrings);
655 for (i = 0; i < wNumStrings; i++)
657 RtlCreateUnicodeStringFromAsciiz(&str, lpStrings[i]);
658 wideStrArray[i] = str.Buffer;
660 ret = ReportEventW(hEventLog, wType, wCategory, dwEventID, lpUserSid,
661 wNumStrings, dwDataSize, (LPCWSTR *)wideStrArray, lpRawData);
662 for (i = 0; i < wNumStrings; i++)
664 HeapFree( GetProcessHeap(), 0, wideStrArray[i] );
666 HeapFree(GetProcessHeap(), 0, wideStrArray);
667 return ret;
670 /******************************************************************************
671 * ReportEventW [ADVAPI32.@]
673 * See ReportEventA.
675 BOOL WINAPI ReportEventW( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
676 PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCWSTR *lpStrings, LPVOID lpRawData )
678 int i;
680 FIXME("(%p,0x%04x,0x%04x,0x%08x,%p,0x%04x,0x%08x,%p,%p): stub\n", hEventLog,
681 wType, wCategory, dwEventID, lpUserSid, wNumStrings, dwDataSize, lpStrings, lpRawData);
683 /* partial stub */
685 if (wNumStrings == 0) return TRUE;
686 if (!lpStrings) return TRUE;
688 for (i = 0; i < wNumStrings; i++)
690 switch (wType)
692 case EVENTLOG_SUCCESS:
693 TRACE_(eventlog)("%s\n", debugstr_w(lpStrings[i]));
694 break;
695 case EVENTLOG_ERROR_TYPE:
696 ERR_(eventlog)("%s\n", debugstr_w(lpStrings[i]));
697 break;
698 case EVENTLOG_WARNING_TYPE:
699 WARN_(eventlog)("%s\n", debugstr_w(lpStrings[i]));
700 break;
701 default:
702 TRACE_(eventlog)("%s\n", debugstr_w(lpStrings[i]));
703 break;
706 return TRUE;
709 /******************************************************************************
710 * RegisterTraceGuidsW [ADVAPI32.@]
712 * Register an event trace provider and the event trace classes that it uses
713 * to generate events.
715 * PARAMS
716 * RequestAddress [I] ControlCallback function
717 * RequestContext [I] Optional provider-defined context
718 * ControlGuid [I] GUID of the registering provider
719 * GuidCount [I] Number of elements in the TraceGuidReg array
720 * TraceGuidReg [I/O] Array of TRACE_GUID_REGISTRATION structures
721 * MofImagePath [I] not supported, set to NULL
722 * MofResourceNmae [I] not supported, set to NULL
723 * RegistrationHandle [O] Provider's registration handle
725 * RETURNS
726 * Success: ERROR_SUCCESS
727 * Failure: System error code
729 * FIXME
730 * Stub.
732 ULONG WINAPI RegisterTraceGuidsW( WMIDPREQUEST RequestAddress,
733 PVOID RequestContext, LPCGUID ControlGuid, ULONG GuidCount,
734 PTRACE_GUID_REGISTRATION TraceGuidReg, LPCWSTR MofImagePath,
735 LPCWSTR MofResourceName, PTRACEHANDLE RegistrationHandle )
737 FIXME("(%p, %p, %s, %u, %p, %s, %s, %p,)\n", RequestAddress, RequestContext,
738 debugstr_guid(ControlGuid), GuidCount, TraceGuidReg, debugstr_w(MofImagePath),
739 debugstr_w(MofResourceName), RegistrationHandle);
740 return ERROR_CALL_NOT_IMPLEMENTED;
743 /******************************************************************************
744 * RegisterTraceGuidsA [ADVAPI32.@]
746 * See RegisterTraceGuidsW.
748 * FIXME
749 * Stub.
751 ULONG WINAPI RegisterTraceGuidsA( WMIDPREQUEST RequestAddress,
752 PVOID RequestContext, LPCGUID ControlGuid, ULONG GuidCount,
753 PTRACE_GUID_REGISTRATION TraceGuidReg, LPCSTR MofImagePath,
754 LPCSTR MofResourceName, PTRACEHANDLE RegistrationHandle )
756 FIXME("(%p, %p, %s, %u, %p, %s, %s, %p,)\n", RequestAddress, RequestContext,
757 debugstr_guid(ControlGuid), GuidCount, TraceGuidReg, debugstr_a(MofImagePath),
758 debugstr_a(MofResourceName), RegistrationHandle);
759 return ERROR_CALL_NOT_IMPLEMENTED;
762 /******************************************************************************
763 * StartTraceW [ADVAPI32.@]
765 * Register and start an event trace session
768 ULONG WINAPI StartTraceW( PTRACEHANDLE pSessionHandle, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
770 FIXME("(%p, %s, %p) stub\n", pSessionHandle, debugstr_w(SessionName), Properties);
771 if (pSessionHandle) *pSessionHandle = 0xcafe4242;
772 return ERROR_SUCCESS;
775 /******************************************************************************
776 * StartTraceA [ADVAPI32.@]
778 * See StartTraceW.
781 ULONG WINAPI StartTraceA( PTRACEHANDLE pSessionHandle, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
783 FIXME("(%p, %s, %p) stub\n", pSessionHandle, debugstr_a(SessionName), Properties);
784 if (pSessionHandle) *pSessionHandle = 0xcafe4242;
785 return ERROR_SUCCESS;
788 /******************************************************************************
789 * TraceEvent [ADVAPI32.@]
791 ULONG WINAPI TraceEvent( TRACEHANDLE SessionHandle, PEVENT_TRACE_HEADER EventTrace )
793 FIXME("%s %p\n", wine_dbgstr_longlong(SessionHandle), EventTrace);
794 return ERROR_CALL_NOT_IMPLEMENTED;
797 /******************************************************************************
798 * UnregisterTraceGuids [ADVAPI32.@]
800 * See RegisterTraceGuids
802 * FIXME
803 * Stub.
805 ULONG WINAPI UnregisterTraceGuids( TRACEHANDLE RegistrationHandle )
807 FIXME("%s: stub\n", wine_dbgstr_longlong(RegistrationHandle));
808 return ERROR_CALL_NOT_IMPLEMENTED;