cim

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EOAC_NONE              tagEOLE_AUTHENTICATION_CAPABILITIES = 0
	EOAC_MUTUAL_AUTH       tagEOLE_AUTHENTICATION_CAPABILITIES = 0x1
	EOAC_STATIC_CLOAKING   tagEOLE_AUTHENTICATION_CAPABILITIES = 0x20
	EOAC_DYNAMIC_CLOAKING  tagEOLE_AUTHENTICATION_CAPABILITIES = 0x40
	EOAC_ANY_AUTHORITY     tagEOLE_AUTHENTICATION_CAPABILITIES = 0x80
	EOAC_MAKE_FULLSIC      tagEOLE_AUTHENTICATION_CAPABILITIES = 0x100
	EOAC_DEFAULT           tagEOLE_AUTHENTICATION_CAPABILITIES = 0x800
	EOAC_SECURE_REFS       tagEOLE_AUTHENTICATION_CAPABILITIES = 0x2
	EOAC_ACCESS_CONTROL    tagEOLE_AUTHENTICATION_CAPABILITIES = 0x4
	EOAC_APPID             tagEOLE_AUTHENTICATION_CAPABILITIES = 0x8
	EOAC_DYNAMIC           tagEOLE_AUTHENTICATION_CAPABILITIES = 0x10
	EOAC_REQUIRE_FULLSIC   tagEOLE_AUTHENTICATION_CAPABILITIES = 0x200
	EOAC_AUTO_IMPERSONATE  tagEOLE_AUTHENTICATION_CAPABILITIES = 0x400
	EOAC_NO_CUSTOM_MARSHAL tagEOLE_AUTHENTICATION_CAPABILITIES = 0x2000
	EOAC_DISABLE_AAA       tagEOLE_AUTHENTICATION_CAPABILITIES = 0x1000
)
View Source
const (
	RPC_E_TOO_LATE uint32 = 0x80010119
)
View Source
const S_FALSE = 0x00000001

Variables

View Source
var IID_ISWbemLocator = &ole.GUID{0x76a6415b, 0xcb41, 0x11d1, [8]byte{0x8b, 0x02, 0x00, 0x60, 0x08, 0x06, 0xd9, 0xb6}}
View Source
var IID_ISWbemObjectPath = &ole.GUID{0x5791BC27, 0xCE9C, 0x11d1, [8]byte{0x97, 0xBF, 0x00, 0x00, 0xF8, 0x1E, 0x84, 0x9C}}
View Source
var IID_ISWbemSinkEvents = &ole.GUID{0x75718CA0, 0xF029, 0x11d1, [8]byte{0xA1, 0xAC, 0x00, 0xC0, 0x4F, 0xB6, 0xC2, 0x23}}

Functions

func CloseAllClasses

func CloseAllClasses(classes []*WmiClass)

CloseAllClasses

func CloseAllInstances

func CloseAllInstances(instances []*WmiInstance)

CloseAllInstances

func CloseAllProperties

func CloseAllProperties(properties []*WmiProperty)

func CoInitializeSecurity

func CoInitializeSecurity(authLevel RpcAuthenticationLevel, impLevel RpcImpersonationLevel) (err error)

func EscapeQueryValue

func EscapeQueryValue(rawString string) string

func FindStringInSlice

func FindStringInSlice(stringList []string, value string) (int, bool)

func GetVariantArrayValues

func GetVariantArrayValues(rawValues []ole.VARIANT) ([]interface{}, error)

func GetVariantValue

func GetVariantValue(rawValue *ole.VARIANT) (interface{}, error)

func GetVariantValues

func GetVariantValues(rawValue *ole.VARIANT) ([]interface{}, error)

func PeekMessage

func PeekMessage(msg *ole.Msg, hwnd uint32, MsgFilterMin uint32, MsgFilterMax uint32, RemoveMsg RemoveMessageFlags) (ret bool, err error)

PeekMessage in message queue from runtime.

This function appears to block. PeekMessage does not block.

Types

type DISPPARAMS

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

DISPPARAMS are the arguments that passed to methods or property.

type DispParams

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

func GetDispParamsFromRaw

func GetDispParamsFromRaw(dispparams *DISPPARAMS) *DispParams

type JobState added in v0.1.5

type JobState int

JobState

const (
	// New enum
	JobState_Unknown JobState = 0
	// New enum
	JobState_New JobState = 2
	// Starting enum
	JobState_Starting JobState = 3
	// Running enum
	JobState_Running JobState = 4
	// Suspended enum
	JobState_Suspended JobState = 5
	// Shutting_Down enum
	JobState_Shutting_Down JobState = 6
	// Completed enum
	JobState_Completed JobState = 7
	// Terminated enum
	JobState_Terminated JobState = 8
	// Killed enum
	JobState_Killed JobState = 9
	// Exception enum
	JobState_Exception JobState = 10
	// Service enum
	JobState_Service JobState = 11
	// Query_Pending enum
	JobState_Query_Pending JobState = 12
	// DMTF_Reserved enum
	JobState_DMTF_Reserved JobState = 13
	// Vendor_Reserved enum
	JobState_Vendor_Reserved JobState = 14
)

type RemoveMessageFlags

type RemoveMessageFlags uint32
const (
	PM_NOREMOVE RemoveMessageFlags = 0
	PM_REMOVE   RemoveMessageFlags = 1
	PM_NOYIELD  RemoveMessageFlags = 2
)

type RpcAuthenticationLevel

type RpcAuthenticationLevel uint32
const (
	RPC_C_AUTHN_LEVEL_DEFAULT       RpcAuthenticationLevel = 0
	RPC_C_AUTHN_LEVEL_NONE          RpcAuthenticationLevel = 1
	RPC_C_AUTHN_LEVEL_CONNECT       RpcAuthenticationLevel = 2
	RPC_C_AUTHN_LEVEL_CALL          RpcAuthenticationLevel = 3
	RPC_C_AUTHN_LEVEL_PKT           RpcAuthenticationLevel = 4
	RPC_C_AUTHN_LEVEL_PKT_INTEGRITY RpcAuthenticationLevel = 5
	RPC_C_AUTHN_LEVEL_PKT_PRIVACY   RpcAuthenticationLevel = 6
)

type RpcImpersonationLevel

type RpcImpersonationLevel uint32
const (
	RPC_C_IMP_LEVEL_DEFAULT     RpcImpersonationLevel = 0
	RPC_C_IMP_LEVEL_ANONYMOUS   RpcImpersonationLevel = 1
	RPC_C_IMP_LEVEL_IDENTIFY    RpcImpersonationLevel = 2
	RPC_C_IMP_LEVEL_IMPERSONATE RpcImpersonationLevel = 3
	RPC_C_IMP_LEVEL_DELEGATE    RpcImpersonationLevel = 4
)

type UserAction

type UserAction uint32
const (
	None    UserAction = 0
	Async   UserAction = 1
	Wait    UserAction = 2
	Cancel  UserAction = 3
	Default UserAction = 4
)

type WbemAuthenticationLevelEnum

type WbemAuthenticationLevelEnum uint32

type WbemImpersonationLevel

type WbemImpersonationLevel uint32

type WmiClass

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

func CreateWmiClass

func CreateWmiClass(classVar *ole.VARIANT, session *WmiSession) (*WmiClass, error)

func (*WmiClass) Close

func (c *WmiClass) Close() error

Dispose

func (*WmiClass) Commit

func (c *WmiClass) Commit() error

Commit

func (*WmiClass) GetClassName

func (c *WmiClass) GetClassName() string

ClassName

func (*WmiClass) GetDerivation

func (c *WmiClass) GetDerivation() []string

Derivation

func (*WmiClass) GetMethodsNames

func (c *WmiClass) GetMethodsNames() []string

Methods

func (*WmiClass) GetNamespace

func (c *WmiClass) GetNamespace() string

Namespace

func (*WmiClass) GetPropertiesNames

func (c *WmiClass) GetPropertiesNames() []string

Properties

func (*WmiClass) GetProperty

func (c *WmiClass) GetProperty(name string) (interface{}, error)

GetProperty gets the property of the instance specified by name and returns in value

func (*WmiClass) GetQualifiersNames

func (c *WmiClass) GetQualifiersNames() []string

Qualifiers

func (*WmiClass) GetServerName

func (c *WmiClass) GetServerName() string

ServerName

func (*WmiClass) GetSuperClass

func (c *WmiClass) GetSuperClass() *WmiClass

SuperClass

func (*WmiClass) GetSuperClassName

func (c *WmiClass) GetSuperClassName() string

SuperClassName

func (*WmiClass) GetSystemProperty

func (c *WmiClass) GetSystemProperty(name string) (*WmiProperty, error)

func (*WmiClass) InvokeMethod

func (c *WmiClass) InvokeMethod(methodName string, methodParams []string, inputOptions string) (error, string)

func (*WmiClass) MakeInstance

func (c *WmiClass) MakeInstance() (*WmiInstance, error)

Makes a new instance of the class

func (*WmiClass) MethodParameters

func (c *WmiClass) MethodParameters(methodName string) []string

MethodParameters

func (*WmiClass) Modify

func (c *WmiClass) Modify() error

Modify

func (*WmiClass) SetClassName

func (c *WmiClass) SetClassName(name string) error

SetClassName

func (*WmiClass) SetProperty

func (c *WmiClass) SetProperty(name string, value interface{}) error

SetProperty sets a value of property representation by name with value

type WmiEventSink

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

func CreateWmiEventSink

func CreateWmiEventSink(session *WmiSession, callbackContext interface{}, onObjectReady func(interface{}, []*WmiInstance), onCompleted func(interface{}, []*WmiInstance), onProgress func(interface{}, []*WmiInstance), onObjectPut func(interface{}, []*WmiInstance)) (*WmiEventSink, error)

func (*WmiEventSink) Close

func (c *WmiEventSink) Close()

func (*WmiEventSink) Connect

func (c *WmiEventSink) Connect() (cookie uint32, err error)

func (*WmiEventSink) GetAndDispatchMessages

func (c *WmiEventSink) GetAndDispatchMessages()

func (*WmiEventSink) IsClosed added in v0.1.3

func (c *WmiEventSink) IsClosed() bool

func (*WmiEventSink) IsReadyToClose

func (c *WmiEventSink) IsReadyToClose() bool

func (*WmiEventSink) PeekAndDispatchMessages

func (c *WmiEventSink) PeekAndDispatchMessages() bool

type WmiEventSinkVtbl

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

type WmiInstance

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

WmiInstance is a representation of a WMI instance

func CreateWmiInstance

func CreateWmiInstance(instanceVar *ole.VARIANT, session *WmiSession) (*WmiInstance, error)

func (*WmiInstance) Clone added in v0.1.2

func (c *WmiInstance) Clone() (*WmiInstance, error)

Clone

func (*WmiInstance) Close

func (c *WmiInstance) Close() (err error)

Close

func (*WmiInstance) Commit

func (c *WmiInstance) Commit() error

Commit

func (*WmiInstance) Delete

func (c *WmiInstance) Delete() error

Delete

func (*WmiInstance) EmbeddedInstance

func (c *WmiInstance) EmbeddedInstance() (string, error)

EmbeddedInstance

func (*WmiInstance) EmbeddedXMLInstance added in v0.1.2

func (c *WmiInstance) EmbeddedXMLInstance() (string, error)

EmbeddedXMLInstance

func (*WmiInstance) EnumerateReferencingInstances

func (c *WmiInstance) EnumerateReferencingInstances(resultClassName, sourceRole string) (WmiInstanceCollection, error)

EnumerateReferencingInstances

func (*WmiInstance) Equals

func (c *WmiInstance) Equals(instance *WmiInstance) bool

Equals

func (*WmiInstance) GetAllRelated

func (c *WmiInstance) GetAllRelated(resultClassName string) (WmiInstanceCollection, error)

GetAllRelated

func (*WmiInstance) GetAllRelatedWithQuery added in v0.1.2

func (c *WmiInstance) GetAllRelatedWithQuery(q *query.WmiQuery) (WmiInstanceCollection, error)

GetAllRelatedWithQuery returns all related instances matching the query

func (*WmiInstance) GetAssociated

func (c *WmiInstance) GetAssociated(associatedClassName, resultClassName, resultRole, sourceRole string) (WmiInstanceCollection, error)

GetAssociated

func (*WmiInstance) GetAssociatedEx added in v0.1.5

func (c *WmiInstance) GetAssociatedEx(associatedClassName string) (WmiInstanceCollection, error)

func (*WmiInstance) GetClass

func (c *WmiInstance) GetClass() *WmiClass

Class

func (*WmiInstance) GetClassName

func (c *WmiInstance) GetClassName() string

GetClassName

func (*WmiInstance) GetFirstRelatedEx added in v0.2.2

func (c *WmiInstance) GetFirstRelatedEx(associatedClassName, resultClassName, resultRole, sourceRole string) (*WmiInstance, error)

