HP Remote Graphics Software (RGS) Uživatelský manuál Strana 94

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 101
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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)
Zobrazit stránku 93
1 2 ... 89 90 91 92 93 94 95 96 97 98 99 100 101

Komentáře k této Příručce

Žádné komentáře