Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using ReadEventLog
Message
De
25/08/2000 08:18:10
Steven Bentley
Logica Mobile Networks
Bristol, Royaume Uni
 
 
À
25/08/2000 08:13:36
Information générale
Forum:
Visual C++
Catégorie:
Autre
Divers
Thread ID:
00409147
Message ID:
00409152
Vues:
30
#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);
}

}
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform