Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How get a list of LogSources ?

How get a list of LogSources ?

Scheduled Pinned Locked Moved C / C++ / MFC
securityhelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fx9200
    wrote on last edited by
    #1

    HELLO, Now i can read and write all events in any log source (Application,System...) i can catch each event logging in a specified log source. the problem is that i want to cach any event in any log source. this is the proc of catch: BOOL notifyChange(LPCTSTR logSource) { BOOL bSuccess; HANDLE hEventLog, hEvent; DWORD dwWaitResult; hEventLog = OpenEventLog(NULL, // local machine logSource); // event log source name if (hEventLog == NULL) { printf("Could not open event log."); return FALSE; } hEvent = CreateEvent(NULL, // default security attributes FALSE, // no manual reset FALSE, // create as not signaled NULL); // no event name NotifyChangeEventLog(hEventLog, hEvent); dwWaitResult = WaitForSingleObject(hEvent, INFINITE); if (dwWaitResult == WAIT_FAILED) bSuccess = FALSE; else bSuccess = TRUE; CloseHandle(hEvent); CloseEventLog(hEventLog); return bSuccess; }

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups