mirror of
https://github.com/datarhei/core.git
synced 2025-10-15 04:20:43 +08:00
Update dependencies
This commit is contained in:
13
vendor/github.com/yusufpapurcu/wmi/wmi.go
generated
vendored
13
vendor/github.com/yusufpapurcu/wmi/wmi.go
generated
vendored
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user