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

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 122
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 85
DWORD dwCurrentCount;
DWORD dwNewIndex;
int waitedFor;
// This function will monitor the log for the specified number of
// seconds. If seconds is less than zero, we will wait forever.
for (waitedFor = 0; seconds < 0 || waitedFor < seconds; )
{
HANDLE h;
// Open, read status of log, close event log =========================
if ((h = OpenEventLog(eventServer, eventSource)) == NULL)
{
... report error status here ...
return;
}
// If an event is added, either the start or count will change.
// Get the start and count. Microsoft does not specify what
// reasons these functions could fail, so we cannot ensure
// success. Check the return value.
if (GetOldestEventLogRecord(h, &dwCurrentStart) == false ||
GetNumberOfEventLogRecords(h, &dwCurrentCount) == false)
{
CloseEventLog(h);
... report error - unable to obtain event logs ...
return;
}
if (CloseEventLog(h) == false)
{
... report error status here ...
return;
}
// Determine state of log change =====================================
// Compute the index of the last event. If the count is zero, then
// there are no events and the index is 0.
if (dwCurrentCount == 0)
{
74 Chapter 8 Advanced RGS features
Zobrazit stránku 85
1 2 ... 81 82 83 84 85 86 87 88 89 90 91 ... 121 122

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

Žádné komentáře