GetFirstRelatedEx

func (*WmiInstance) GetIDispatch added in v0.1.2

func (c *WmiInstance) GetIDispatch() *ole.IDispatch

func (*WmiInstance) GetInstance

func (c *WmiInstance) GetInstance() (*WmiInstance, error)

GetInstance returns the latest Instance

func (*WmiInstance) GetProperty

func (c *WmiInstance) GetProperty(name string) (interface{}, error)

GetProperty gets the property of the instance specified by name and returns in value

func (*WmiInstance) GetRawInstance added in v0.1.2

func (c *WmiInstance) GetRawInstance() *ole.VARIANT

func (*WmiInstance) GetReferences added in v0.1.5

func (c *WmiInstance) GetReferences(associatedClassName string) (WmiInstanceCollection, error)

GetReferences

func (*WmiInstance) GetRelated

func (c *WmiInstance) GetRelated(resultClassName string) (*WmiInstance, error)

GetRelated

func (*WmiInstance) GetRelatedEx

func (c *WmiInstance) GetRelatedEx(associatedClassName, resultClassName, resultRole, sourceRole string) (WmiInstanceCollection, error)

GetRelatedEx

func (*WmiInstance) GetSession added in v0.1.2

func (c *WmiInstance) GetSession() *WmiSession

func (*WmiInstance) GetSystemProperty

func (c *WmiInstance) GetSystemProperty(name string) (*WmiProperty, error)

func (*WmiInstance) GetWmiHost added in v0.1.2

func (c *WmiInstance) GetWmiHost() *host.WmiHost

func (*WmiInstance) GetWmiMethod added in v0.1.2

func (c *WmiInstance) GetWmiMethod(methodName string) (*WmiMethod, error)

func (*WmiInstance) InstancePath

func (c *WmiInstance) InstancePath() string

InstancePath

func (*WmiInstance) InvokeMethod

func (c *WmiInstance) InvokeMethod(methodName string, params ...interface{}) ([]interface{}, error)

InvokeMethod

func (*WmiInstance) InvokeMethodAsync

func (c *WmiInstance) InvokeMethodAsync(methodName string, action UserAction, percentComplete, timeoutSeconds uint32, params ...interface{}) ([]interface{}, error)

InvokeMethodAsync

func (*WmiInstance) InvokeMethodWithReturn

func (c *WmiInstance) InvokeMethodWithReturn(methodName string, params ...interface{}) (int32, error)

InvokeMethodWithReturn invokes a method with return

func (*WmiInstance) Modify

func (c *WmiInstance) Modify() error

Modify

func (*WmiInstance) Refresh

func (c *WmiInstance) Refresh() error

Refresh

func (*WmiInstance) RelativePath

func (c *WmiInstance) RelativePath() string

RelativePath

func (*WmiInstance) ResetProperty

func (c *WmiInstance) ResetProperty(name string) error

ResetProperty resets a property

func (*WmiInstance) SetProperty

func (c *WmiInstance) SetProperty(name string, value interface{}) error

SetProperty sets a value of property representation by name with value

func (*WmiInstance) String added in v0.1.5

func (c *WmiInstance) String() string

type WmiInstanceCollection

type WmiInstanceCollection []*WmiInstance

WmiInstanceCollection is a slice of WmiInstance

func GetVariantArrayAsWmiInstances

func GetVariantArrayAsWmiInstances(rawValues []ole.VARIANT, session *WmiSession) (WmiInstanceCollection, error)

func (*WmiInstanceCollection) Close added in v0.1.2

func (wmic *WmiInstanceCollection) Close()

Close all instances in a collection

func (*WmiInstanceCollection) EmbeddedXMLInstances added in v0.1.5

func (wmic *WmiInstanceCollection) EmbeddedXMLInstances() (xmls []string, err error)

type WmiJob added in v0.1.5

type WmiJob struct {
	*WmiInstance
}

func NewWmiJob added in v0.1.5

func NewWmiJob(instance *WmiInstance) (*WmiJob, error)

func (*WmiJob) GetException added in v0.1.5

func (job *WmiJob) GetException() error

func (*WmiJob) GetJobState added in v0.1.5

func (job *WmiJob) GetJobState() (js JobState)

func (*WmiJob) IsComplete added in v0.1.5

func (job *WmiJob) IsComplete() bool

func (*WmiJob) JobType added in v0.1.5

func (job *WmiJob) JobType() (value int32, err error)

GetJobType gets the value of JobType for the instance

func (*WmiJob) PercentComplete added in v0.1.5

func (job *WmiJob) PercentComplete() (uint16, error)

PercentComplete

func (*WmiJob) String added in v0.1.5

func (job *WmiJob) String() string

func (*WmiJob) WaitForAction added in v0.1.5

func (job *WmiJob) WaitForAction(action UserAction, percentComplete, timeoutSeconds uint16) error

WaitForAction waits for the task based on the action type, percent complete and timeoutSeconds

func (*WmiJob) WaitForJobCompletion added in v0.1.5

func (job *WmiJob) WaitForJobCompletion(result int32) error

func (*WmiJob) WaitForPercentComplete added in v0.1.5

func (job *WmiJob) WaitForPercentComplete(percentComplete, timeoutSeconds uint16) error

WaitForPercentComplete waits for the percentComplete or timeout

type WmiJobCollection added in v0.1.5

type WmiJobCollection []*WmiJob

func (*WmiJobCollection) Close added in v0.1.5

func (c *WmiJobCollection) Close() error

type WmiMethod added in v0.1.2

type WmiMethod struct {
	Name string
	// contains filtered or unexported fields
}

func NewWmiMethod added in v0.1.2

func NewWmiMethod(methodName string, instance *WmiInstance) (*WmiMethod, error)

NewWmiMethod

func (*WmiMethod) Close added in v0.1.2

func (c *WmiMethod) Close() error

func (*WmiMethod) Execute added in v0.1.2

func (c *WmiMethod) Execute(inParam, outParam WmiMethodParamCollection) (result *WmiMethodResult, err error)

type WmiMethodCollection added in v0.1.2

type WmiMethodCollection []*WmiMethod

func (*WmiMethodCollection) Close added in v0.1.2

func (c *WmiMethodCollection) Close() error

type WmiMethodParam added in v0.1.2

type WmiMethodParam struct {
	Name  string
	Value interface{}
}

func NewWmiMethodParam added in v0.1.2

func NewWmiMethodParam(name string, val interface{}) *WmiMethodParam

