Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using ReadEventLog
Message
From
25/08/2000 08:18:10
Steven Bentley
Logica Mobile Networks
Bristol, United Kingdom
 
 
General information
Forum:
Visual C++
Category:
Other
Miscellaneous
Thread ID:
00409147
Message ID:
00409152
Views:
29
#include
#include
#include

void main()
{
LPCTSTR lpServerName = "\\\\adt246";
LPCTSTR lpSourceName = "Application";
HANDLE hAppLog = 0;
BOOL bReadReturn;
char eventBuffer[500];
LPVOID lpBuffer = &eventBuffer;
DWORD dwBytesRead=0;
DWORD dwBytesNeeded=0;
DWORD dwErrorCode;

hAppLog=OpenEventLog(lpServerName,lpSourceName);


if(!hAppLog==NULL)
{


bReadReturn = ReadEventLog(hAppLog,
EVENTLOG_FORWARDS_READ,
0,
lpBuffer,
500,
&dwBytesRead,
&dwBytesNeeded);


}

if(!bReadReturn)
{
dwErrorCode=GetLastError();
printf("Error code is %d\n",dwErrorCode);
}

}
Previous
Reply
Map
View

Click here to load this message in the networking platform