mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-08 05:56:37 +00:00
*: cleanup collector API 1 (#1547)
This commit is contained in:
@@ -129,12 +129,13 @@ func WTSOpenServer(server string) (syscall.Handle, error) {
|
||||
}
|
||||
|
||||
func WTSCloseServer(server syscall.Handle) error {
|
||||
_, _, err := procWTSCloseServer.Call(uintptr(server))
|
||||
if err != nil {
|
||||
r1, _, err := procWTSCloseServer.Call(uintptr(server))
|
||||
|
||||
if r1 != 1 {
|
||||
return fmt.Errorf("failed to close server: %w", err)
|
||||
}
|
||||
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
||||
func WTSFreeMemoryEx(class WTSTypeClass, pMemory uintptr, NumberOfEntries uint32) error {
|
||||
|
||||
Reference in New Issue
Block a user