HP Remote Graphics Software (RGS) Manuel d'utilisateur Page 94

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 101
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 93
{
HANDLE h;
EVENTLOGRECORD *pevlr;
BYTE bBuffer[BUFFER_SIZE];
DWORD dwRead, dwNeeded;
BOOL result;
// Open, read, close event log ===========================================
if ((h = OpenEventLog(eventServer, eventSource)) == NULL)
{
... report error status ...
return true;
}
// Set the pointer to our buffer. Strings and data will get appended to
the EVENTLOGRECORD structure.
pevlr = (EVENTLOGRECORD *) &bBuffer
// Read the event specified by dwEventNum
result = ReadEventLog(h, // event log handle
EVENTLOG_SEEK_READ | // start at specific event
EVENTLOG_FORWARDS_READ, // advance forward
dwEventNum, // record to read
pevlr, // pointer to buffer
BUFFER_SIZE, // size of buffer
&dwRead, // number of bytes read
&dwNeeded); // bytes in next record
if (CloseEventLog(h) == false)
{
... report error status ...
return true;
}
// Process event (example: print out event) ==============================
if (result)
{
// We only know how to process specific events
if (pevlr->EventID == RGSENDER_CONNECT_STATE)
84 Appendix B Creating an agent for remote application termination (Windows only)
Vue de la page 93
1 2 ... 89 90 91 92 93 94 95 96 97 98 99 100 101

Commentaires sur ces manuels

Pas de commentaire