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 support for EvtGetLogInfo #88

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
17 changes: 17 additions & 0 deletions winlog/wevtapi/wevtapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,22 @@ const (
EvtSubscribeActionDeliver = 1
)

type EvtLogPropertyID uint32

// Windows Event Log Property Enumerations
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa385783(v=vs.85).aspx
const (
// EVT_LOG_PROPERTY_ID
EvtLogCreationTime EvtLogPropertyID = iota
EvtLogLastAccessTime
EvtLogLastWriteTime
EvtLogFileSize
EvtLogAttributes
EvtLogNumberOfLogRecords
EvtLogOldestRecordNumber
EvtLogFull
)

// Windows Event Log Constants
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa385781(v=vs.85).aspx
const (
Expand Down Expand Up @@ -172,6 +188,7 @@ const (
//sys EvtExportLog(session windows.Handle, path *uint16, query *uint16, targetFilePath *uint16, flags uint32) (err error) = wevtapi.EvtExportLog
//sys EvtFormatMessage(pubMetaData windows.Handle, event windows.Handle, messageID uint32, valueCount uint32, variant uintptr, flags uint32, bufferSize uint32, buffer *byte, bufferUsed *uint32) (err error) = wevtapi.EvtFormatMessage
//sys EvtGetChannelConfigProperty(channelConfig windows.Handle, propertyID EvtChannelConfigPropertyID, flags uint32, bufferSize uint32, buffer unsafe.Pointer, bufferUsed *uint32) (err error) = wevtapi.EvtGetChannelConfigProperty
//sys EvtGetLogInfo(log windows.Handle, propertyID EvtLogPropertyID, bufferSize uint32, buffer unsafe.Pointer, bufferUsed *uint32) (err error) = wevtapi.EvtGetLogInfo
//sys EvtNext(resultSet windows.Handle, eventArraySize uint32, eventArray *windows.Handle, timeout uint32, flags uint32, returned *uint32) (err error) = wevtapi.EvtNext
//sys EvtNextChannelPath(channelEnum windows.Handle, channelPathBufferSize uint32, channelPathBuffer *uint16, channelPathBufferUsed *uint32) (err error) = wevtapi.EvtNextChannelPath
//sys EvtNextPublisherId(publisherEnum windows.Handle, publisherIDBufferSize uint32, publisherIDBuffer *uint16, publisherIDBufferUsed *uint32) (err error) = wevtapi.EvtNextPublisherId
Expand Down
9 changes: 9 additions & 0 deletions winlog/wevtapi/zwevtapi.go

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