Vendor Microsoft/go-winio@v0.4.12

Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
John Howard
2019-02-21 09:44:08 -08:00
parent e0d7ed12a5
commit d83e4e9b3b
14 changed files with 1428 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
package etw
import (
"unsafe"
)
type eventDataDescriptorType uint8
const (
eventDataDescriptorTypeUserData eventDataDescriptorType = iota
eventDataDescriptorTypeEventMetadata
eventDataDescriptorTypeProviderMetadata
)
type eventDataDescriptor struct {
ptr ptr64
size uint32
dataType eventDataDescriptorType
reserved1 uint8
reserved2 uint16
}
func newEventDataDescriptor(dataType eventDataDescriptorType, buffer []byte) eventDataDescriptor {
return eventDataDescriptor{
ptr: ptr64{ptr: unsafe.Pointer(&buffer[0])},
size: uint32(len(buffer)),
dataType: dataType,
}
}