terminal_services: fix swapped cpu_time labels, pending broker gauge, shared PDH query and series caching (#2687)

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
This commit is contained in:
Jan-Otto Kröpke
2026-10-11 20:41:28 +02:00
committed by GitHub
co-authored by Claude
parent 1f96f71a7c
commit 08bcab7f9a
5 changed files with 167 additions and 76 deletions
+4 -8
View File
@@ -18,7 +18,6 @@
package wtsapi32
import (
"errors"
"fmt"
"log/slog"
"unsafe"
@@ -145,13 +144,10 @@ func WTSOpenServer(server string) (windows.Handle, error) {
return serverHandle, nil
}
func WTSCloseServer(server windows.Handle) error {
r1, _, err := procWTSCloseServer.Call(uintptr(server))
if r1 != 1 && !errors.Is(err, windows.ERROR_SUCCESS) {
return fmt.Errorf("failed to close server: %w", err)
}
return nil
// WTSCloseServer closes a handle opened by WTSOpenServer. The function returns
// void, so neither r1 nor the last error say whether it failed.
func WTSCloseServer(server windows.Handle) {
_, _, _ = procWTSCloseServer.Call(uintptr(server))
}
func WTSFreeMemoryEx(class WTSTypeClass, pMemory uintptr, numberOfEntries uint32) error {