Fix ETW package to work on 386

The ETW registration handle is defined to be 64-bits on all platforms. The Go
type previously used a uintptr which created problems on 32-bit systems. This
change adds a new wrapper file which receives a 64-bit handle for the functions
defined in it, and correctly passes it to the native ETW functions either as-is
(on 64-bit) or as two 32-bit values (on 32-bit).

This required a minor change in mksyscall_windows.go, to allow multiple syscalls
that map to the same underlying function without causing a duplicate definition
error in the generated file.
This commit is contained in:
Kevin Parsons
2019-04-22 10:28:49 -07:00
parent 1af701744e
commit 0112307ab4
8 changed files with 145 additions and 11 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ func (provider *Provider) String() string {
return provider.ID.String()
}
type providerHandle windows.Handle
type providerHandle uint64
// ProviderState informs the provider EnableCallback what action is being
// performed.