wmi

package
v0.0.0-...-c4ef65f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilObject = errors.New("returned nil object")

ErrNilObject indicates an nil object was unexpectedly received

Functions

This section is empty.

Types

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

Conn is a WMI connection. A Conn should only be used by a single thread

func Dial

func Dial(namespace string) (*Conn, error)

Dial returns a new Conn using the given WMI namespace

func (*Conn) Close

func (conn *Conn) Close() error

Close closes the connection

func (*Conn) Query

func (conn *Conn) Query(query string) (*Rows, error)

Query executes the query and returns a rows cursor

type Rows

type Rows struct {
	Count int32
	// contains filtered or unexported fields
}

Rows is the result of a query

func (*Rows) Close

func (rows *Rows) Close() error

Close closes the rows and should be always be called on returned Rows

func (*Rows) Err

func (rows *Rows) Err() error

Err returns the last error returned by Next, unless it was io.EOF

func (*Rows) Next

func (rows *Rows) Next() (*ole.IDispatch, error)

Next returns the next row, which is only valid until the next call to Next. io.EOF is returned at the end of iteration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL