1999-01-03 13:48:29 +01:00
|
|
|
/*
|
|
|
|
* Win32 advapi functions
|
|
|
|
*
|
|
|
|
* Copyright 1995 Sven Verdoolaege, 1998 Juergen Schmied
|
|
|
|
*/
|
|
|
|
|
1999-07-03 18:01:42 +02:00
|
|
|
#include "winbase.h"
|
1999-03-14 17:35:05 +01:00
|
|
|
#include "windef.h"
|
1999-01-03 13:48:29 +01:00
|
|
|
#include "winerror.h"
|
|
|
|
#include "heap.h"
|
|
|
|
|
1999-05-14 10:17:14 +02:00
|
|
|
#include "debugtools.h"
|
1999-02-17 14:51:06 +01:00
|
|
|
|
2000-11-28 00:54:25 +01:00
|
|
|
DEFAULT_DEBUG_CHANNEL(advapi);
|
1999-04-19 16:56:29 +02:00
|
|
|
|
1999-01-03 13:48:29 +01:00
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* BackupEventLogA [ADVAPI32.15]
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI BackupEventLogA( HANDLE hEventLog, LPCSTR lpBackupFileName )
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("stub\n");
|
1999-01-03 13:48:29 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
1999-01-28 14:46:25 +01:00
|
|
|
|
1999-01-03 13:48:29 +01:00
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* BackupEventLogW [ADVAPI32.16]
|
1999-01-28 14:46:25 +01:00
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hEventLog []
|
|
|
|
* lpBackupFileName []
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI
|
|
|
|
BackupEventLogW( HANDLE hEventLog, LPCWSTR lpBackupFileName )
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("stub\n");
|
1999-01-03 13:48:29 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* ClearEventLogA [ADVAPI32.19]
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI ClearEventLogA ( HANDLE hEventLog, LPCSTR lpBackupFileName )
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("stub\n");
|
1999-01-03 13:48:29 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* ClearEventLogW [ADVAPI32.20]
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI ClearEventLogW ( HANDLE hEventLog, LPCWSTR lpBackupFileName )
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("stub\n");
|
1999-01-03 13:48:29 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* CloseEventLog [ADVAPI32.21]
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI CloseEventLog ( HANDLE hEventLog )
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("stub\n");
|
1999-01-03 13:48:29 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* DeregisterEventSource [ADVAPI32.32]
|
1999-01-03 13:48:29 +01:00
|
|
|
* Closes a handle to the specified event log
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hEventLog [I] Handle to event log
|
|
|
|
*
|
|
|
|
* RETURNS STD
|
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI DeregisterEventSource( HANDLE hEventLog )
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("(%d): stub\n",hEventLog);
|
1999-01-03 13:48:29 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* GetNumberOfEventLogRecords [ADVAPI32.49]
|
1999-01-28 14:46:25 +01:00
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hEventLog []
|
|
|
|
* NumberOfRecords []
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI
|
|
|
|
GetNumberOfEventLogRecords( HANDLE hEventLog, PDWORD NumberOfRecords )
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("stub\n");
|
1999-01-03 13:48:29 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* GetOldestEventLogRecord [ADVAPI32.50]
|
1999-01-28 14:46:25 +01:00
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hEventLog []
|
|
|
|
* OldestRecord []
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI
|
|
|
|
GetOldestEventLogRecord( HANDLE hEventLog, PDWORD OldestRecord )
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME(":stub\n");
|
1999-01-03 13:48:29 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* NotifyChangeEventLog [ADVAPI32.98]
|
1999-01-28 14:46:25 +01:00
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hEventLog []
|
|
|
|
* hEvent []
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI NotifyChangeEventLog( HANDLE hEventLog, HANDLE hEvent )
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("stub\n");
|
1999-01-03 13:48:29 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* OpenBackupEventLogA [ADVAPI32.105]
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HANDLE WINAPI
|
|
|
|
OpenBackupEventLogA( LPCSTR lpUNCServerName, LPCSTR lpFileName )
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("stub\n");
|
1999-01-03 13:48:29 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* OpenBackupEventLogW [ADVAPI32.106]
|
1999-01-28 14:46:25 +01:00
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* lpUNCServerName []
|
|
|
|
* lpFileName []
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HANDLE WINAPI
|
|
|
|
OpenBackupEventLogW( LPCWSTR lpUNCServerName, LPCWSTR lpFileName )
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("stub\n");
|
1999-01-03 13:48:29 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* OpenEventLogA [ADVAPI32.107]
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HANDLE WINAPI OpenEventLogA(LPCSTR uncname,LPCSTR source)
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("(%s,%s),stub!\n",uncname,source);
|
1999-01-03 13:48:29 +01:00
|
|
|
return 0xcafe4242;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* OpenEventLogW [ADVAPI32.108]
|
1999-01-28 14:46:25 +01:00
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* uncname []
|
|
|
|
* source []
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HANDLE WINAPI
|
|
|
|
OpenEventLogW( LPCWSTR uncname, LPCWSTR source )
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("stub\n");
|
1999-01-03 13:48:29 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* ReadEventLogA [ADVAPI32.124]
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI ReadEventLogA( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
|
1999-01-03 13:48:29 +01:00
|
|
|
LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
|
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("stub\n");
|
1999-01-03 13:48:29 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* ReadEventLogW [ADVAPI32.125]
|
1999-01-28 14:46:25 +01:00
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hEventLog []
|
|
|
|
* dwReadFlags []
|
|
|
|
* dwRecordOffset []
|
|
|
|
* lpBuffer []
|
|
|
|
* nNumberOfBytesToRead []
|
|
|
|
* pnBytesRead []
|
|
|
|
* pnMinNumberOfBytesNeeded []
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI
|
|
|
|
ReadEventLogW( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
|
1999-01-28 14:46:25 +01:00
|
|
|
LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
|
|
|
|
DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("stub\n");
|
1999-01-03 13:48:29 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* RegisterEventSourceA [ADVAPI32.174]
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HANDLE WINAPI RegisterEventSourceA( LPCSTR lpUNCServerName, LPCSTR lpSourceName )
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
|
|
|
LPWSTR lpUNCServerNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpUNCServerName);
|
|
|
|
LPWSTR lpSourceNameW = HEAP_strdupAtoW(GetProcessHeap(),0,lpSourceName);
|
1999-02-26 12:11:13 +01:00
|
|
|
HANDLE ret = RegisterEventSourceW(lpUNCServerNameW,lpSourceNameW);
|
1999-01-03 13:48:29 +01:00
|
|
|
HeapFree(GetProcessHeap(),0,lpSourceNameW);
|
|
|
|
HeapFree(GetProcessHeap(),0,lpUNCServerNameW);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* RegisterEventSourceW [ADVAPI32.175]
|
1999-01-03 13:48:29 +01:00
|
|
|
* Returns a registered handle to an event log
|
|
|
|
*
|
|
|
|
* PARAMS
|
1999-01-28 14:46:25 +01:00
|
|
|
* lpUNCServerName [I] Server name for source
|
|
|
|
* lpSourceName [I] Source name for registered handle
|
1999-01-03 13:48:29 +01:00
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: Handle
|
|
|
|
* Failure: NULL
|
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HANDLE WINAPI
|
|
|
|
RegisterEventSourceW( LPCWSTR lpUNCServerName, LPCWSTR lpSourceName )
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("(%s,%s): stub\n", debugstr_w(lpUNCServerName),
|
1999-01-03 13:48:29 +01:00
|
|
|
debugstr_w(lpSourceName));
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* ReportEventA [ADVAPI32.178]
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI ReportEventA ( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID,
|
1999-01-03 13:48:29 +01:00
|
|
|
PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCSTR *lpStrings, LPVOID lpRawData)
|
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("stub\n");
|
1999-01-03 13:48:29 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* ReportEventW [ADVAPI32.179]
|
1999-01-28 14:46:25 +01:00
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hEventLog []
|
|
|
|
* wType []
|
|
|
|
* wCategory []
|
|
|
|
* dwEventID []
|
|
|
|
* lpUserSid []
|
|
|
|
* wNumStrings []
|
|
|
|
* dwDataSize []
|
|
|
|
* lpStrings []
|
|
|
|
* lpRawData []
|
1999-01-03 13:48:29 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI
|
|
|
|
ReportEventW( HANDLE hEventLog, WORD wType, WORD wCategory,
|
1999-01-28 14:46:25 +01:00
|
|
|
DWORD dwEventID, PSID lpUserSid, WORD wNumStrings,
|
|
|
|
DWORD dwDataSize, LPCWSTR *lpStrings, LPVOID lpRawData )
|
1999-01-03 13:48:29 +01:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("stub\n");
|
1999-01-03 13:48:29 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|