func NewWmiMethodParam(name string, val interface{}, propertyVariant *ole.VARIANT, session *WmiSession) (*WmiMethodParam, error) {

func (*WmiMethodParam) Close added in v0.1.2

func (c *WmiMethodParam) Close() error

Dispose

type WmiMethodParamCollection added in v0.1.2

type WmiMethodParamCollection []*WmiMethodParam

func (*WmiMethodParamCollection) Close added in v0.1.2

func (c *WmiMethodParamCollection) Close() error

type WmiMethodResult added in v0.1.5

type WmiMethodResult struct {
	ReturnValue     int32
	OutMethodParams map[string]*WmiMethodParam
}

type WmiProperty

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

func CreateWmiProperty

func CreateWmiProperty(propertyVariant *ole.VARIANT, session *WmiSession) (*WmiProperty, error)

func (*WmiProperty) Close

func (c *WmiProperty) Close() error

Dispose

func (*WmiProperty) Name

func (c *WmiProperty) Name() string

Name

func (*WmiProperty) Type

func (c *WmiProperty) Type() wmi.WmiType

Type

func (*WmiProperty) Value

func (c *WmiProperty) Value() interface{}

Value

type WmiQualifier

type WmiQualifier struct {
}

func (WmiQualifier) Name

func (c WmiQualifier) Name() string

Name

func (WmiQualifier) Value

func (c WmiQualifier) Value() string

Value

type WmiSession

type WmiSession struct {
	ServerName    string
	Namespace     string
	Username      string
	Password      string
	Domain        string
	WMIHost       *host.WmiHost
	Status        wmi.SessionStatus
	RawSession    *ole.VARIANT
	Session       *ole.IDispatch
	CimwmiService *ole.IDispatch
}

WmiSession struct to hold the current session information

func CreateSession

func CreateSession(CimwmiService *ole.IDispatch, wmiNamespace, serverName, domain, userName, password string) (*WmiSession, error)

CreateSession creates a new session with the server and namespace

func CreateSessionEx

func CreateSessionEx(CimwmiService *ole.IDispatch, serverName, wmiNamespace string, credentials wmi.Credentials) (*WmiSession, error)

CreateSessionEx creates a session based on credentials

func (*WmiSession) Close

func (c *WmiSession) Close()

Close the wmi session

func (*WmiSession) Connect

func (c *WmiSession) Connect() (bool, error)

Connect the wmi session

func (*WmiSession) CreateNewClass

func (c *WmiSession) CreateNewClass() (*WmiClass, error)

Tells WMI to create a new class for us

func (*WmiSession) Credentials

func (c *WmiSession) Credentials() *wmi.Credentials

Credentials

func (*WmiSession) Dispose

func (c *WmiSession) Dispose()

Dispose the wmi session

func (*WmiSession) EnumerateClasses

func (c *WmiSession) EnumerateClasses(className string) ([]*WmiClass, error)

EnumerateClasses

func (*WmiSession) EnumerateInstances

func (c *WmiSession) EnumerateInstances(className string) ([]*WmiInstance, error)

EnumerateInstances

func (*WmiSession) EnumerateReferencingInstances

func (c *WmiSession) EnumerateReferencingInstances(namespaceName string, sourceInstance WmiInstance, associationClassName, sourceRole string) (*[]WmiInstance, error)

EnumerateReferencingInstances

func (*WmiSession) ExecNotificationQuery

func (c *WmiSession) ExecNotificationQuery(query string) (*WmiSynchronousEventsList, error)

Synchronous approach to handling events Documentation: https://docs.microsoft.com/en-us/windows/win32/wmisdk/receiving-synchronous-and-semisynchronous-event-notifications

func (*WmiSession) ExecNotificationQueryAsync

func (c *WmiSession) ExecNotificationQueryAsync(eventSink *WmiEventSink, query string) (interface{}, error)

Asynchronous approach to handling events Documentation: https://docs.microsoft.com/en-us/windows/win32/wmisdk/receiving-synchronous-and-semisynchronous-event-notifications Security considerations with Asynchronous calls: https://docs.microsoft.com/en-us/windows/win32/wmisdk/making-an-asynchronous-call-with-vbscript

func (*WmiSession) GetClass

func (c *WmiSession) GetClass(classDefinition string) (*WmiClass, error)

func (*WmiSession) GetInstance

func (c *WmiSession) GetInstance(path string) (*WmiInstance, error)

GetInstance

func (*WmiSession) PerformRawQuery

func (c *WmiSession) PerformRawQuery(queryExpression string) (*ole.IEnumVARIANT, error)

func (*WmiSession) QueryClasses

func (c *WmiSession) QueryClasses(queryString string) ([]*WmiClass, error)

QueryClasses

func (*WmiSession) QueryInstances

func (c *WmiSession) QueryInstances(queryExpression string) ([]*WmiInstance, error)

QueryInstances

func (*WmiSession) QueryInstancesEx

func (c *WmiSession) QueryInstancesEx(query wmi.Query) (*[]wmi.Instance, error)

QueryInstancesEx

func (*WmiSession) TestConnection

func (c *WmiSession) TestConnection() bool

TestConnection

type WmiSessionManager

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

func NewWmiSessionManager

func NewWmiSessionManager() *WmiSessionManager

func (*WmiSessionManager) Close

func (c *WmiSessionManager) Close() error

Close

func (*WmiSessionManager) Dispose

func (c *WmiSessionManager) Dispose()

Dispose clears the WmiSessionManager

func (*WmiSessionManager) GetLocalSession

func (c *WmiSessionManager) GetLocalSession(wmiNamespace string) (*WmiSession, error)

GetLocalSession

func (*WmiSessionManager) GetSession

func (c *WmiSessionManager) GetSession(wmiNamespace, serverName, domain, userName, password string) (*WmiSession, error)

GetSession

type WmiSynchronousEventsList

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

func CreateWmiSynchronousEventsList

func CreateWmiSynchronousEventsList(instanceVar *ole.VARIANT, session *WmiSession) *WmiSynchronousEventsList

func (*WmiSynchronousEventsList) Close

func (c *WmiSynchronousEventsList) Close()

func (*WmiSynchronousEventsList) WaitForNextEvent

func (c *WmiSynchronousEventsList) WaitForNextEvent() (*WmiInstance, error)

func (*WmiSynchronousEventsList) WaitForNextEventUntil

func (c *WmiSynchronousEventsList) WaitForNextEventUntil(timeout int32) (*WmiInstance, error)

Jump to

Keyboard shortcuts

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