Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wine-mirror
GitHub Repository: wine-mirror/wine
Path: blob/master/dlls/advapi32/eventlog.c
4387 views
1
/*
2
* Win32 advapi functions
3
*
4
* Copyright 1995 Sven Verdoolaege
5
* Copyright 1998 Juergen Schmied
6
* Copyright 2003 Mike Hearn
7
*
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.
12
*
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.
17
*
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
21
*/
22
23
#include <stdarg.h>
24
25
#include "windef.h"
26
#include "winbase.h"
27
#include "winerror.h"
28
#include "winternl.h"
29
#include "wmistr.h"
30
#define _WMI_SOURCE_
31
#include "evntrace.h"
32
#include "evntprov.h"
33
34
#include "wine/debug.h"
35
36
#include "advapi32_misc.h"
37
38
WINE_DEFAULT_DEBUG_CHANNEL(advapi);
39
WINE_DECLARE_DEBUG_CHANNEL(eventlog);
40
41
/******************************************************************************
42
* BackupEventLogA [ADVAPI32.@]
43
*
44
* Saves the event log to a backup file.
45
*
46
* PARAMS
47
* hEventLog [I] Handle to event log to backup.
48
* lpBackupFileName [I] Name of the backup file.
49
*
50
* RETURNS
51
* Success: nonzero. File lpBackupFileName will contain the contents of
52
* hEvenLog.
53
* Failure: zero.
54
*/
55
BOOL WINAPI BackupEventLogA( HANDLE hEventLog, LPCSTR lpBackupFileName )
56
{
57
LPWSTR backupW;
58
BOOL ret;
59
60
backupW = strdupAW(lpBackupFileName);
61
ret = BackupEventLogW(hEventLog, backupW);
62
free(backupW);
63
64
return ret;
65
}
66
67
/******************************************************************************
68
* BackupEventLogW [ADVAPI32.@]
69
*
70
* See BackupEventLogA.
71
*/
72
BOOL WINAPI BackupEventLogW( HANDLE hEventLog, LPCWSTR lpBackupFileName )
73
{
74
FIXME("(%p,%s) stub\n", hEventLog, debugstr_w(lpBackupFileName));
75
76
if (!lpBackupFileName)
77
{
78
SetLastError(ERROR_INVALID_PARAMETER);
79
return FALSE;
80
}
81
82
if (!hEventLog)
83
{
84
SetLastError(ERROR_INVALID_HANDLE);
85
return FALSE;
86
}
87
88
if (GetFileAttributesW(lpBackupFileName) != INVALID_FILE_ATTRIBUTES)
89
{
90
SetLastError(ERROR_ALREADY_EXISTS);
91
return FALSE;
92
}
93
94
return TRUE;
95
}
96
97
/******************************************************************************
98
* ClearEventLogA [ADVAPI32.@]
99
*
100
* Clears the event log and optionally saves the log to a backup file.
101
*
102
* PARAMS
103
* hEvenLog [I] Handle to event log to clear.
104
* lpBackupFileName [I] Name of the backup file.
105
*
106
* RETURNS
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
110
* exists.
111
*/
112
BOOL WINAPI ClearEventLogA( HANDLE hEventLog, LPCSTR lpBackupFileName )
113
{
114
LPWSTR backupW;
115
BOOL ret;
116
117
backupW = strdupAW(lpBackupFileName);
118
ret = ClearEventLogW(hEventLog, backupW);
119
free(backupW);
120
121
return ret;
122
}
123
124
/******************************************************************************
125
* ClearEventLogW [ADVAPI32.@]
126
*
127
* See ClearEventLogA.
128
*/
129
BOOL WINAPI ClearEventLogW( HANDLE hEventLog, LPCWSTR lpBackupFileName )
130
{
131
FIXME("(%p,%s) stub\n", hEventLog, debugstr_w(lpBackupFileName));
132
133
if (!hEventLog)
134
{
135
SetLastError(ERROR_INVALID_HANDLE);
136
return FALSE;
137
}
138
139
return TRUE;
140
}
141
142
/******************************************************************************
143
* CloseEventLog [ADVAPI32.@]
144
*
145
* Closes a read handle to the event log.
146
*
147
* PARAMS
148
* hEventLog [I/O] Handle of the event log to close.
149
*
150
* RETURNS
151
* Success: nonzero
152
* Failure: zero
153
*/
154
BOOL WINAPI CloseEventLog( HANDLE hEventLog )
155
{
156
FIXME("(%p) stub\n", hEventLog);
157
158
if (!hEventLog)
159
{
160
SetLastError(ERROR_INVALID_HANDLE);
161
return FALSE;
162
}
163
164
return TRUE;
165
}
166
167
/******************************************************************************
168
* FlushTraceA [ADVAPI32.@]
169
*/
170
ULONG WINAPI FlushTraceA ( TRACEHANDLE hSession, LPCSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
171
{
172
return ControlTraceA( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_FLUSH );
173
}
174
175
/******************************************************************************
176
* FlushTraceW [ADVAPI32.@]
177
*/
178
ULONG WINAPI FlushTraceW ( TRACEHANDLE hSession, LPCWSTR SessionName, PEVENT_TRACE_PROPERTIES Properties )
179
{
180
return ControlTraceW( hSession, SessionName, Properties, EVENT_TRACE_CONTROL_FLUSH );
181
}
182
183
184
/******************************************************************************
185
* DeregisterEventSource [ADVAPI32.@]
186
*
187
* Closes a write handle to an event log
188
*
189
* PARAMS
190
* hEventLog [I/O] Handle of the event log.
191
*
192
* RETURNS
193
* Success: nonzero
194
* Failure: zero
195
*/
196
BOOL WINAPI DeregisterEventSource( HANDLE hEventLog )
197
{
198
FIXME("(%p) stub\n", hEventLog);
199
return TRUE;
200
}
201
202
/******************************************************************************
203
* EnableTraceEx [ADVAPI32.@]
204
*/
205
ULONG WINAPI EnableTraceEx( LPCGUID provider, LPCGUID source, TRACEHANDLE hSession, ULONG enable,
206
UCHAR level, ULONGLONG anykeyword, ULONGLONG allkeyword, ULONG enableprop,
207
PEVENT_FILTER_DESCRIPTOR filterdesc )
208
{
209
FIXME("(%s, %s, %s, %lu, %u, %s, %s, %lu, %p): stub\n", debugstr_guid(provider),
210
debugstr_guid(source), wine_dbgstr_longlong(hSession), enable, level,
211
wine_dbgstr_longlong(anykeyword), wine_dbgstr_longlong(allkeyword),
212
enableprop, filterdesc);
213
214
return ERROR_SUCCESS;
215
}
216
217
/******************************************************************************
218
* EnableTrace [ADVAPI32.@]
219
*/
220
ULONG WINAPI EnableTrace( ULONG enable, ULONG flag, ULONG level, LPCGUID guid, TRACEHANDLE hSession )
221
{
222
FIXME("(%ld, 0x%lx, %ld, %s, %s): stub\n", enable, flag, level,
223
debugstr_guid(guid), wine_dbgstr_longlong(hSession));
224
225
return ERROR_SUCCESS;
226
}
227
228
/******************************************************************************
229
* GetEventLogInformation [ADVAPI32.@]
230
*
231
* Retrieve some information about an event log.
232
*
233
* PARAMS
234
* hEventLog [I] Handle to an open event log.
235
* dwInfoLevel [I] Level of information (only EVENTLOG_FULL_INFO)
236
* lpBuffer [I/O] The buffer for the returned information
237
* cbBufSize [I] The size of the buffer
238
* pcbBytesNeeded [O] The needed bytes to hold the information
239
*
240
* RETURNS
241
* Success: TRUE. lpBuffer will hold the information and pcbBytesNeeded shows
242
* the needed buffer size.
243
* Failure: FALSE.
244
*/
245
BOOL WINAPI GetEventLogInformation( HANDLE hEventLog, DWORD dwInfoLevel, LPVOID lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
246
{
247
EVENTLOG_FULL_INFORMATION *efi;
248
249
FIXME("(%p, %ld, %p, %ld, %p) stub\n", hEventLog, dwInfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded);
250
251
if (dwInfoLevel != EVENTLOG_FULL_INFO)
252
{
253
SetLastError(ERROR_INVALID_LEVEL);
254
return FALSE;
255
}
256
257
if (!hEventLog)
258
{
259
SetLastError(ERROR_INVALID_HANDLE);
260
return FALSE;
261
}
262
263
if (!lpBuffer || !pcbBytesNeeded)
264
{
265
/* FIXME: This will be handled properly when eventlog is moved
266
* to a higher level
267
*/
268
SetLastError(RPC_X_NULL_REF_POINTER);
269
return FALSE;
270
}
271
272
*pcbBytesNeeded = sizeof(EVENTLOG_FULL_INFORMATION);
273
if (cbBufSize < sizeof(EVENTLOG_FULL_INFORMATION))
274
{
275
SetLastError(ERROR_INSUFFICIENT_BUFFER);
276
return FALSE;
277
}
278
279
/* Pretend the log is not full */
280
efi = (EVENTLOG_FULL_INFORMATION *)lpBuffer;
281
efi->dwFull = 0;
282
283
return TRUE;
284
}
285
286
/******************************************************************************
287
* GetNumberOfEventLogRecords [ADVAPI32.@]
288
*
289
* Retrieves the number of records in an event log.
290
*
291
* PARAMS
292
* hEventLog [I] Handle to an open event log.
293
* NumberOfRecords [O] Number of records in the log.
294
*
295
* RETURNS
296
* Success: nonzero. NumberOfRecords will contain the number of records in
297
* the log.
298
* Failure: zero
299
*/
300
BOOL WINAPI GetNumberOfEventLogRecords( HANDLE hEventLog, PDWORD NumberOfRecords )
301
{
302
FIXME("(%p,%p) stub\n", hEventLog, NumberOfRecords);
303
304
if (!NumberOfRecords)
305
{
306
SetLastError(ERROR_INVALID_PARAMETER);
307
return FALSE;
308
}
309
310
if (!hEventLog)
311
{
312
SetLastError(ERROR_INVALID_HANDLE);
313
return FALSE;
314
}
315
316
*NumberOfRecords = 0;
317
318
return TRUE;
319
}
320
321
/******************************************************************************
322
* GetOldestEventLogRecord [ADVAPI32.@]
323
*
324
* Retrieves the absolute record number of the oldest record in an even log.
325
*
326
* PARAMS
327
* hEventLog [I] Handle to an open event log.
328
* OldestRecord [O] Absolute record number of the oldest record.
329
*
330
* RETURNS
331
* Success: nonzero. OldestRecord contains the record number of the oldest
332
* record in the log.
333
* Failure: zero
334
*/
335
BOOL WINAPI GetOldestEventLogRecord( HANDLE hEventLog, PDWORD OldestRecord )
336
{
337
FIXME("(%p,%p) stub\n", hEventLog, OldestRecord);
338
339
if (!OldestRecord)
340
{
341
SetLastError(ERROR_INVALID_PARAMETER);
342
return FALSE;
343
}
344
345
if (!hEventLog)
346
{
347
SetLastError(ERROR_INVALID_HANDLE);
348
return FALSE;
349
}
350
351
*OldestRecord = 0;
352
353
return TRUE;
354
}
355
356
/******************************************************************************
357
* NotifyChangeEventLog [ADVAPI32.@]
358
*
359
* Enables an application to receive notification when an event is written
360
* to an event log.
361
*
362
* PARAMS
363
* hEventLog [I] Handle to an event log.
364
* hEvent [I] Handle to a manual-reset event object.
365
*
366
* RETURNS
367
* Success: nonzero
368
* Failure: zero
369
*/
370
BOOL WINAPI NotifyChangeEventLog( HANDLE hEventLog, HANDLE hEvent )
371
{
372
FIXME("(%p,%p) stub\n", hEventLog, hEvent);
373
return TRUE;
374
}
375
376
/******************************************************************************
377
* OpenBackupEventLogA [ADVAPI32.@]
378
*
379
* Opens a handle to a backup event log.
380
*
381
* PARAMS
382
* lpUNCServerName [I] Universal Naming Convention name of the server on which
383
* this will be performed.
384
* lpFileName [I] Specifies the name of the backup file.
385
*
386
* RETURNS
387
* Success: Handle to the backup event log.
388
* Failure: NULL
389
*/
390
HANDLE WINAPI OpenBackupEventLogA( LPCSTR lpUNCServerName, LPCSTR lpFileName )
391
{
392
LPWSTR uncnameW, filenameW;
393
HANDLE handle;
394
395
uncnameW = strdupAW(lpUNCServerName);
396
filenameW = strdupAW(lpFileName);
397
handle = OpenBackupEventLogW(uncnameW, filenameW);
398
free(uncnameW);
399
free(filenameW);
400
401
return handle;
402
}
403
404
/******************************************************************************
405
* OpenBackupEventLogW [ADVAPI32.@]
406
*
407
* See OpenBackupEventLogA.
408
*/
409
HANDLE WINAPI OpenBackupEventLogW( LPCWSTR lpUNCServerName, LPCWSTR lpFileName )
410
{
411
FIXME("(%s,%s) stub\n", debugstr_w(lpUNCServerName), debugstr_w(lpFileName));
412
413
if (!lpFileName)
414
{
415
SetLastError(ERROR_INVALID_PARAMETER);
416
return NULL;
417
}
418
419
if (lpUNCServerName && lpUNCServerName[0])
420
{
421
FIXME("Remote server not supported\n");
422
SetLastError(RPC_S_SERVER_UNAVAILABLE);
423
return NULL;
424
}
425
426
if (GetFileAttributesW(lpFileName) == INVALID_FILE_ATTRIBUTES)
427
{
428
SetLastError(ERROR_FILE_NOT_FOUND);
429
return NULL;
430
}
431
432
return (HANDLE)0xcafe4242;
433
}
434
435
/******************************************************************************
436
* OpenEventLogA [ADVAPI32.@]
437
*
438
* Opens a handle to the specified event log.
439
*
440
* PARAMS
441
* lpUNCServerName [I] UNC name of the server on which the event log is
442
* opened.
443
* lpSourceName [I] Name of the log.
444
*
445
* RETURNS
446
* Success: Handle to an event log.
447
* Failure: NULL
448
*/
449
HANDLE WINAPI OpenEventLogA( LPCSTR uncname, LPCSTR source )
450
{
451
LPWSTR uncnameW, sourceW;
452
HANDLE handle;
453
454
uncnameW = strdupAW(uncname);
455
sourceW = strdupAW(source);
456
handle = OpenEventLogW(uncnameW, sourceW);
457
free(uncnameW);
458
free(sourceW);
459
460
return handle;
461
}
462
463
/******************************************************************************
464
* OpenEventLogW [ADVAPI32.@]
465
*
466
* See OpenEventLogA.
467
*/
468
HANDLE WINAPI OpenEventLogW( LPCWSTR uncname, LPCWSTR source )
469
{
470
FIXME("(%s,%s) stub\n", debugstr_w(uncname), debugstr_w(source));
471
472
if (!source)
473
{
474
SetLastError(ERROR_INVALID_PARAMETER);
475
return NULL;
476
}
477
478
if (uncname && uncname[0])
479
{
480
FIXME("Remote server not supported\n");
481
SetLastError(RPC_S_SERVER_UNAVAILABLE);
482
return NULL;
483
}
484
485
return (HANDLE)0xcafe4242;
486
}
487
488
/******************************************************************************
489
* ReadEventLogA [ADVAPI32.@]
490
*
491
* Reads a whole number of entries from an event log.
492
*
493
* PARAMS
494
* hEventLog [I] Handle of the event log to read.
495
* dwReadFlags [I] see MSDN doc.
496
* dwRecordOffset [I] Log-entry record number to start at.
497
* lpBuffer [O] Buffer for the data read.
498
* nNumberOfBytesToRead [I] Size of lpBuffer.
499
* pnBytesRead [O] Receives number of bytes read.
500
* pnMinNumberOfBytesNeeded [O] Receives number of bytes required for the
501
* next log entry.
502
*
503
* RETURNS
504
* Success: nonzero
505
* Failure: zero
506
*/
507
BOOL WINAPI ReadEventLogA( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
508
LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
509
{
510
FIXME("(%p,0x%08lx,0x%08lx,%p,0x%08lx,%p,%p) stub\n", hEventLog, dwReadFlags,
511
dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
512
513
SetLastError(ERROR_HANDLE_EOF);
514
return FALSE;
515
}
516
517
/******************************************************************************
518
* ReadEventLogW [ADVAPI32.@]
519
*
520
* See ReadEventLogA.
521
*/
522
BOOL WINAPI ReadEventLogW( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
523
LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
524
{
525
FIXME("(%p,0x%08lx,0x%08lx,%p,0x%08lx,%p,%p) stub\n", hEventLog, dwReadFlags,
526
dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
527
528
SetLastError(ERROR_HANDLE_EOF);
529
return FALSE;
530
}
531
532
/******************************************************************************
533
* RegisterEventSourceA [ADVAPI32.@]
534
*
535
* Returns a registered handle to an event log.
536
*
537
* PARAMS
538
* lpUNCServerName [I] UNC name of the source server.
539
* lpSourceName [I] Specifies the name of the event source to retrieve.
540
*
541
* RETURNS
542
* Success: Handle to the event log.
543
* Failure: NULL. Returns ERROR_INVALID_HANDLE if lpSourceName specifies the
544
* Security event log.
545
*/
546
HANDLE WINAPI RegisterEventSourceA( LPCSTR lpUNCServerName, LPCSTR lpSourceName )
547
{
548
UNICODE_STRING lpUNCServerNameW;
549
UNICODE_STRING lpSourceNameW;
550
HANDLE ret;
551
552
FIXME("(%s,%s): stub\n", debugstr_a(lpUNCServerName), debugstr_a(lpSourceName));
553
554
RtlCreateUnicodeStringFromAsciiz(&lpUNCServerNameW, lpUNCServerName);
555
RtlCreateUnicodeStringFromAsciiz(&lpSourceNameW, lpSourceName);
556
ret = RegisterEventSourceW(lpUNCServerNameW.Buffer,lpSourceNameW.Buffer);
557
RtlFreeUnicodeString (&lpUNCServerNameW);
558
RtlFreeUnicodeString (&lpSourceNameW);
559
return ret;
560
}
561
562
/******************************************************************************
563
* RegisterEventSourceW [ADVAPI32.@]
564
*
565
* See RegisterEventSourceA.
566
*/
567
HANDLE WINAPI RegisterEventSourceW( LPCWSTR lpUNCServerName, LPCWSTR lpSourceName )
568
{
569
FIXME("(%s,%s): stub\n", debugstr_w(lpUNCServerName), debugstr_w(lpSourceName));
570
return (HANDLE)0xcafe4242;
571
}
572
573
/******************************************************************************
574
* ReportEventA [ADVAPI32.@]
575
*
576
* Writes an entry at the end of an event log.
577
*
578
* PARAMS
579
* hEventLog [I] Handle of an event log.
580
* wType [I] See MSDN doc.
581
* wCategory [I] Event category.
582
* dwEventID [I] Event identifier.
583
* lpUserSid [I] Current user's security identifier.
584
* wNumStrings [I] Number of insert strings in lpStrings.
585
* dwDataSize [I] Size of event-specific raw data to write.
586
* lpStrings [I] Buffer containing an array of string to be merged.
587
* lpRawData [I] Buffer containing the binary data.
588
*
589
* RETURNS
590
* Success: nonzero. Entry was written to the log.
591
* Failure: zero.
592
*
593
* NOTES
594
* The ReportEvent function adds the time, the entry's length, and the
595
* offsets before storing the entry in the log. If lpUserSid != NULL, the
596
* username is also logged.
597
*/
598
BOOL WINAPI ReportEventA ( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
599
PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCSTR *lpStrings, LPVOID lpRawData)
600
{
601
LPWSTR *wideStrArray;
602
UNICODE_STRING str;
603
UINT i;
604
BOOL ret;
605
606
FIXME("(%p,0x%04x,0x%04x,0x%08lx,%p,0x%04x,0x%08lx,%p,%p): stub\n", hEventLog,
607
wType, wCategory, dwEventID, lpUserSid, wNumStrings, dwDataSize, lpStrings, lpRawData);
608
609
if (wNumStrings == 0) return TRUE;
610
if (!lpStrings) return TRUE;
611
612
wideStrArray = malloc(sizeof(WCHAR *) * wNumStrings);
613
for (i = 0; i < wNumStrings; i++)
614
{
615
RtlCreateUnicodeStringFromAsciiz(&str, lpStrings[i]);
616
wideStrArray[i] = str.Buffer;
617
}
618
ret = ReportEventW(hEventLog, wType, wCategory, dwEventID, lpUserSid,
619
wNumStrings, dwDataSize, (LPCWSTR *)wideStrArray, lpRawData);
620
for (i = 0; i < wNumStrings; i++)
621
free(wideStrArray[i]);
622
free(wideStrArray);
623
return ret;
624
}
625
626
/******************************************************************************
627
* ReportEventW [ADVAPI32.@]
628
*
629
* See ReportEventA.
630
*/
631
BOOL WINAPI ReportEventW( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
632
PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCWSTR *lpStrings, LPVOID lpRawData )
633
{
634
UINT i;
635
636
FIXME("(%p,0x%04x,0x%04x,0x%08lx,%p,0x%04x,0x%08lx,%p,%p): stub\n", hEventLog,
637
wType, wCategory, dwEventID, lpUserSid, wNumStrings, dwDataSize, lpStrings, lpRawData);
638
639
/* partial stub */
640
641
if (wNumStrings == 0) return TRUE;
642
if (!lpStrings) return TRUE;
643
644
for (i = 0; i < wNumStrings; i++)
645
{
646
const WCHAR *line = lpStrings[i];
647
648
while (*line)
649
{
650
const WCHAR *next = wcschr( line, '\n' );
651
652
if (next)
653
++next;
654
else
655
next = line + wcslen( line );
656
657
switch (wType)
658
{
659
case EVENTLOG_SUCCESS:
660
TRACE_(eventlog)("%s\n", debugstr_wn(line, next - line));
661
break;
662
case EVENTLOG_ERROR_TYPE:
663
ERR_(eventlog)("%s\n", debugstr_wn(line, next - line));
664
break;
665
case EVENTLOG_WARNING_TYPE:
666
WARN_(eventlog)("%s\n", debugstr_wn(line, next - line));
667
break;
668
default:
669
TRACE_(eventlog)("%s\n", debugstr_wn(line, next - line));
670
break;
671
}
672
673
line = next;
674
}
675
}
676
return TRUE;
677
}
678
679
/******************************************************************************
680
* StopTraceA [ADVAPI32.@]
681
*
682
* See StopTraceW.
683
*
684
*/
685
ULONG WINAPI StopTraceA( TRACEHANDLE session, LPCSTR session_name, PEVENT_TRACE_PROPERTIES properties )
686
{
687
FIXME("(%s, %s, %p) stub\n", wine_dbgstr_longlong(session), debugstr_a(session_name), properties);
688
return ERROR_SUCCESS;
689
}
690
691
/******************************************************************************
692
* QueryTraceA [ADVAPI32.@]
693
*/
694
ULONG WINAPI QueryTraceA( TRACEHANDLE handle, LPCSTR sessionname, PEVENT_TRACE_PROPERTIES properties )
695
{
696
FIXME("%s %s %p: stub\n", wine_dbgstr_longlong(handle), debugstr_a(sessionname), properties);
697
return ERROR_WMI_INSTANCE_NOT_FOUND;
698
}
699
700
/******************************************************************************
701
* QueryTraceW [ADVAPI32.@]
702
*/
703
ULONG WINAPI QueryTraceW( TRACEHANDLE handle, LPCWSTR sessionname, PEVENT_TRACE_PROPERTIES properties )
704
{
705
FIXME("%s %s %p: stub\n", wine_dbgstr_longlong(handle), debugstr_w(sessionname), properties);
706
return ERROR_CALL_NOT_IMPLEMENTED;
707
}
708
709
/******************************************************************************
710
* OpenTraceA [ADVAPI32.@]
711
*/
712
TRACEHANDLE WINAPI OpenTraceA( PEVENT_TRACE_LOGFILEA logfile )
713
{
714
static int once;
715
716
if (!once++) FIXME("%p: stub\n", logfile);
717
SetLastError(ERROR_ACCESS_DENIED);
718
return INVALID_PROCESSTRACE_HANDLE;
719
}
720
721
/******************************************************************************
722
* EnumerateTraceGuids [ADVAPI32.@]
723
*/
724
ULONG WINAPI EnumerateTraceGuids(PTRACE_GUID_PROPERTIES *propertiesarray,
725
ULONG arraycount, PULONG guidcount)
726
{
727
FIXME("%p %ld %p: stub\n", propertiesarray, arraycount, guidcount);
728
return ERROR_INVALID_PARAMETER;
729
}
730
731