Update dependencies

This commit is contained in:
Ingo Oppermann
2023-09-04 16:36:53 +02:00
parent 7fa68778b7
commit f6d5064211
929 changed files with 99783 additions and 37695 deletions

View File

@@ -1,3 +1,4 @@
//go:build windows
// +build windows
/*
@@ -20,7 +21,6 @@ Example code to print names of running processes:
println(i, v.Name)
}
}
*/
package wmi
@@ -338,11 +338,6 @@ func (c *Client) loadEntity(dst interface{}, src *ole.IDispatch) (errFieldMismat
f := v.Field(i)
of := f
isPtr := f.Kind() == reflect.Ptr
if isPtr {
ptr := reflect.New(f.Type().Elem())
f.Set(ptr)
f = f.Elem()
}
n := v.Type().Field(i).Name
if n[0] < 'A' || n[0] > 'Z' {
continue
@@ -367,6 +362,12 @@ func (c *Client) loadEntity(dst interface{}, src *ole.IDispatch) (errFieldMismat
}
defer prop.Clear()
if isPtr && !(c.PtrNil && prop.VT == 0x1) {
ptr := reflect.New(f.Type().Elem())
f.Set(ptr)
f = f.Elem()
}
if prop.VT == 0x1 { //VT_NULL
continue
}