...

Source file src/github.com/Microsoft/go-winio/pkg/etw/eventdatadescriptor.go

Documentation: github.com/Microsoft/go-winio/pkg/etw

     1  //go:build windows
     2  
     3  package etw
     4  
     5  import (
     6  	"unsafe"
     7  )
     8  
     9  type eventDataDescriptorType uint8
    10  
    11  const (
    12  	eventDataDescriptorTypeUserData eventDataDescriptorType = iota
    13  	eventDataDescriptorTypeEventMetadata
    14  	eventDataDescriptorTypeProviderMetadata
    15  )
    16  
    17  type eventDataDescriptor struct {
    18  	ptr      ptr64
    19  	size     uint32
    20  	dataType eventDataDescriptorType
    21  	_        uint8
    22  	_        uint16
    23  }
    24  
    25  func newEventDataDescriptor(dataType eventDataDescriptorType, buffer []byte) eventDataDescriptor {
    26  	return eventDataDescriptor{
    27  		ptr:      ptr64{ptr: unsafe.Pointer(&buffer[0])},
    28  		size:     uint32(len(buffer)),
    29  		dataType: dataType,
    30  	}
    31  }
    32  

View as plain text