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 WINE_DEFAULT_DEBUG_CHANNEL(advapi
);
37 WINE_DECLARE_DEBUG_CHANNEL(eventlog
);
39 static inline LPWSTR
SERV_dup( LPCSTR str
)
46 len
= MultiByteToWideChar( CP_ACP
, 0, str
, -1, NULL
, 0 );
47 wstr
= HeapAlloc( GetProcessHeap(), 0, len
*sizeof (WCHAR
) );
48 MultiByteToWideChar( CP_ACP
, 0, str
, -1, wstr
, len
);
52 /******************************************************************************
53 * BackupEventLogA [ADVAPI32.@]
55 * Saves the event log to a backup file.
58 * hEventLog [I] Handle to event log to backup.
59 * lpBackupFileName [I] Name of the backup file.
62 * Success: nonzero. File lpBackupFileName will contain the contents of
66 BOOL WINAPI
BackupEventLogA( HANDLE hEventLog
, LPCSTR lpBackupFileName
)
71 backupW
= SERV_dup(lpBackupFileName
);
72 ret
= BackupEventLogW(hEventLog
, backupW
);
73 HeapFree(GetProcessHeap(), 0, backupW
);
78 /******************************************************************************
79 * BackupEventLogW [ADVAPI32.@]
81 * See BackupEventLogA.
83 BOOL WINAPI
BackupEventLogW( HANDLE hEventLog
, LPCWSTR lpBackupFileName
)
85 FIXME("(%p,%s) stub\n", hEventLog
, debugstr_w(lpBackupFileName
));
87 if (!lpBackupFileName
)
89 SetLastError(ERROR_INVALID_PARAMETER
);
95 SetLastError(ERROR_INVALID_HANDLE
);
99 if (GetFileAttributesW(lpBackupFileName
) != INVALID_FILE_ATTRIBUTES
)
101 SetLastError(ERROR_ALREADY_EXISTS
);
108 /******************************************************************************
109 * ClearEventLogA [ADVAPI32.@]
111 * Clears the event log and optionally saves the log to a backup file.
114 * hEvenLog [I] Handle to event log to clear.
115 * lpBackupFileName [I] Name of the backup file.
118 * Success: nonzero. if lpBackupFileName != NULL, lpBackupFileName will
119 * contain the contents of hEvenLog and the log will be cleared.
120 * Failure: zero. Fails if the event log is empty or if lpBackupFileName
123 BOOL WINAPI
ClearEventLogA( HANDLE hEventLog
, LPCSTR lpBackupFileName
)
128 backupW
= SERV_dup(lpBackupFileName
);
129 ret
= ClearEventLogW(hEventLog
, backupW
);
130 HeapFree(GetProcessHeap(), 0, backupW
);
135 /******************************************************************************
136 * ClearEventLogW [ADVAPI32.@]
138 * See ClearEventLogA.
140 BOOL WINAPI
ClearEventLogW( HANDLE hEventLog
, LPCWSTR lpBackupFileName
)
142 FIXME("(%p,%s) stub\n", hEventLog
, debugstr_w(lpBackupFileName
));
146 SetLastError(ERROR_INVALID_HANDLE
);
153 /******************************************************************************
154 * CloseEventLog [ADVAPI32.@]
156 * Closes a read handle to the event log.
159 * hEventLog [I/O] Handle of the event log to close.
165 BOOL WINAPI
CloseEventLog( HANDLE hEventLog
)
167 FIXME("(%p) stub\n", hEventLog
);
171 SetLastError(ERROR_INVALID_HANDLE
);
178 /******************************************************************************
179 * ControlTraceW [ADVAPI32.@]
181 * Control a givel event trace session
184 ULONG WINAPI
ControlTraceW( TRACEHANDLE hSession
, LPCWSTR SessionName
, PEVENT_TRACE_PROPERTIES Properties
, ULONG control
)
186 FIXME("(%s, %s, %p, %d) stub\n", wine_dbgstr_longlong(hSession
), debugstr_w(SessionName
), Properties
, control
);
187 return ERROR_SUCCESS
;
190 /******************************************************************************
191 * ControlTraceA [ADVAPI32.@]
196 ULONG WINAPI
ControlTraceA( TRACEHANDLE hSession
, LPCSTR SessionName
, PEVENT_TRACE_PROPERTIES Properties
, ULONG control
)
198 FIXME("(%s, %s, %p, %d) stub\n", wine_dbgstr_longlong(hSession
), debugstr_a(SessionName
), Properties
, control
);
199 return ERROR_SUCCESS
;
202 /******************************************************************************
203 * FlushTraceA [ADVAPI32.@]
205 ULONG WINAPI
FlushTraceA ( TRACEHANDLE hSession
, LPCSTR SessionName
, PEVENT_TRACE_PROPERTIES Properties
)
207 return ControlTraceA( hSession
, SessionName
, Properties
, EVENT_TRACE_CONTROL_FLUSH
);
210 /******************************************************************************
211 * FlushTraceW [ADVAPI32.@]
213 ULONG WINAPI
FlushTraceW ( TRACEHANDLE hSession
, LPCWSTR SessionName
, PEVENT_TRACE_PROPERTIES Properties
)
215 return ControlTraceW( hSession
, SessionName
, Properties
, EVENT_TRACE_CONTROL_FLUSH
);
219 /******************************************************************************
220 * DeregisterEventSource [ADVAPI32.@]
222 * Closes a write handle to an event log
225 * hEventLog [I/O] Handle of the event log.
231 BOOL WINAPI
DeregisterEventSource( HANDLE hEventLog
)
233 FIXME("(%p) stub\n", hEventLog
);
237 /******************************************************************************
238 * EnableTraceEx [ADVAPI32.@]
240 ULONG WINAPI
EnableTraceEx( LPCGUID provider
, LPCGUID source
, TRACEHANDLE hSession
, ULONG enable
,
241 UCHAR level
, ULONGLONG anykeyword
, ULONGLONG allkeyword
, ULONG enableprop
,
242 PEVENT_FILTER_DESCRIPTOR filterdesc
)
244 FIXME("(%s, %s, %s, %d, %c, %s, %s, %d, %p): stub\n", debugstr_guid(provider
),
245 debugstr_guid(source
), wine_dbgstr_longlong(hSession
), enable
, level
,
246 wine_dbgstr_longlong(anykeyword
), wine_dbgstr_longlong(allkeyword
),
247 enableprop
, filterdesc
);
249 return ERROR_SUCCESS
;
252 /******************************************************************************
253 * EnableTrace [ADVAPI32.@]
255 ULONG WINAPI
EnableTrace( ULONG enable
, ULONG flag
, ULONG level
, LPCGUID guid
, TRACEHANDLE hSession
)
257 FIXME("(%d, 0x%x, %d, %s, %s): stub\n", enable
, flag
, level
,
258 debugstr_guid(guid
), wine_dbgstr_longlong(hSession
));
260 return ERROR_SUCCESS
;
263 /******************************************************************************
264 * GetEventLogInformation [ADVAPI32.@]
266 * Retrieve some information about an event log.
269 * hEventLog [I] Handle to an open event log.
270 * dwInfoLevel [I] Level of information (only EVENTLOG_FULL_INFO)
271 * lpBuffer [I/O] The buffer for the returned information
272 * cbBufSize [I] The size of the buffer
273 * pcbBytesNeeded [O] The needed bytes to hold the information
276 * Success: TRUE. lpBuffer will hold the information and pcbBytesNeeded shows
277 * the needed buffer size.
280 BOOL WINAPI
GetEventLogInformation( HANDLE hEventLog
, DWORD dwInfoLevel
, LPVOID lpBuffer
, DWORD cbBufSize
, LPDWORD pcbBytesNeeded
)
282 EVENTLOG_FULL_INFORMATION
*efi
;
284 FIXME("(%p, %d, %p, %d, %p) stub\n", hEventLog
, dwInfoLevel
, lpBuffer
, cbBufSize
, pcbBytesNeeded
);
286 if (dwInfoLevel
!= EVENTLOG_FULL_INFO
)
288 SetLastError(ERROR_INVALID_LEVEL
);
294 SetLastError(ERROR_INVALID_HANDLE
);
298 if (!lpBuffer
|| !pcbBytesNeeded
)
300 /* FIXME: This will be handled properly when eventlog is moved
303 SetLastError(RPC_X_NULL_REF_POINTER
);
307 *pcbBytesNeeded
= sizeof(EVENTLOG_FULL_INFORMATION
);
308 if (cbBufSize
< sizeof(EVENTLOG_FULL_INFORMATION
))
310 SetLastError(ERROR_INSUFFICIENT_BUFFER
);
314 /* Pretend the log is not full */
315 efi
= (EVENTLOG_FULL_INFORMATION
*)lpBuffer
;
321 /******************************************************************************
322 * GetNumberOfEventLogRecords [ADVAPI32.@]
324 * Retrieves the number of records in an event log.
327 * hEventLog [I] Handle to an open event log.
328 * NumberOfRecords [O] Number of records in the log.
331 * Success: nonzero. NumberOfRecords will contain the number of records in
335 BOOL WINAPI
GetNumberOfEventLogRecords( HANDLE hEventLog
, PDWORD NumberOfRecords
)
337 FIXME("(%p,%p) stub\n", hEventLog
, NumberOfRecords
);
339 if (!NumberOfRecords
)
341 SetLastError(ERROR_INVALID_PARAMETER
);
347 SetLastError(ERROR_INVALID_HANDLE
);
351 *NumberOfRecords
= 0;
356 /******************************************************************************
357 * GetOldestEventLogRecord [ADVAPI32.@]
359 * Retrieves the absolute record number of the oldest record in an even log.
362 * hEventLog [I] Handle to an open event log.
363 * OldestRecord [O] Absolute record number of the oldest record.
366 * Success: nonzero. OldestRecord contains the record number of the oldest
370 BOOL WINAPI
GetOldestEventLogRecord( HANDLE hEventLog
, PDWORD OldestRecord
)
372 FIXME("(%p,%p) stub\n", hEventLog
, OldestRecord
);
376 SetLastError(ERROR_INVALID_PARAMETER
);
382 SetLastError(ERROR_INVALID_HANDLE
);
391 /******************************************************************************
392 * NotifyChangeEventLog [ADVAPI32.@]
394 * Enables an application to receive notification when an event is written
398 * hEventLog [I] Handle to an event log.
399 * hEvent [I] Handle to a manual-reset event object.
405 BOOL WINAPI
NotifyChangeEventLog( HANDLE hEventLog
, HANDLE hEvent
)
407 FIXME("(%p,%p) stub\n", hEventLog
, hEvent
);
411 /******************************************************************************
412 * OpenBackupEventLogA [ADVAPI32.@]
414 * Opens a handle to a backup event log.
417 * lpUNCServerName [I] Universal Naming Convention name of the server on which
418 * this will be performed.
419 * lpFileName [I] Specifies the name of the backup file.
422 * Success: Handle to the backup event log.
425 HANDLE WINAPI
OpenBackupEventLogA( LPCSTR lpUNCServerName
, LPCSTR lpFileName
)
427 LPWSTR uncnameW
, filenameW
;
430 uncnameW
= SERV_dup(lpUNCServerName
);
431 filenameW
= SERV_dup(lpFileName
);
432 handle
= OpenBackupEventLogW(uncnameW
, filenameW
);
433 HeapFree(GetProcessHeap(), 0, uncnameW
);
434 HeapFree(GetProcessHeap(), 0, filenameW
);
439 /******************************************************************************
440 * OpenBackupEventLogW [ADVAPI32.@]
442 * See OpenBackupEventLogA.
444 HANDLE WINAPI
OpenBackupEventLogW( LPCWSTR lpUNCServerName
, LPCWSTR lpFileName
)
446 FIXME("(%s,%s) stub\n", debugstr_w(lpUNCServerName
), debugstr_w(lpFileName
));
450 SetLastError(ERROR_INVALID_PARAMETER
);
454 if (lpUNCServerName
&& lpUNCServerName
[0])
456 FIXME("Remote server not supported\n");
457 SetLastError(RPC_S_SERVER_UNAVAILABLE
);
461 if (GetFileAttributesW(lpFileName
) == INVALID_FILE_ATTRIBUTES
)
463 SetLastError(ERROR_FILE_NOT_FOUND
);
467 return (HANDLE
)0xcafe4242;
470 /******************************************************************************
471 * OpenEventLogA [ADVAPI32.@]
473 * Opens a handle to the specified event log.
476 * lpUNCServerName [I] UNC name of the server on which the event log is
478 * lpSourceName [I] Name of the log.
481 * Success: Handle to an event log.
484 HANDLE WINAPI
OpenEventLogA( LPCSTR uncname
, LPCSTR source
)
486 LPWSTR uncnameW
, sourceW
;
489 uncnameW
= SERV_dup(uncname
);
490 sourceW
= SERV_dup(source
);
491 handle
= OpenEventLogW(uncnameW
, sourceW
);
492 HeapFree(GetProcessHeap(), 0, uncnameW
);
493 HeapFree(GetProcessHeap(), 0, sourceW
);
498 /******************************************************************************
499 * OpenEventLogW [ADVAPI32.@]
503 HANDLE WINAPI
OpenEventLogW( LPCWSTR uncname
, LPCWSTR source
)
505 FIXME("(%s,%s) stub\n", debugstr_w(uncname
), debugstr_w(source
));
509 SetLastError(ERROR_INVALID_PARAMETER
);
513 if (uncname
&& uncname
[0])
515 FIXME("Remote server not supported\n");
516 SetLastError(RPC_S_SERVER_UNAVAILABLE
);
520 return (HANDLE
)0xcafe4242;
523 /******************************************************************************
524 * QueryAllTracesW [ADVAPI32.@]
526 * Query information for started event trace sessions
529 ULONG WINAPI
QueryAllTracesW( PEVENT_TRACE_PROPERTIES
* parray
, ULONG arraycount
, PULONG psessioncount
)
531 FIXME("(%p, %d, %p) stub\n", parray
, arraycount
, psessioncount
);
533 if (psessioncount
) *psessioncount
= 0;
534 return ERROR_SUCCESS
;
537 /******************************************************************************
538 * QueryAllTracesA [ADVAPI32.@]
540 * See QueryAllTracesW.
542 ULONG WINAPI
QueryAllTracesA( PEVENT_TRACE_PROPERTIES
* parray
, ULONG arraycount
, PULONG psessioncount
)
544 FIXME("(%p, %d, %p) stub\n", parray
, arraycount
, psessioncount
);
546 if (psessioncount
) *psessioncount
= 0;
547 return ERROR_SUCCESS
;
550 /******************************************************************************
551 * ReadEventLogA [ADVAPI32.@]
553 * Reads a whole number of entries from an event log.
556 * hEventLog [I] Handle of the event log to read.
557 * dwReadFlags [I] see MSDN doc.
558 * dwRecordOffset [I] Log-entry record number to start at.
559 * lpBuffer [O] Buffer for the data read.
560 * nNumberOfBytesToRead [I] Size of lpBuffer.
561 * pnBytesRead [O] Receives number of bytes read.
562 * pnMinNumberOfBytesNeeded [O] Receives number of bytes required for the
569 BOOL WINAPI
ReadEventLogA( HANDLE hEventLog
, DWORD dwReadFlags
, DWORD dwRecordOffset
,
570 LPVOID lpBuffer
, DWORD nNumberOfBytesToRead
, DWORD
*pnBytesRead
, DWORD
*pnMinNumberOfBytesNeeded
)
572 FIXME("(%p,0x%08x,0x%08x,%p,0x%08x,%p,%p) stub\n", hEventLog
, dwReadFlags
,
573 dwRecordOffset
, lpBuffer
, nNumberOfBytesToRead
, pnBytesRead
, pnMinNumberOfBytesNeeded
);
577 /******************************************************************************
578 * ReadEventLogW [ADVAPI32.@]
582 BOOL WINAPI
ReadEventLogW( HANDLE hEventLog
, DWORD dwReadFlags
, DWORD dwRecordOffset
,
583 LPVOID lpBuffer
, DWORD nNumberOfBytesToRead
, DWORD
*pnBytesRead
, DWORD
*pnMinNumberOfBytesNeeded
)
585 FIXME("(%p,0x%08x,0x%08x,%p,0x%08x,%p,%p) stub\n", hEventLog
, dwReadFlags
,
586 dwRecordOffset
, lpBuffer
, nNumberOfBytesToRead
, pnBytesRead
, pnMinNumberOfBytesNeeded
);
590 /******************************************************************************
591 * RegisterEventSourceA [ADVAPI32.@]
593 * Returns a registered handle to an event log.
596 * lpUNCServerName [I] UNC name of the source server.
597 * lpSourceName [I] Specifies the name of the event source to retrieve.
600 * Success: Handle to the event log.
601 * Failure: NULL. Returns ERROR_INVALID_HANDLE if lpSourceName specifies the
602 * Security event log.
604 HANDLE WINAPI
RegisterEventSourceA( LPCSTR lpUNCServerName
, LPCSTR lpSourceName
)
606 UNICODE_STRING lpUNCServerNameW
;
607 UNICODE_STRING lpSourceNameW
;
610 FIXME("(%s,%s): stub\n", debugstr_a(lpUNCServerName
), debugstr_a(lpSourceName
));
612 RtlCreateUnicodeStringFromAsciiz(&lpUNCServerNameW
, lpUNCServerName
);
613 RtlCreateUnicodeStringFromAsciiz(&lpSourceNameW
, lpSourceName
);
614 ret
= RegisterEventSourceW(lpUNCServerNameW
.Buffer
,lpSourceNameW
.Buffer
);
615 RtlFreeUnicodeString (&lpUNCServerNameW
);
616 RtlFreeUnicodeString (&lpSourceNameW
);
620 /******************************************************************************
621 * RegisterEventSourceW [ADVAPI32.@]
623 * See RegisterEventSourceA.
625 HANDLE WINAPI
RegisterEventSourceW( LPCWSTR lpUNCServerName
, LPCWSTR lpSourceName
)
627 FIXME("(%s,%s): stub\n", debugstr_w(lpUNCServerName
), debugstr_w(lpSourceName
));
628 return (HANDLE
)0xcafe4242;
631 /******************************************************************************
632 * ReportEventA [ADVAPI32.@]
634 * Writes an entry at the end of an event log.
637 * hEventLog [I] Handle of an event log.
638 * wType [I] See MSDN doc.
639 * wCategory [I] Event category.
640 * dwEventID [I] Event identifier.
641 * lpUserSid [I] Current user's security identifier.
642 * wNumStrings [I] Number of insert strings in lpStrings.
643 * dwDataSize [I] Size of event-specific raw data to write.
644 * lpStrings [I] Buffer containing an array of string to be merged.
645 * lpRawData [I] Buffer containing the binary data.
648 * Success: nonzero. Entry was written to the log.
652 * The ReportEvent function adds the time, the entry's length, and the
653 * offsets before storing the entry in the log. If lpUserSid != NULL, the
654 * username is also logged.
656 BOOL WINAPI
ReportEventA ( HANDLE hEventLog
, WORD wType
, WORD wCategory
, DWORD dwEventID
,
657 PSID lpUserSid
, WORD wNumStrings
, DWORD dwDataSize
, LPCSTR
*lpStrings
, LPVOID lpRawData
)
659 LPWSTR
*wideStrArray
;
664 FIXME("(%p,0x%04x,0x%04x,0x%08x,%p,0x%04x,0x%08x,%p,%p): stub\n", hEventLog
,
665 wType
, wCategory
, dwEventID
, lpUserSid
, wNumStrings
, dwDataSize
, lpStrings
, lpRawData
);
667 if (wNumStrings
== 0) return TRUE
;
668 if (!lpStrings
) return TRUE
;
670 wideStrArray
= HeapAlloc(GetProcessHeap(), 0, sizeof(LPWSTR
) * wNumStrings
);
671 for (i
= 0; i
< wNumStrings
; i
++)
673 RtlCreateUnicodeStringFromAsciiz(&str
, lpStrings
[i
]);
674 wideStrArray
[i
] = str
.Buffer
;
676 ret
= ReportEventW(hEventLog
, wType
, wCategory
, dwEventID
, lpUserSid
,
677 wNumStrings
, dwDataSize
, (LPCWSTR
*)wideStrArray
, lpRawData
);
678 for (i
= 0; i
< wNumStrings
; i
++)
680 HeapFree( GetProcessHeap(), 0, wideStrArray
[i
] );
682 HeapFree(GetProcessHeap(), 0, wideStrArray
);
686 /******************************************************************************
687 * ReportEventW [ADVAPI32.@]
691 BOOL WINAPI
ReportEventW( HANDLE hEventLog
, WORD wType
, WORD wCategory
, DWORD dwEventID
,
692 PSID lpUserSid
, WORD wNumStrings
, DWORD dwDataSize
, LPCWSTR
*lpStrings
, LPVOID lpRawData
)
696 FIXME("(%p,0x%04x,0x%04x,0x%08x,%p,0x%04x,0x%08x,%p,%p): stub\n", hEventLog
,
697 wType
, wCategory
, dwEventID
, lpUserSid
, wNumStrings
, dwDataSize
, lpStrings
, lpRawData
);
701 if (wNumStrings
== 0) return TRUE
;
702 if (!lpStrings
) return TRUE
;
704 for (i
= 0; i
< wNumStrings
; i
++)
708 case EVENTLOG_SUCCESS
:
709 TRACE_(eventlog
)("%s\n", debugstr_w(lpStrings
[i
]));
711 case EVENTLOG_ERROR_TYPE
:
712 ERR_(eventlog
)("%s\n", debugstr_w(lpStrings
[i
]));
714 case EVENTLOG_WARNING_TYPE
:
715 WARN_(eventlog
)("%s\n", debugstr_w(lpStrings
[i
]));
718 TRACE_(eventlog
)("%s\n", debugstr_w(lpStrings
[i
]));
725 /******************************************************************************
726 * RegisterTraceGuidsW [ADVAPI32.@]
728 * Register an event trace provider and the event trace classes that it uses
729 * to generate events.
732 * RequestAddress [I] ControlCallback function
733 * RequestContext [I] Optional provider-defined context
734 * ControlGuid [I] GUID of the registering provider
735 * GuidCount [I] Number of elements in the TraceGuidReg array
736 * TraceGuidReg [I/O] Array of TRACE_GUID_REGISTRATION structures
737 * MofImagePath [I] not supported, set to NULL
738 * MofResourceNmae [I] not supported, set to NULL
739 * RegistrationHandle [O] Provider's registration handle
742 * Success: ERROR_SUCCESS
743 * Failure: System error code
748 ULONG WINAPI
RegisterTraceGuidsW( WMIDPREQUEST RequestAddress
,
749 PVOID RequestContext
, LPCGUID ControlGuid
, ULONG GuidCount
,
750 PTRACE_GUID_REGISTRATION TraceGuidReg
, LPCWSTR MofImagePath
,
751 LPCWSTR MofResourceName
, PTRACEHANDLE RegistrationHandle
)
753 FIXME("(%p, %p, %s, %u, %p, %s, %s, %p,)\n", RequestAddress
, RequestContext
,
754 debugstr_guid(ControlGuid
), GuidCount
, TraceGuidReg
, debugstr_w(MofImagePath
),
755 debugstr_w(MofResourceName
), RegistrationHandle
);
756 return ERROR_CALL_NOT_IMPLEMENTED
;
759 /******************************************************************************
760 * RegisterTraceGuidsA [ADVAPI32.@]
762 * See RegisterTraceGuidsW.
767 ULONG WINAPI
RegisterTraceGuidsA( WMIDPREQUEST RequestAddress
,
768 PVOID RequestContext
, LPCGUID ControlGuid
, ULONG GuidCount
,
769 PTRACE_GUID_REGISTRATION TraceGuidReg
, LPCSTR MofImagePath
,
770 LPCSTR MofResourceName
, PTRACEHANDLE RegistrationHandle
)
772 FIXME("(%p, %p, %s, %u, %p, %s, %s, %p,)\n", RequestAddress
, RequestContext
,
773 debugstr_guid(ControlGuid
), GuidCount
, TraceGuidReg
, debugstr_a(MofImagePath
),
774 debugstr_a(MofResourceName
), RegistrationHandle
);
775 return ERROR_CALL_NOT_IMPLEMENTED
;
778 /******************************************************************************
779 * StartTraceW [ADVAPI32.@]
781 * Register and start an event trace session
784 ULONG WINAPI
StartTraceW( PTRACEHANDLE pSessionHandle
, LPCWSTR SessionName
, PEVENT_TRACE_PROPERTIES Properties
)
786 FIXME("(%p, %s, %p) stub\n", pSessionHandle
, debugstr_w(SessionName
), Properties
);
787 if (pSessionHandle
) *pSessionHandle
= 0xcafe4242;
788 return ERROR_SUCCESS
;
791 /******************************************************************************
792 * StartTraceA [ADVAPI32.@]
797 ULONG WINAPI
StartTraceA( PTRACEHANDLE pSessionHandle
, LPCSTR SessionName
, PEVENT_TRACE_PROPERTIES Properties
)
799 FIXME("(%p, %s, %p) stub\n", pSessionHandle
, debugstr_a(SessionName
), Properties
);
800 if (pSessionHandle
) *pSessionHandle
= 0xcafe4242;
801 return ERROR_SUCCESS
;
804 /******************************************************************************
805 * TraceEvent [ADVAPI32.@]
807 ULONG WINAPI
TraceEvent( TRACEHANDLE SessionHandle
, PEVENT_TRACE_HEADER EventTrace
)
809 FIXME("%s %p\n", wine_dbgstr_longlong(SessionHandle
), EventTrace
);
810 return ERROR_CALL_NOT_IMPLEMENTED
;
813 /******************************************************************************
814 * UnregisterTraceGuids [ADVAPI32.@]
816 * See RegisterTraceGuids
821 ULONG WINAPI
UnregisterTraceGuids( TRACEHANDLE RegistrationHandle
)
823 FIXME("%s: stub\n", wine_dbgstr_longlong(RegistrationHandle
));
824 return ERROR_CALL_NOT_IMPLEMENTED
;
827 /******************************************************************************
828 * EventRegister [ADVAPI32.@]
830 ULONG WINAPI
EventRegister( LPCGUID provider
, PENABLECALLBACK callback
, PVOID context
, PREGHANDLE handle
)
832 FIXME("%s, %p, %p, %p\n", debugstr_guid(provider
), callback
, context
, handle
);
833 return ERROR_CALL_NOT_IMPLEMENTED
;
836 /******************************************************************************
837 * EventEnabled [ADVAPI32.@]
840 BOOLEAN WINAPI
EventEnabled( REGHANDLE handle
, PCEVENT_DESCRIPTOR descriptor
)
842 FIXME("(%s, %p): stub\n", wine_dbgstr_longlong(handle
), descriptor
);
846 /******************************************************************************
847 * QueryTraceW [ADVAPI32.@]
849 ULONG WINAPI
QueryTraceW( TRACEHANDLE handle
, LPCWSTR sessionname
, PEVENT_TRACE_PROPERTIES properties
)
851 FIXME("%s %s %p: stub\n", wine_dbgstr_longlong(handle
), debugstr_w(sessionname
), properties
);
852 return ERROR_CALL_NOT_IMPLEMENTED
;