wined3d: Use the FBO cache in stretch_rect_fbo().
[wine/hramrach.git] / dlls / advapi32 / eventlog.c
bloba5d1837b480138d7e73f20cbb413d5d5d9ba1ace
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 * DeregisterEventSource [ADVAPI32.@]
204 * Closes a write handle to an event log
206 * PARAMS
207 * hEventLog [I/O] Handle of the event log.
209 * RETURNS
210 * Success: nonzero
211 * Failure: zero
213 BOOL WINAPI DeregisterEventSource( HANDLE hEventLog )
215 FIXME("(%p) stub\n", hEventLog);
216 return TRUE;
219 /******************************************************************************
220 * EnableTrace [ADVAPI32.@]
222 ULONG WINAPI EnableTrace( ULONG enable, ULONG flag, ULONG level, LPCGUID guid, TRACEHANDLE hSession )
224 FIXME("(%d, 0x%x, %d, %s, %s): stub\n", enable, flag, level,
225 debugstr_guid(guid), wine_dbgstr_longlong(hSession));
227 return ERROR_SUCCESS;
230 /******************************************************************************
231 * GetEventLogInformation [ADVAPI32.@]
233 * Retrieve some information about an event log.
235 * PARAMS
236 * hEventLog [I] Handle to an open event log.
237 * dwInfoLevel [I] Level of information (only EVENTLOG_FULL_INFO)
238 * lpBuffer [I/O] The buffer for the returned information
239 * cbBufSize [I] The size of the buffer
240 * pcbBytesNeeded [O] The needed bytes to hold the information
242 * RETURNS
243 * Success: TRUE. lpBuffer will hold the information and pcbBytesNeeded shows
244 * the needed buffer size.
245 * Failure: FALSE.
247 BOOL WINAPI GetEventLogInformation( HANDLE hEventLog, DWORD dwInfoLevel, LPVOID lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
249 EVENTLOG_FULL_INFORMATION *efi;
251 FIXME("(%p, %d, %p, %d, %p) stub\n", hEventLog, dwInfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded);
253 if (dwInfoLevel != EVENTLOG_FULL_INFO)
255 SetLastError(ERROR_INVALID_LEVEL);
256 return FALSE;
259 if (!hEventLog)
261 SetLastError(ERROR_INVALID_HANDLE);
262 return FALSE;
265 if (!lpBuffer || !pcbBytesNeeded)
267 /* FIXME: This will be handled properly when eventlog is moved
268 * to a higher level
270 SetLastError(RPC_X_NULL_REF_POINTER);
271 return FALSE;
274 *pcbBytesNeeded = sizeof(EVENTLOG_FULL_INFORMATION);
275 if (cbBufSize < sizeof(EVENTLOG_FULL_INFORMATION))
277 SetLastError(ERROR_INSUFFICIENT_BUFFER);
278 return FALSE;
281 /* Pretend the log is not full */
282 efi = (EVENTLOG_FULL_INFORMATION *)lpBuffer;
283 efi->dwFull = 0;
285 return TRUE;
288 /******************************************************************************
289 * GetNumberOfEventLogRecords [ADVAPI32.@]
291 * Retrieves the number of records in an event log.
293 * PARAMS
294 * hEventLog [I] Handle to an open event log.
295 * NumberOfRecords [O] Number of records in the log.
297 * RETURNS
298 * Success: nonzero. NumberOfRecords will contain the number of records in
299 * the log.
300 * Failure: zero
302 BOOL WINAPI GetNumberOfEventLogRecords( HANDLE hEventLog, PDWORD NumberOfRecords )
304 FIXME("(%p,%p) stub\n", hEventLog, NumberOfRecords);
306 if (!NumberOfRecords)
308 SetLastError(ERROR_INVALID_PARAMETER);
309 return FALSE;
312 if (!hEventLog)
314 SetLastError(ERROR_INVALID_HANDLE);
315 return FALSE;
318 *NumberOfRecords = 0;
320 return TRUE;
323 /******************************************************************************
324 * GetOldestEventLogRecord [ADVAPI32.@]
326 * Retrieves the absolute record number of the oldest record in an even log.
328 * PARAMS
329 * hEventLog [I] Handle to an open event log.
330 * OldestRecord [O] Absolute record number of the oldest record.
332 * RETURNS
333 * Success: nonzero. OldestRecord contains the record number of the oldest
334 * record in the log.
335 * Failure: zero
337 BOOL WINAPI GetOldestEventLogRecord( HANDLE hEventLog, PDWORD OldestRecord )
339 FIXME("(%p,%p) stub\n", hEventLog, OldestRecord);
341 if (!OldestRecord)
343 SetLastError(ERROR_INVALID_PARAMETER);
344 return FALSE;
347 if (!hEventLog)
349 SetLastError(ERROR_INVALID_HANDLE);
350 return FALSE;
353 *OldestRecord = 0;
355 return TRUE;
358 /******************************************************************************
359 * NotifyChangeEventLog [ADVAPI32.@]
361 * Enables an application to receive notification when an event is written
362 * to an event log.
364 * PARAMS
365 * hEventLog [I] Handle to an event log.
366 * hEvent [I] Handle to a manual-reset event object.
368 * RETURNS
369 * Success: nonzero
370 * Failure: zero
372 BOOL WINAPI NotifyChangeEventLog( HANDLE hEventLog, HANDLE hEvent )
374 FIXME("(%p,%p) stub\n", hEventLog, hEvent);
375 return TRUE;
378 /******************************************************************************
379 * OpenBackupEventLogA [ADVAPI32.@]
381 * Opens a handle to a backup event log.
383 * PARAMS
384 * lpUNCServerName [I] Universal Naming Convention name of the server on which
385 * this will be performed.
386 * lpFileName [I] Specifies the name of the backup file.
388 * RETURNS
389 * Success: Handle to the backup event log.
390 * Failure: NULL
392 HANDLE WINAPI OpenBackupEventLogA( LPCSTR lpUNCServerName, LPCSTR lpFileName )
394 LPWSTR uncnameW, filenameW;
395 HANDLE handle;
397 uncnameW = SERV_dup(lpUNCServerName);
398 filenameW = SERV_dup(lpFileName);
399 handle = OpenBackupEventLogW(uncnameW, filenameW);
400 HeapFree(GetProcessHeap(), 0, uncnameW);
401 HeapFree(GetProcessHeap(), 0, filenameW);
403 return handle;
406 /******************************************************************************
407 * OpenBackupEventLogW [ADVAPI32.@]
409 * See OpenBackupEventLogA.
411 HANDLE WINAPI OpenBackupEventLogW( LPCWSTR lpUNCServerName, LPCWSTR lpFileName )
413 FIXME("(%s,%s) stub\n", debugstr_w(lpUNCServerName), debugstr_w(lpFileName));
415 if (!lpFileName)
417 SetLastError(ERROR_INVALID_PARAMETER);
418 return NULL;
421 if (lpUNCServerName && lpUNCServerName[0])
423 FIXME("Remote server not supported\n");
424 SetLastError(RPC_S_SERVER_UNAVAILABLE);
425 return NULL;
428 if (GetFileAttributesW(lpFileName) == INVALID_FILE_ATTRIBUTES)
430 SetLastError(ERROR_FILE_NOT_FOUND);
431 return NULL;
434 return (HANDLE)0xcafe4242;
437 /******************************************************************************
438 * OpenEventLogA [ADVAPI32.@]
440 * Opens a handle to the specified event log.
442 * PARAMS
443 * lpUNCServerName [I] UNC name of the server on which the event log is
444 * opened.
445 * lpSourceName [I] Name of the log.
447 * RETURNS
448 * Success: Handle to an event log.
449 * Failure: NULL
451 HANDLE WINAPI OpenEventLogA( LPCSTR uncname, LPCSTR source )
453 LPWSTR uncnameW, sourceW;
454 HANDLE handle;
456 uncnameW = SERV_dup(uncname);
457 sourceW = SERV_dup(source);
458 handle = OpenEventLogW(uncnameW, sourceW);
459 HeapFree(GetProcessHeap(), 0, uncnameW);
460 HeapFree(GetProcessHeap(), 0, sourceW);
462 return handle;
465 /******************************************************************************
466 * OpenEventLogW [ADVAPI32.@]
468 * See OpenEventLogA.
470 HANDLE WINAPI OpenEventLogW( LPCWSTR uncname, LPCWSTR source )
472 FIXME("(%s,%s) stub\n", debugstr_w(uncname), debugstr_w(source));
474 if (!source)
476 SetLastError(ERROR_INVALID_PARAMETER);
477 return NULL;
480 if (uncname && uncname[0])
482 FIXME("Remote server not supported\n");
483 SetLastError(RPC_S_SERVER_UNAVAILABLE);
484 return NULL;
487 return (HANDLE)0xcafe4242;
490 /******************************************************************************
491 * QueryAllTracesW [ADVAPI32.@]
493 * Query information for started event trace sessions
496 ULONG WINAPI QueryAllTracesW( PEVENT_TRACE_PROPERTIES * parray, ULONG arraycount, PULONG psessioncount )
498 FIXME("(%p, %d, %p) stub\n", parray, arraycount, psessioncount);
500 if (psessioncount) *psessioncount = 0;
501 return ERROR_SUCCESS;
504 /******************************************************************************
505 * QueryAllTracesA [ADVAPI32.@]
507 * See QueryAllTracesW.
509 ULONG WINAPI QueryAllTracesA( PEVENT_TRACE_PROPERTIES * parray, ULONG arraycount, PULONG psessioncount )
511 FIXME("(%p, %d, %p) stub\n", parray, arraycount, psessioncount);
513 if (psessioncount) *psessioncount = 0;
514 return ERROR_SUCCESS;
517 /******************************************************************************
518 * ReadEventLogA [ADVAPI32.@]
520 * Reads a whole number of entries from an event log.
522 * PARAMS
523 * hEventLog [I] Handle of the event log to read.
524 * dwReadFlags [I] see MSDN doc.
525 * dwRecordOffset [I] Log-entry record number to start at.
526 * lpBuffer [O] Buffer for the data read.
527 * nNumberOfBytesToRead [I] Size of lpBuffer.
528 * pnBytesRead [O] Receives number of bytes read.
529 * pnMinNumberOfBytesNeeded [O] Receives number of bytes required for the
530 * next log entry.
532 * RETURNS
533 * Success: nonzero
534 * Failure: zero
536 BOOL WINAPI ReadEventLogA( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
537 LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
539 FIXME("(%p,0x%08x,0x%08x,%p,0x%08x,%p,%p) stub\n", hEventLog, dwReadFlags,
540 dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
541 return FALSE;
544 /******************************************************************************
545 * ReadEventLogW [ADVAPI32.@]
547 * See ReadEventLogA.
549 BOOL WINAPI ReadEventLogW( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
550 LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
552 FIXME("(%p,0x%08x,0x%08x,%p,0x%08x,%p,%p) stub\n", hEventLog, dwReadFlags,
553 dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
554 return FALSE;
557 /******************************************************************************
558 * RegisterEventSourceA [ADVAPI32.@]
560 * Returns a registered handle to an event log.
562 * PARAMS
563 * lpUNCServerName [I] UNC name of the source server.
564 * lpSourceName [I] Specifies the name of the event source to retrieve.
566 * RETURNS
567 * Success: Handle to the event log.
568 * Failure: NULL. Returns ERROR_INVALID_HANDLE if lpSourceName specifies the
569 * Security event log.
571 HANDLE WINAPI RegisterEventSourceA( LPCSTR lpUNCServerName, LPCSTR lpSourceName )
573 UNICODE_STRING lpUNCServerNameW;
574 UNICODE_STRING lpSourceNameW;
575 HANDLE ret;
577 FIXME("(%s,%s): stub\n", debugstr_a(lpUNCServerName), debugstr_a(lpSourceName));
579 RtlCreateUnicodeStringFromAsciiz(&lpUNCServerNameW, lpUNCServerName);
580 RtlCreateUnicodeStringFromAsciiz(&lpSourceNameW, lpSourceName);
581 ret = RegisterEventSourceW(lpUNCServerNameW.Buffer,lpSourceNameW.Buffer);
582 RtlFreeUnicodeString (&lpUNCServerNameW);
583 RtlFreeUnicodeString (&lpSourceNameW);
584 return ret;
587 /******************************************************************************
588 * RegisterEventSourceW [ADVAPI32.@]
590 * See RegisterEventSourceA.
592 HANDLE WINAPI RegisterEventSourceW( LPCWSTR lpUNCServerName, LPCWSTR lpSourceName )
594 FIXME("(%s,%s): stub\n", debugstr_w(lpUNCServerName), debugstr_w(lpSourceName));
595 return (HANDLE)0xcafe4242;
598 /******************************************************************************
599 * ReportEventA [ADVAPI32.@]
601 * Writes an entry at the end of an event log.
603 * PARAMS
604 * hEventLog [I] Handle of an event log.
605 * wType [I] See MSDN doc.
606 * wCategory [I] Event category.
607 * dwEventID [I] Event identifier.
608 * lpUserSid [I] Current user's security identifier.
609 * wNumStrings [I] Number of insert strings in lpStrings.
610 * dwDataSize [I] Size of event-specific raw data to write.
611 * lpStrings [I] Buffer containing an array of string to be merged.
612 * lpRawData [I] Buffer containing the binary data.
614 * RETURNS
615 * Success: nonzero. Entry was written to the log.
616 * Failure: zero.
618 * NOTES
619 * The ReportEvent function adds the time, the entry's length, and the
620 * offsets before storing the entry in the log. If lpUserSid != NULL, the
621 * username is also logged.
623 BOOL WINAPI ReportEventA ( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
624 PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCSTR *lpStrings, LPVOID lpRawData)
626 LPWSTR *wideStrArray;
627 UNICODE_STRING str;
628 int i;
629 BOOL ret;
631 FIXME("(%p,0x%04x,0x%04x,0x%08x,%p,0x%04x,0x%08x,%p,%p): stub\n", hEventLog,
632 wType, wCategory, dwEventID, lpUserSid, wNumStrings, dwDataSize, lpStrings, lpRawData);
634 if (wNumStrings == 0) return TRUE;
635 if (!lpStrings) return TRUE;
637 wideStrArray = HeapAlloc(GetProcessHeap(), 0, sizeof(LPWSTR) * wNumStrings);
638 for (i = 0; i < wNumStrings; i++)
640 RtlCreateUnicodeStringFromAsciiz(&str, lpStrings[i]);
641 wideStrArray[i] = str.Buffer;
643 ret = ReportEventW(hEventLog, wType, wCategory, dwEventID, lpUserSid,
644 wNumStrings, dwDataSize, (LPCWSTR *)wideStrArray, lpRawData);
645 for (i = 0; i < wNumStrings; i++)
647 HeapFree( GetProcessHeap(), 0, wideStrArray[i] );
649 HeapFree(GetProcessHeap(), 0, wideStrArray);
650 return ret;
653 /******************************************************************************
654 * ReportEventW [ADVAPI32.@]
656 * See ReportEventA.
658 BOOL WINAPI ReportEventW( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
659 PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCWSTR *lpStrings, LPVOID lpRawData )
661 int i;
663 FIXME("(%p,0x%04x,0x%04x,0x%08x,%p,0x%04x,0x%08x,%p,%p): stub\n", hEventLog,
664 wType, wCategory, dwEventID, lpUserSid, wNumStrings, dwDataSize, lpStrings, lpRawData);
666 /* partial stub */
668 if (wNumStrings == 0) return TRUE;
669 if (!lpStrings) return TRUE;
671 for (i = 0; i < wNumStrings; i++)
673 switch (wType)
675 case EVENTLOG_SUCCESS:
676 TRACE_(eventlog)("%s\n", debugstr_w(lpStrings[i]));
677 break;
678 case EVENTLOG_ERROR_TYPE:
679 ERR_(eventlog)("%s\n", debugstr_w(lpStrings[i]));
680 break;
681 case EVENTLOG_WARNING_TYPE:
682 WARN_(eventlog)("%s\n", debugstr_w(lpStrings[i]));
683 break;
684 default:
685 TRACE_(eventlog)("%s\n", debugstr_w(lpStrings[i]));
686 break;
689 return TRUE;
692 /******************************************************************************
693 * RegisterTraceGuidsW [ADVAPI32.@]
695 * Register an event trace provider and the event trace classes that it uses
696 * to generate events.
698 * PARAMS
699 * RequestAddress [I] ControlCallback function
700 * RequestContext [I] Optional provider-defined context
701 * ControlGuid [I] GUID of the registering provider
702 * GuidCount [I] Number of elements in the TraceGuidReg array
703 * TraceGuidReg [I/O] Array of TRACE_GUID_REGISTRATION structures
704 * MofImagePath [I] not supported, set to NULL
705 * MofResourceNmae [I] not supported, set to NULL
706 * RegistrationHandle [O] Provider's registration handle
708 * RETURNS
709 * Success: ERROR_SUCCESS
710 * Failure: System error code
712 * FIXME
713 * Stub.
715 ULONG WINAPI RegisterTraceGuidsW( WMIDPREQUEST RequestAddress,
716 PVOID RequestContext, LPCGUID ControlGuid, ULONG GuidCount,
717 PTRACE_GUID_REGISTRATION TraceGuidReg, LPCWSTR MofImagePath,
718 LPCWSTR MofResourceName, PTRACEHANDLE RegistrationHandle )
720 FIXME("(%p, %p, %s, %u, %p, %s, %s, %p,)\n", RequestAddress, RequestContext,
721 debugstr_guid(ControlGuid), GuidCount, TraceGuidReg, debugstr_w(MofImagePath),
722 debugstr_w(MofResourceName), RegistrationHandle);
723 return ERROR_CALL_NOT_IMPLEMENTED;
726 /******************************************************************************
727 * RegisterTraceGuidsA [ADVAPI32.@]
729 * See RegisterTraceGuidsW.
731 * FIXME
732 * Stub.
734 ULONG WINAPI RegisterTraceGuidsA( WMIDPREQUEST RequestAddress,
735 PVOID RequestContext, LPCGUID ControlGuid, ULONG GuidCount,
736 PTRACE_GUID_REGISTRATION TraceGuidReg, LPCSTR MofImagePath,
737 LPCSTR MofResourceName, PTRACEHANDLE RegistrationHandle )
739 FIXME("(%p, %p, %s, %u, %p, %s, %s, %p,)\n", RequestAddress, RequestContext,
740 debugstr_guid(ControlGuid), GuidCount, TraceGuidReg, debugstr_a(MofImagePath),
741 debugstr_a(MofResourceName), RegistrationHandle);
742 return ERROR_CALL_NOT_IMPLEMENTED;
745 /******************************************************************************
746 * StartTraceW [ADVAPI32.@]
748 * Register and start an event trace session
751 ULONG WINAPI StartTraceW( PTRACEHANDLE pSessionHandle, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
753 FIXME("(%p, %s, %p) stub\n", pSessionHandle, debugstr_w(SessionName), Properties);
754 if (pSessionHandle) *pSessionHandle = 0xcafe4242;
755 return ERROR_SUCCESS;
758 /******************************************************************************
759 * StartTraceA [ADVAPI32.@]
761 * See StartTraceW.
764 ULONG WINAPI StartTraceA( PTRACEHANDLE pSessionHandle, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
766 FIXME("(%p, %s, %p) stub\n", pSessionHandle, debugstr_a(SessionName), Properties);
767 if (pSessionHandle) *pSessionHandle = 0xcafe4242;
768 return ERROR_SUCCESS;
771 /******************************************************************************
772 * TraceEvent [ADVAPI32.@]
774 ULONG WINAPI TraceEvent( TRACEHANDLE SessionHandle, PEVENT_TRACE_HEADER EventTrace )
776 FIXME("%s %p\n", wine_dbgstr_longlong(SessionHandle), EventTrace);
777 return ERROR_CALL_NOT_IMPLEMENTED;
780 /******************************************************************************
781 * UnregisterTraceGuids [ADVAPI32.@]
783 * See RegisterTraceGuids
785 * FIXME
786 * Stub.
788 ULONG WINAPI UnregisterTraceGuids( TRACEHANDLE RegistrationHandle )
790 FIXME("%s: stub\n", wine_dbgstr_longlong(RegistrationHandle));
791 return ERROR_CALL_NOT_IMPLEMENTED;