Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add few syscalls of windows log events API #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions windows/eventlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,26 @@ const (
EVENTLOG_AUDIT_FAILURE = 16
)

// EVT_SUBSCRIBE_FLAGS enumeration
const (
EvtSubscribeToFutureEvents = 1
EvtSubscribeStartAtOldestRecord = 2
EvtSubscribeStartAfterBookmark = 3
)

// EVT_RENDER_FLAGS enumeration
const (
EvtRenderEventValues = iota
EvtRenderEventXML
EvtRenderBookmark
)

//sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW
//sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource
//sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW
//sys EvtSubscribe(session Handle, signalEvent Handle, channelPath *uint16, query *uint16, bookmark Handle, context uintptr, callback syscall.Handle, flags uint32) (handle Handle, err error) [failretval==0] = wevtapi.EvtSubscribe
//sys EvtClose(object Handle) (err error) = wevtapi.EvtClose
//sys EvtNext(resultSet Handle, eventArraySize uint32, eventArray *Handle, timeout uint32, flags uint32, numReturned *uint32) (err error) = wevtapi.EvtNext
//sys EvtRender(context Handle, fragment Handle, flags uint32, bufferSize uint32, buffer *byte, bufferUsed *uint32, propertyCount *uint32) (err error) = wevtapi.EvtRender
//sys EvtCreateBookmark(bookmarkXML *uint16) (handle Handle, err error) [failretval==0] = wevtapi.EvtCreateBookmark
//sys EvtUpdateBookmark(bookmark Handle, event Handle) (err error) = wevtapi.EvtUpdateBookmark
57 changes: 57 additions & 0 deletions windows/zsyscall_windows.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.