advapi32: Add some input parameter checks to GetOldestEventLogRecord.
[wine/multimedia.git] / dlls / advapi32 / eventlog.c
blob8ce255a1ad42dbbadf03c2a7f7682c5678239a5d
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 FIXME("(%p,%s) stub\n", hEventLog, debugstr_a(lpBackupFileName));
68 return TRUE;
71 /******************************************************************************
72 * BackupEventLogW [ADVAPI32.@]
74 * See BackupEventLogA.
76 BOOL WINAPI BackupEventLogW( HANDLE hEventLog, LPCWSTR lpBackupFileName )
78 FIXME("(%p,%s) stub\n", hEventLog, debugstr_w(lpBackupFileName));
79 return TRUE;
82 /******************************************************************************
83 * ClearEventLogA [ADVAPI32.@]
85 * Clears the event log and/or saves the log to a backup file.
87 * PARAMS
88 * hEvenLog [I] Handle to event log to clear.
89 * lpBackupFileName [I] Name of the backup file.
91 * RETURNS
92 * Success: nonzero. if lpBackupFileName != NULL, lpBackupFileName will
93 * contain the contents of hEvenLog and the log will be cleared.
94 * Failure: zero. Fails if the event log is empty or if lpBackupFileName
95 * exists.
97 BOOL WINAPI ClearEventLogA( HANDLE hEventLog, LPCSTR lpBackupFileName )
99 FIXME("(%p,%s) stub\n", hEventLog, debugstr_a(lpBackupFileName));
100 return TRUE;
103 /******************************************************************************
104 * ClearEventLogW [ADVAPI32.@]
106 * See ClearEventLogA.
108 BOOL WINAPI ClearEventLogW( HANDLE hEventLog, LPCWSTR lpBackupFileName )
110 FIXME("(%p,%s) stub\n", hEventLog, debugstr_w(lpBackupFileName));
111 return TRUE;
114 /******************************************************************************
115 * CloseEventLog [ADVAPI32.@]
117 * Closes a read handle to the event log.
119 * PARAMS
120 * hEventLog [I/O] Handle of the event log to close.
122 * RETURNS
123 * Success: nonzero
124 * Failure: zero
126 BOOL WINAPI CloseEventLog( HANDLE hEventLog )
128 FIXME("(%p) stub\n", hEventLog);
130 if (!hEventLog)
132 SetLastError(ERROR_INVALID_HANDLE);
133 return FALSE;
136 return TRUE;
139 /******************************************************************************
140 * ControlTraceW [ADVAPI32.@]
142 * Control a givel event trace session
145 ULONG WINAPI ControlTraceW( TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control )
147 FIXME("(%s, %s, %p, %d) stub\n", wine_dbgstr_longlong(hSession), debugstr_w(SessionName), Properties, control);
148 return ERROR_SUCCESS;
151 /******************************************************************************
152 * ControlTraceA [ADVAPI32.@]
154 * See ControlTraceW.
157 ULONG WINAPI ControlTraceA( TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties, ULONG control )
159 FIXME("(%s, %s, %p, %d) stub\n", wine_dbgstr_longlong(hSession), debugstr_a(SessionName), Properties, control);
160 return ERROR_SUCCESS;
163 /******************************************************************************
164 * DeregisterEventSource [ADVAPI32.@]
166 * Closes a write handle to an event log
168 * PARAMS
169 * hEventLog [I/O] Handle of the event log.
171 * RETURNS
172 * Success: nonzero
173 * Failure: zero
175 BOOL WINAPI DeregisterEventSource( HANDLE hEventLog )
177 FIXME("(%p) stub\n", hEventLog);
178 return TRUE;
181 /******************************************************************************
182 * EnableTrace [ADVAPI32.@]
184 ULONG WINAPI EnableTrace( ULONG enable, ULONG flag, ULONG level, LPCGUID guid, TRACEHANDLE hSession )
186 FIXME("(%d, 0x%x, %d, %s, %s): stub\n", enable, flag, level,
187 debugstr_guid(guid), wine_dbgstr_longlong(hSession));
189 return ERROR_SUCCESS;
192 /******************************************************************************
193 * GetEventLogInformation [ADVAPI32.@]
195 * Retrieve some information about an event log.
197 * PARAMS
198 * hEventLog [I] Handle to an open event log.
199 * dwInfoLevel [I] Level of information (only EVENTLOG_FULL_INFO)
200 * lpBuffer [I/O] The buffer for the returned information
201 * cbBufSize [I] The size of the buffer
202 * pcbBytesNeeded [O] The needed bytes to hold the information
204 * RETURNS
205 * Success: TRUE. lpBuffer will hold the information and pcbBytesNeeded shows
206 * the needed buffer size.
207 * Failure: FALSE.
209 BOOL WINAPI GetEventLogInformation( HANDLE hEventLog, DWORD dwInfoLevel, LPVOID lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
211 EVENTLOG_FULL_INFORMATION *efi;
213 FIXME("(%p, %d, %p, %d, %p) stub\n", hEventLog, dwInfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded);
215 if (dwInfoLevel != EVENTLOG_FULL_INFO)
217 SetLastError(ERROR_INVALID_LEVEL);
218 return FALSE;
221 if (!hEventLog)
223 SetLastError(ERROR_INVALID_HANDLE);
224 return FALSE;
227 if (!lpBuffer || !pcbBytesNeeded)
229 /* FIXME: This will be handled properly when eventlog is moved
230 * to a higher level
232 SetLastError(RPC_X_NULL_REF_POINTER);
233 return FALSE;
236 *pcbBytesNeeded = sizeof(EVENTLOG_FULL_INFORMATION);
237 if (cbBufSize < sizeof(EVENTLOG_FULL_INFORMATION))
239 SetLastError(ERROR_INSUFFICIENT_BUFFER);
240 return FALSE;
243 /* Pretend the log is not full */
244 efi = (EVENTLOG_FULL_INFORMATION *)lpBuffer;
245 efi->dwFull = 0;
247 return TRUE;
250 /******************************************************************************
251 * GetNumberOfEventLogRecords [ADVAPI32.@]
253 * Retrieves the number of records in an event log.
255 * PARAMS
256 * hEventLog [I] Handle to an open event log.
257 * NumberOfRecords [O] Number of records in the log.
259 * RETURNS
260 * Success: nonzero. NumberOfRecords will contain the number of records in
261 * the log.
262 * Failure: zero
264 BOOL WINAPI GetNumberOfEventLogRecords( HANDLE hEventLog, PDWORD NumberOfRecords )
266 FIXME("(%p,%p) stub\n", hEventLog, NumberOfRecords);
268 if (!NumberOfRecords)
270 SetLastError(ERROR_INVALID_PARAMETER);
271 return FALSE;
274 if (!hEventLog)
276 SetLastError(ERROR_INVALID_HANDLE);
277 return FALSE;
280 *NumberOfRecords = 0;
282 return TRUE;
285 /******************************************************************************
286 * GetOldestEventLogRecord [ADVAPI32.@]
288 * Retrieves the absolute record number of the oldest record in an even log.
290 * PARAMS
291 * hEventLog [I] Handle to an open event log.
292 * OldestRecord [O] Absolute record number of the oldest record.
294 * RETURNS
295 * Success: nonzero. OldestRecord contains the record number of the oldest
296 * record in the log.
297 * Failure: zero
299 BOOL WINAPI GetOldestEventLogRecord( HANDLE hEventLog, PDWORD OldestRecord )
301 FIXME("(%p,%p) stub\n", hEventLog, OldestRecord);
303 if (!OldestRecord)
305 SetLastError(ERROR_INVALID_PARAMETER);
306 return FALSE;
309 if (!hEventLog)
311 SetLastError(ERROR_INVALID_HANDLE);
312 return FALSE;
315 *OldestRecord = 0;
317 return TRUE;
320 /******************************************************************************
321 * NotifyChangeEventLog [ADVAPI32.@]
323 * Enables an application to receive notification when an event is written
324 * to an event log.
326 * PARAMS
327 * hEventLog [I] Handle to an event log.
328 * hEvent [I] Handle to a manual-reset event object.
330 * RETURNS
331 * Success: nonzero
332 * Failure: zero
334 BOOL WINAPI NotifyChangeEventLog( HANDLE hEventLog, HANDLE hEvent )
336 FIXME("(%p,%p) stub\n", hEventLog, hEvent);
337 return TRUE;
340 /******************************************************************************
341 * OpenBackupEventLogA [ADVAPI32.@]
343 * Opens a handle to a backup event log.
345 * PARAMS
346 * lpUNCServerName [I] Universal Naming Convention name of the server on which
347 * this will be performed.
348 * lpFileName [I] Specifies the name of the backup file.
350 * RETURNS
351 * Success: Handle to the backup event log.
352 * Failure: NULL
354 HANDLE WINAPI OpenBackupEventLogA( LPCSTR lpUNCServerName, LPCSTR lpFileName )
356 FIXME("(%s,%s) stub\n", debugstr_a(lpUNCServerName), debugstr_a(lpFileName));
357 return (HANDLE)0xcafe4242;
360 /******************************************************************************
361 * OpenBackupEventLogW [ADVAPI32.@]
363 * See OpenBackupEventLogA.
365 HANDLE WINAPI OpenBackupEventLogW( LPCWSTR lpUNCServerName, LPCWSTR lpFileName )
367 FIXME("(%s,%s) stub\n", debugstr_w(lpUNCServerName), debugstr_w(lpFileName));
368 return (HANDLE)0xcafe4242;
371 /******************************************************************************
372 * OpenEventLogA [ADVAPI32.@]
374 * Opens a handle to the specified event log.
376 * PARAMS
377 * lpUNCServerName [I] UNC name of the server on which the event log is
378 * opened.
379 * lpSourceName [I] Name of the log.
381 * RETURNS
382 * Success: Handle to an event log.
383 * Failure: NULL
385 HANDLE WINAPI OpenEventLogA( LPCSTR uncname, LPCSTR source )
387 LPWSTR uncnameW, sourceW;
388 HANDLE handle;
390 uncnameW = SERV_dup(uncname);
391 sourceW = SERV_dup(source);
392 handle = OpenEventLogW(uncnameW, sourceW);
393 HeapFree(GetProcessHeap(), 0, uncnameW);
394 HeapFree(GetProcessHeap(), 0, sourceW);
396 return handle;
399 /******************************************************************************
400 * OpenEventLogW [ADVAPI32.@]
402 * See OpenEventLogA.
404 HANDLE WINAPI OpenEventLogW( LPCWSTR uncname, LPCWSTR source )
406 FIXME("(%s,%s) stub\n", debugstr_w(uncname), debugstr_w(source));
408 if (!source)
410 SetLastError(ERROR_INVALID_PARAMETER);
411 return NULL;
414 if (uncname && uncname[0])
416 FIXME("Remote server not supported\n");
417 SetLastError(RPC_S_SERVER_UNAVAILABLE);
418 return NULL;
421 return (HANDLE)0xcafe4242;
424 /******************************************************************************
425 * QueryAllTracesW [ADVAPI32.@]
427 * Query informations for started event trace sessions
430 ULONG WINAPI QueryAllTracesW( PEVENT_TRACE_PROPERTIES * parray, ULONG arraycount, PULONG psessioncount )
432 FIXME("(%p, %d, %p) stub\n", parray, arraycount, psessioncount);
434 if (psessioncount) *psessioncount = 0;
435 return ERROR_SUCCESS;
438 /******************************************************************************
439 * QueryAllTracesA [ADVAPI32.@]
441 * See QueryAllTracesW.
443 ULONG WINAPI QueryAllTracesA( PEVENT_TRACE_PROPERTIES * parray, ULONG arraycount, PULONG psessioncount )
445 FIXME("(%p, %d, %p) stub\n", parray, arraycount, psessioncount);
447 if (psessioncount) *psessioncount = 0;
448 return ERROR_SUCCESS;
451 /******************************************************************************
452 * ReadEventLogA [ADVAPI32.@]
454 * Reads a whole number of entries from an event log.
456 * PARAMS
457 * hEventLog [I] Handle of the event log to read.
458 * dwReadFlags [I] see MSDN doc.
459 * dwRecordOffset [I] Log-entry record number to start at.
460 * lpBuffer [O] Buffer for the data read.
461 * nNumberOfBytesToRead [I] Size of lpBuffer.
462 * pnBytesRead [O] Receives number of bytes read.
463 * pnMinNumberOfBytesNeeded [O] Receives number of bytes required for the
464 * next log entry.
466 * RETURNS
467 * Success: nonzero
468 * Failure: zero
470 BOOL WINAPI ReadEventLogA( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
471 LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
473 FIXME("(%p,0x%08x,0x%08x,%p,0x%08x,%p,%p) stub\n", hEventLog, dwReadFlags,
474 dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
475 return FALSE;
478 /******************************************************************************
479 * ReadEventLogW [ADVAPI32.@]
481 * See ReadEventLogA.
483 BOOL WINAPI ReadEventLogW( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
484 LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
486 FIXME("(%p,0x%08x,0x%08x,%p,0x%08x,%p,%p) stub\n", hEventLog, dwReadFlags,
487 dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
488 return FALSE;
491 /******************************************************************************
492 * RegisterEventSourceA [ADVAPI32.@]
494 * Returns a registered handle to an event log.
496 * PARAMS
497 * lpUNCServerName [I] UNC name of the source server.
498 * lpSourceName [I] Specifies the name of the event source to retrieve.
500 * RETURNS
501 * Success: Handle to the event log.
502 * Failure: NULL. Returns ERROR_INVALID_HANDLE if lpSourceName specifies the
503 * Security event log.
505 HANDLE WINAPI RegisterEventSourceA( LPCSTR lpUNCServerName, LPCSTR lpSourceName )
507 UNICODE_STRING lpUNCServerNameW;
508 UNICODE_STRING lpSourceNameW;
509 HANDLE ret;
511 FIXME("(%s,%s): stub\n", debugstr_a(lpUNCServerName), debugstr_a(lpSourceName));
513 RtlCreateUnicodeStringFromAsciiz(&lpUNCServerNameW, lpUNCServerName);
514 RtlCreateUnicodeStringFromAsciiz(&lpSourceNameW, lpSourceName);
515 ret = RegisterEventSourceW(lpUNCServerNameW.Buffer,lpSourceNameW.Buffer);
516 RtlFreeUnicodeString (&lpUNCServerNameW);
517 RtlFreeUnicodeString (&lpSourceNameW);
518 return ret;
521 /******************************************************************************
522 * RegisterEventSourceW [ADVAPI32.@]
524 * See RegisterEventSourceA.
526 HANDLE WINAPI RegisterEventSourceW( LPCWSTR lpUNCServerName, LPCWSTR lpSourceName )
528 FIXME("(%s,%s): stub\n", debugstr_w(lpUNCServerName), debugstr_w(lpSourceName));
529 return (HANDLE)0xcafe4242;
532 /******************************************************************************
533 * ReportEventA [ADVAPI32.@]
535 * Writes an entry at the end of an event log.
537 * PARAMS
538 * hEventLog [I] Handle of an event log.
539 * wType [I] See MSDN doc.
540 * wCategory [I] Event category.
541 * dwEventID [I] Event identifier.
542 * lpUserSid [I] Current user's security identifier.
543 * wNumStrings [I] Number of insert strings in lpStrings.
544 * dwDataSize [I] Size of event-specific raw data to write.
545 * lpStrings [I] Buffer containing an array of string to be merged.
546 * lpRawData [I] Buffer containing the binary data.
548 * RETURNS
549 * Success: nonzero. Entry was written to the log.
550 * Failure: zero.
552 * NOTES
553 * The ReportEvent function adds the time, the entry's length, and the
554 * offsets before storing the entry in the log. If lpUserSid != NULL, the
555 * username is also logged.
557 BOOL WINAPI ReportEventA ( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
558 PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCSTR *lpStrings, LPVOID lpRawData)
560 LPWSTR *wideStrArray;
561 UNICODE_STRING str;
562 int i;
563 BOOL ret;
565 FIXME("(%p,0x%04x,0x%04x,0x%08x,%p,0x%04x,0x%08x,%p,%p): stub\n", hEventLog,
566 wType, wCategory, dwEventID, lpUserSid, wNumStrings, dwDataSize, lpStrings, lpRawData);
568 if (wNumStrings == 0) return TRUE;
569 if (!lpStrings) return TRUE;
571 wideStrArray = HeapAlloc(GetProcessHeap(), 0, sizeof(LPWSTR) * wNumStrings);
572 for (i = 0; i < wNumStrings; i++)
574 RtlCreateUnicodeStringFromAsciiz(&str, lpStrings[i]);
575 wideStrArray[i] = str.Buffer;
577 ret = ReportEventW(hEventLog, wType, wCategory, dwEventID, lpUserSid,
578 wNumStrings, dwDataSize, (LPCWSTR *)wideStrArray, lpRawData);
579 for (i = 0; i < wNumStrings; i++)
581 HeapFree( GetProcessHeap(), 0, wideStrArray[i] );
583 HeapFree(GetProcessHeap(), 0, wideStrArray);
584 return ret;
587 /******************************************************************************
588 * ReportEventW [ADVAPI32.@]
590 * See ReportEventA.
592 BOOL WINAPI ReportEventW( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
593 PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCWSTR *lpStrings, LPVOID lpRawData )
595 int i;
597 FIXME("(%p,0x%04x,0x%04x,0x%08x,%p,0x%04x,0x%08x,%p,%p): stub\n", hEventLog,
598 wType, wCategory, dwEventID, lpUserSid, wNumStrings, dwDataSize, lpStrings, lpRawData);
600 /* partial stub */
602 if (wNumStrings == 0) return TRUE;
603 if (!lpStrings) return TRUE;
605 for (i = 0; i < wNumStrings; i++)
607 switch (wType)
609 case EVENTLOG_SUCCESS:
610 TRACE_(eventlog)("%s\n", debugstr_w(lpStrings[i]));
611 break;
612 case EVENTLOG_ERROR_TYPE:
613 ERR_(eventlog)("%s\n", debugstr_w(lpStrings[i]));
614 break;
615 case EVENTLOG_WARNING_TYPE:
616 WARN_(eventlog)("%s\n", debugstr_w(lpStrings[i]));
617 break;
618 default:
619 TRACE_(eventlog)("%s\n", debugstr_w(lpStrings[i]));
620 break;
623 return TRUE;
626 /******************************************************************************
627 * RegisterTraceGuidsW [ADVAPI32.@]
629 * Register an event trace provider and the event trace classes that it uses
630 * to generate events.
632 * PARAMS
633 * RequestAddress [I] ControlCallback function
634 * RequestContext [I] Optional provider-defined context
635 * ControlGuid [I] GUID of the registering provider
636 * GuidCount [I] Number of elements in the TraceGuidReg array
637 * TraceGuidReg [I/O] Array of TRACE_GUID_REGISTRATION structures
638 * MofImagePath [I] not supported, set to NULL
639 * MofResourceNmae [I] not supported, set to NULL
640 * RegistrationHandle [O] Provider's registration handle
642 * RETURNS
643 * Success: ERROR_SUCCESS
644 * Failure: System error code
646 * FIXME
647 * Stub.
649 ULONG WINAPI RegisterTraceGuidsW( WMIDPREQUEST RequestAddress,
650 PVOID RequestContext, LPCGUID ControlGuid, ULONG GuidCount,
651 PTRACE_GUID_REGISTRATION TraceGuidReg, LPCWSTR MofImagePath,
652 LPCWSTR MofResourceName, PTRACEHANDLE RegistrationHandle )
654 FIXME("%p %p %p %u %p %s %s %p\n", RequestAddress, RequestContext,
655 ControlGuid, GuidCount, TraceGuidReg, debugstr_w(MofImagePath),
656 debugstr_w(MofResourceName), RegistrationHandle);
657 return ERROR_CALL_NOT_IMPLEMENTED;
660 /******************************************************************************
661 * RegisterTraceGuidsA [ADVAPI32.@]
663 * See RegisterTraceGuidsW.
665 * FIXME
666 * Stub.
668 ULONG WINAPI RegisterTraceGuidsA( WMIDPREQUEST RequestAddress,
669 PVOID RequestContext, LPCGUID ControlGuid, ULONG GuidCount,
670 PTRACE_GUID_REGISTRATION TraceGuidReg, LPCSTR MofImagePath,
671 LPCSTR MofResourceName, PTRACEHANDLE RegistrationHandle )
673 FIXME("%p %p %p %u %p %s %s %p\n", RequestAddress, RequestContext,
674 ControlGuid, GuidCount, TraceGuidReg, debugstr_a(MofImagePath),
675 debugstr_a(MofResourceName), RegistrationHandle);
676 return ERROR_CALL_NOT_IMPLEMENTED;
679 /******************************************************************************
680 * StartTraceW [ADVAPI32.@]
682 * Register and start an event trace session
685 ULONG WINAPI StartTraceW( PTRACEHANDLE pSessionHandle, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
687 FIXME("(%p, %s, %p) stub\n", pSessionHandle, debugstr_w(SessionName), Properties);
688 if (pSessionHandle) *pSessionHandle = 0xcafe4242;
689 return ERROR_SUCCESS;
692 /******************************************************************************
693 * StartTraceA [ADVAPI32.@]
695 * See StartTraceW.
698 ULONG WINAPI StartTraceA( PTRACEHANDLE pSessionHandle, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
700 FIXME("(%p, %s, %p) stub\n", pSessionHandle, debugstr_a(SessionName), Properties);
701 if (pSessionHandle) *pSessionHandle = 0xcafe4242;
702 return ERROR_SUCCESS;
705 /******************************************************************************
706 * TraceEvent [ADVAPI32.@]
708 ULONG WINAPI TraceEvent( TRACEHANDLE SessionHandle, PEVENT_TRACE_HEADER EventTrace )
710 FIXME("%s %p\n", wine_dbgstr_longlong(SessionHandle), EventTrace);
711 return ERROR_CALL_NOT_IMPLEMENTED;
714 /******************************************************************************
715 * UnregisterTraceGuids [ADVAPI32.@]
717 * See RegisterTraceGuids
719 * FIXME
720 * Stub.
722 ULONG WINAPI UnregisterTraceGuids( TRACEHANDLE RegistrationHandle )
724 FIXME("%s: stub\n", wine_dbgstr_longlong(RegistrationHandle));
725 return ERROR_CALL_NOT_IMPLEMENTED;