Documentation ¶
Overview ¶
The wmi package implements the WMI client protocol.
Introduction ¶
Windows Management Instrumentation (WMI) Remote Protocol is a Distributed Component Object Model (DCOM), as specified in [MS-DCOM], a client/server–based framework that provides an open and automated means of systems management. WMI leverages the Common Information Model (CIM), as specified in [DMTF-DSP0004], to represent various components of the operating system. CIM is the conceptual model for storing enterprise management information. The information available from CIM is specified by a series of classes and associations, and the elements contained in them (methods, properties, and references). These constructs describe the data available to WMI clients.
Overview ¶
The Windows Management Instrumentation (WMI) Remote Protocol is used to communicate management data conforming to Common Information Model (CIM), as specified in [DMTF-DSP0004]. The Windows Management Instrumentation Remote Protocol uses CIM as the conceptual model for representing enterprise management information that can be managed by an administrator. However WMI is not fully compliant with [DMTF-DSP0004]. The exceptions are documented where applicable in the WMI Remote Protocol.
The Windows Management Instrumentation Remote Protocol is implemented as a three-tier architecture, as illustrated in the following figure.
Index ¶
- Variables
- func ReadClassID(r *wmio.Codec) (*dcom.ClassID, error)
- type BackupRestore
- type BackupRestoreEx
- type BackupRestoreFlags
- type CallResult
- type ChangeFlagType
- type ClassObject
- type ConnectOptions
- type Context
- type DataPacketObject
- type EnumClassObject
- type FetchSmartEnum
- type GenericFlagType
- type InstanceBlobType
- type Level1Login
- type LoginClientID
- type LoginHelper
- type ObjectArray
- type ObjectSink
- type QueryFlagType
- type ReconnectInfo
- type ReconnectResults
- type ReconnectType
- type RefreshInfo
- type RefreshInfoNonHiPerf
- type RefreshInfoRemote
- type RefreshInfoUnion
- type RefreshInfoUnion_Hres
- type RefreshInfoUnion_NonHiPerf
- type RefreshInfoUnion_Remote
- type RefreshType
- type RefreshedObject
- type RefresherID
- type RefresherVersionNumber
- type RefreshingServices
- type RemoteRefresher
- type Services
- type Status
- type StatusType
- type TimeoutType
- type WCOSmartEnum
Constants ¶
This section is empty.
Variables ¶
var ( // 4590F812-1D3A-11D0-891F-00AA004B2E24 ClassObjectUnmarshalClassID = &dcom.ClassID{Data1: 0x4590F812, Data2: 0x1D3A, Data3: 0x11D0, Data4: []byte{0x89, 0x1F, 0x00, 0xAA, 0x00, 0x4B, 0x2E, 0x24}} // 674B6698-EE92-11D0-AD71-00C04FD8FDFF ContextUnmarshalClassID = &dcom.ClassID{Data1: 0x674B6698, Data2: 0xEE92, Data3: 0x11D0, Data4: []byte{0xAD, 0x71, 0x00, 0xC0, 0x4F, 0xD8, 0xFD, 0xFF}} )
var BackupRestoreClassID = &dcom.ClassID{Data1: 0xc49e32c6, Data2: 0xbc8b, Data3: 0x11d2, Data4: []byte{0x85, 0xd4, 0x00, 0x10, 0x5a, 0x1f, 0x83, 0x04}}
WbemBackupRestore class identifier c49e32c6-bc8b-11d2-85d4-00105a1f8304
var ClassObjectClassID = &dcom.ClassID{Data1: 0x9a653086, Data2: 0x174f, Data3: 0x11d2, Data4: []byte{0xb5, 0xf9, 0x00, 0x10, 0x4b, 0x70, 0x3e, 0xfd}}
WbemClassObject class identifier 9a653086-174f-11d2-b5f9-00104b703efd
var ContextClassID = &dcom.ClassID{Data1: 0x674b6698, Data2: 0xee92, Data3: 0x11d0, Data4: []byte{0xad, 0x71, 0x00, 0xc0, 0x4f, 0xd8, 0xfd, 0xff}}
WbemContext class identifier 674b6698-ee92-11d0-ad71-00c04fd8fdff
var (
// import guard
GoPackage = "dcom/wmi"
)
var Level1LoginClassID = &dcom.ClassID{Data1: 0x8bc3f05e, Data2: 0xd86b, Data3: 0x11d0, Data4: []byte{0xa0, 0x75, 0x00, 0xc0, 0x4f, 0xb6, 0x88, 0x20}}
WbemLevel1Login class identifier 8bc3f05e-d86b-11d0-a075-00c04fb68820
Functions ¶
Types ¶
type BackupRestore ¶
type BackupRestore dcom.InterfacePointer
BackupRestore structure represents IWbemBackupRestore RPC structure.
func (*BackupRestore) InterfacePointer ¶
func (o *BackupRestore) InterfacePointer() *dcom.InterfacePointer
func (*BackupRestore) MarshalNDR ¶
func (*BackupRestore) NDRSizeInfo ¶
func (o *BackupRestore) NDRSizeInfo() []uint64
func (*BackupRestore) UnmarshalNDR ¶
type BackupRestoreEx ¶
type BackupRestoreEx dcom.InterfacePointer
BackupRestoreEx structure represents IWbemBackupRestoreEx RPC structure.
func (*BackupRestoreEx) InterfacePointer ¶
func (o *BackupRestoreEx) InterfacePointer() *dcom.InterfacePointer
func (*BackupRestoreEx) MarshalNDR ¶
func (*BackupRestoreEx) NDRSizeInfo ¶
func (o *BackupRestoreEx) NDRSizeInfo() []uint64
func (*BackupRestoreEx) UnmarshalNDR ¶
type BackupRestoreFlags ¶
type BackupRestoreFlags uint32
BackupRestoreFlags type represents WBEM_BACKUP_RESTORE_FLAGS RPC enumeration.
The WBEM_BACKUP_RESTORE_FLAGS enumeration gives information about the backup and restore state of the process.
var ( // WBEM_FLAG_BACKUP_RESTORE_FORCE_SHUTDOWN: While the CIM database is being restored, // any clients connected to WMI are forcibly disconnected. BackupRestoreFlagsFlagBackupRestoreForceShutdown BackupRestoreFlags = 1 )
func (BackupRestoreFlags) String ¶
func (o BackupRestoreFlags) String() string
type CallResult ¶
type CallResult dcom.InterfacePointer
CallResult structure represents IWbemCallResult RPC structure.
func (*CallResult) InterfacePointer ¶
func (o *CallResult) InterfacePointer() *dcom.InterfacePointer
func (*CallResult) MarshalNDR ¶
func (*CallResult) NDRSizeInfo ¶
func (o *CallResult) NDRSizeInfo() []uint64
func (*CallResult) UnmarshalNDR ¶
type ChangeFlagType ¶
type ChangeFlagType uint32
ChangeFlagType type represents WBEM_CHANGE_FLAG_TYPE RPC enumeration.
The WBEM_CHANGE_FLAG_TYPE enumeration is used to indicate and update the type of the flag.
var ( // WBEM_FLAG_CREATE_OR_UPDATE: This flag causes the put operation to update the class // or instance if it does not exist, or to overwrite the class or instance if it exists // already. ChangeFlagTypeCreateOrUpdate ChangeFlagType = 0 // WBEM_FLAG_UPDATE_ONLY: This flag causes the put operation to update the class or // instance. The class or instance MUST exist for the call to be successful. ChangeFlagTypeUpdateOnly ChangeFlagType = 1 // WBEM_FLAG_CREATE_ONLY: This flag causes the put operation to create the class or // instance. For the call to be successful, the class or instance MUST NOT exist. ChangeFlagTypeCreateOnly ChangeFlagType = 2 // WBEM_FLAG_UPDATE_SAFE_MODE: This flag allows updates of classes even if there are // child classes, as long as the change does not cause any conflicts with child classes. // An example of an update that this flag allows is the adding of a new property to // the base class that was not previously mentioned in any of the child classes. If // the class has instances, the update fails. ChangeFlagTypeUpdateSafeMode ChangeFlagType = 32 // WBEM_FLAG_UPDATE_FORCE_MODE: This flag forces updates of classes when conflicting // child classes exist. An example of an update that this flag forces is when a class // qualifier is defined in a child class and the base class tries to add the same qualifier // that conflicted with the existing one. In force mode, this conflict is resolved by // deleting the conflicting qualifier in the child class. ChangeFlagTypeUpdateForceMode ChangeFlagType = 64 )
func (ChangeFlagType) String ¶
func (o ChangeFlagType) String() string
type ClassObject ¶
type ClassObject dcom.InterfacePointer
ClassObject structure represents IWbemClassObject RPC structure.
func (*ClassObject) InterfacePointer ¶
func (o *ClassObject) InterfacePointer() *dcom.InterfacePointer
func (*ClassObject) MarshalNDR ¶
func (*ClassObject) NDRSizeInfo ¶
func (o *ClassObject) NDRSizeInfo() []uint64
func (*ClassObject) UnmarshalNDR ¶
type ConnectOptions ¶
type ConnectOptions uint32
ConnectOptions type represents WBEM_CONNECT_OPTIONS RPC enumeration.
The WBEM_CONNECT_OPTIONS enumeration gives information about the type of options of the connection.
var ( // WBEM_FLAG_CONNECT_REPOSITORY_ONLY: Reserved for local use. ConnectOptionsFlagConnectRepositoryOnly ConnectOptions = 64 // WBEM_FLAG_CONNECT_PROVIDERS: Reserved for local use.<2> ConnectOptionsFlagConnectProviders ConnectOptions = 256 )
func (ConnectOptions) String ¶
func (o ConnectOptions) String() string
type Context ¶
type Context dcom.InterfacePointer
Context structure represents IWbemContext RPC structure.
func (*Context) InterfacePointer ¶
func (o *Context) InterfacePointer() *dcom.InterfacePointer
func (*Context) NDRSizeInfo ¶
type DataPacketObject ¶ added in v1.0.1
type DataPacketObject struct { // dwSizeOfHeader (4 bytes): The size, in bytes, of the // WBEM_DATAPACKET_OBJECT header, which MUST be 0x00000009. SizeOfHeader uint32 // dwSizeOfData (4 bytes): The size, in bytes, of the data // following the WBEM_DATAPACKET_OBJECT header. SizeOfData uint32 // bObjectType (1 byte): The type of data in the data packet. // The type MUST take one of the following specified values. // // * 1: // Object is type WBEMOBJECT_CLASS: // Structure contains the complete CIM Class definition. // * 2: // Object is type WBEMOBJECT_INSTANCE: // Structure contains the complete CIM Instance definition. // * 3: // Object is type WBEMOBJECT_INSTANCE_NOCLASS. // Structure contains CIM Instance without the CIM Class definition. ObjectType uint8 // dwSizeOfHeader (4 bytes): The size, in bytes, of the header, which // MUST be 0x00000008 for WBEMOBJECT_CLASS and 0x00000018 for WBEMOBJECT_INSTANCE, // and WBEMOBJECT_INSTANCE_NOCLASS. SizeOfHeader2 uint32 // dwSizeOfData (4 bytes): The size, in bytes, of the data that follows the /// header. SizeOfData2 uint32 // classID (16 bytes): The unique identifier of the CIM class type. ClassID *dcom.ClassID // Object (variable): The CIM object carried into the // WBEM_DATAPACKET_OBJECT, having dwSizeOfData bytes. The embedded CIM // object MUST match the selector field bObjectType. Object *wmio.Object }
The WBEM_DATAPACKET_OBJECT MUST contain the CIM class definition and CIM instances.
type EnumClassObject ¶
type EnumClassObject dcom.InterfacePointer
EnumClassObject structure represents IEnumWbemClassObject RPC structure.
func (*EnumClassObject) InterfacePointer ¶
func (o *EnumClassObject) InterfacePointer() *dcom.InterfacePointer
func (*EnumClassObject) MarshalNDR ¶
func (*EnumClassObject) NDRSizeInfo ¶
func (o *EnumClassObject) NDRSizeInfo() []uint64
func (*EnumClassObject) UnmarshalNDR ¶
type FetchSmartEnum ¶
type FetchSmartEnum dcom.InterfacePointer
FetchSmartEnum structure represents IWbemFetchSmartEnum RPC structure.
func (*FetchSmartEnum) InterfacePointer ¶
func (o *FetchSmartEnum) InterfacePointer() *dcom.InterfacePointer
func (*FetchSmartEnum) MarshalNDR ¶
func (*FetchSmartEnum) NDRSizeInfo ¶
func (o *FetchSmartEnum) NDRSizeInfo() []uint64
func (*FetchSmartEnum) UnmarshalNDR ¶
type GenericFlagType ¶
type GenericFlagType uint32
GenericFlagType type represents WBEM_GENERIC_FLAG_TYPE RPC enumeration.
The WBEM_GENERIC_FLAG_TYPE enumeration is used to indicate and update the type of the flag.
var ( // WBEM_FLAG_RETURN_WBEM_COMPLETE: This flag makes the operation synchronous. This // is the default behavior and so this flag need not be explicitly specified. GenericFlagTypeReturnWBEMComplete GenericFlagType = 0 // WBEM_FLAG_RETURN_IMMEDIATELY: This flag causes the call to return without waiting // for the operation to complete. The call result parameter contains the IWbemCallResult // object by using the status of the operation that can be retrieved. GenericFlagTypeReturnImmediately GenericFlagType = 16 // WBEM_FLAG_FORWARD_ONLY: This flag causes a forward-only enumerator, IEnumWbemClassObject, // (section 3.1.4.4), to be returned. Forward-only enumerators are typically much faster // and use less memory than conventional enumerators; however, they do not allow calls // to IEnumWbemClassObject::Clone or IEnumWbemClassObject::Reset. GenericFlagTypeForwardOnly GenericFlagType = 32 // WBEM_FLAG_NO_ERROR_OBJECT: This flag MUST NOT be set, and MUST be ignored on receipt. GenericFlagTypeNoErrorObject GenericFlagType = 64 // WBEM_FLAG_SEND_STATUS: This flag registers a request with WMI to receive intermediate // status reports through the client implementation of IWbemObjectSink::SetStatus, if // supported by the server implementation. GenericFlagTypeSendStatus GenericFlagType = 128 // WBEM_FLAG_ENSURE_LOCATABLE: This flag ensures that any returned objects have enough // information in them so that system properties, such as __PATH, __RELPATH, and __SERVER,<1> // are non-NULL. GenericFlagTypeEnsureLocatable GenericFlagType = 256 // WBEM_FLAG_DIRECT_READ: This flag causes direct access to the specified class without // regard to its parent class or subclasses. GenericFlagTypeDirectRead GenericFlagType = 512 // WBEM_MASK_RESERVED_FLAGS: This flag MUST NOT be set, and MUST be ignored on receipt. GenericFlagTypeMaskReservedFlags GenericFlagType = 126976 // WBEM_FLAG_USE_AMENDED_QUALIFIERS: If this flag is set, the server retrieves any // qualifiers in the CIM object that can be localized in the current connection's locale. // The set of localized qualifiers and the list of locales for which the qualifier is // localized are implementation dependent. When the localized information is available, // the server retrieves the localized values using the client-preferred locale. If the // localized values are not available, the server returns values using the default locale. // // The localized qualifiers or amended qualifiers are identified by the qualifier flavor // as defined in [MS-WMIO] section 2.2.62. GenericFlagTypeUseAmendedQualifiers GenericFlagType = 131072 // WBEM_FLAG_STRONG_VALIDATION: This flag MUST NOT be set, and MUST be ignored on // receipt. GenericFlagTypeStrongValidation GenericFlagType = 1048576 )
func (GenericFlagType) String ¶
func (o GenericFlagType) String() string
type InstanceBlobType ¶
type InstanceBlobType uint32
InstanceBlobType type represents WBEM_INSTANCE_BLOB_TYPE RPC enumeration.
The WBEM_INSTANCE_BLOB_TYPE enumeration is used to indicate the type of a CIM object.
var ( // WBEM_BLOB_TYPE_ALL: The object is a single CIM object. InstanceBlobTypeAll InstanceBlobType = 2 // WBEM_BLOB_TYPE_ERROR: Represents an error condition. In this case the object is // NULL. InstanceBlobTypeError InstanceBlobType = 3 // WBEM_BLOB_TYPE_ENUM: The object is an enumeration of objects of a specific CIM // type. InstanceBlobTypeEnum InstanceBlobType = 4 )
func (InstanceBlobType) String ¶
func (o InstanceBlobType) String() string
type Level1Login ¶
type Level1Login dcom.InterfacePointer
Level1Login structure represents IWbemLevel1Login RPC structure.
func (*Level1Login) InterfacePointer ¶
func (o *Level1Login) InterfacePointer() *dcom.InterfacePointer
func (*Level1Login) MarshalNDR ¶
func (*Level1Login) NDRSizeInfo ¶
func (o *Level1Login) NDRSizeInfo() []uint64
func (*Level1Login) UnmarshalNDR ¶
type LoginClientID ¶
type LoginClientID dcom.InterfacePointer
LoginClientID structure represents IWbemLoginClientID RPC structure.
func (*LoginClientID) InterfacePointer ¶
func (o *LoginClientID) InterfacePointer() *dcom.InterfacePointer
func (*LoginClientID) MarshalNDR ¶
func (*LoginClientID) NDRSizeInfo ¶
func (o *LoginClientID) NDRSizeInfo() []uint64
func (*LoginClientID) UnmarshalNDR ¶
type LoginHelper ¶
type LoginHelper dcom.InterfacePointer
LoginHelper structure represents IWbemLoginHelper RPC structure.
func (*LoginHelper) InterfacePointer ¶
func (o *LoginHelper) InterfacePointer() *dcom.InterfacePointer
func (*LoginHelper) MarshalNDR ¶
func (*LoginHelper) NDRSizeInfo ¶
func (o *LoginHelper) NDRSizeInfo() []uint64
func (*LoginHelper) UnmarshalNDR ¶
type ObjectArray ¶ added in v1.0.1
type ObjectArray struct { // dwByteOrdering (4 bytes): The byte ordering. It MUST be value 0. ByteOrdering uint32 // abSignature (8 bytes): MUST be set to {0x57, 0x42, 0x45, 0x4D, // 0x44, 0x41, 0x54, 0x41} (a byte array containing the unquoted, // unterminated ASCII string "WBEMDATA"). Signature []byte // dwSizeOfHeader1 (4 bytes): This stores the total size of these // fields: dwByteOrdering, abSignature, dwSizeofHeader1, dwDataSize1, // dwFlags, bVersion, and bPacketType. // The size of the header MUST be 0x0000001A. Data immediately follows // the header. SizeOfHeader1 uint32 // dwDataSize1 (4 bytes): MUST indicate the length, in bytes, of the // data that follows this header, starting at the dwSizeOfHeader2 field. DataSize1 uint32 // dwFlags (4 bytes): The flag value MUST be 0x00000000. Flags uint32 // bVersion (1 byte): The version number of the header. The version MUST be 1. Version uint8 // bPacketType (1 byte): The value of this field is dependent on the call // context. PacketType uint8 // dwSizeOfHeader2 (4 bytes): This stores the size of these fields: // dwSizeofHeader2 and dwDataSize2. // This value MUST be 8. Data immediately follows after the field dwDataSize2. SizeOfHeader2 uint32 // dwDataSize2 (4 bytes): MUST be the size, in bytes, of the data that follows // this field. DataSize2 uint32 // dwSizeOfHeader3 (4 bytes): This stores the size of these fields: // dwSizeofHeader3, dwDataSize3, and dwNumObjects. This value MUST be 12. // Data immediately follows after the field dwNumObjects. SizeOfHeader3 uint32 // dwDataSize3 (4 bytes): MUST indicate the length of the remaining data, // starting at the wbemObjects field. DataSize3 uint32 // dwNumObjects (4 bytes): MUST be the number of CIM objects in the // ObjectArray. NumObjects uint32 // wbemObjects (variable): The objects array that contains the CIM class // definition and CIM instances. These CIM objects MUST be encoded // in the WBEM_DATAPACKET_OBJECT structure. Objects []*DataPacketObject }
The ObjectArray structure MUST be used to encode multiple CIM objects that are returned in response to the IWbemWCOSmartEnum::Next method. This structure is also used to encode parameters of the optimized IWbemObjectSink::Indicate method.<6> To minimize network bandwidth, a server SHOULD support the ObjectArray structure when an array of CIM objects is sent.
func UnmarshalObjectArrayWithClass ¶ added in v1.0.1
func UnmarshalObjectArrayWithClass(b []byte, cls wmio.Class) (*ObjectArray, error)
func (*ObjectArray) DecodeWithClass ¶ added in v1.0.1
type ObjectSink ¶
type ObjectSink dcom.InterfacePointer
ObjectSink structure represents IWbemObjectSink RPC structure.
func (*ObjectSink) InterfacePointer ¶
func (o *ObjectSink) InterfacePointer() *dcom.InterfacePointer
func (*ObjectSink) MarshalNDR ¶
func (*ObjectSink) NDRSizeInfo ¶
func (o *ObjectSink) NDRSizeInfo() []uint64
func (*ObjectSink) UnmarshalNDR ¶
type QueryFlagType ¶
type QueryFlagType uint32
QueryFlagType type represents WBEM_QUERY_FLAG_TYPE RPC enumeration.
The WBEM_QUERY_FLAG_TYPE enumeration gives information about the type of the flag.
var ( // WBEM_FLAG_DEEP: If used in IWbemServices::CreateClassEnum or IWbemServices::CreateClassEnumAsync, // the WBEM_FLAG_DEEP constant causes the enumeration to return all the subclasses in // the hierarchy of a specified class but to not return the class itself. QueryFlagTypeDeep QueryFlagType = 0 // WBEM_FLAG_SHALLOW: If used in IWbemServices::CreateClassEnum or IWbemServices::CreateClassEnumAsync, // the WBEM_FLAG_SHALLOW constant causes the enumeration to return the immediate subclasses // of a specified class. QueryFlagTypeShallow QueryFlagType = 1 // WBEM_FLAG_PROTOTYPE: This flag is used for prototyping. It does not run the query; // instead, it returns the Prototype Result Object as specified in section 2.2.4.1. QueryFlagTypePrototype QueryFlagType = 2 )
func (QueryFlagType) String ¶
func (o QueryFlagType) String() string
type ReconnectInfo ¶
type ReconnectInfo struct { Type int32 `idl:"name:m_lType" json:"type"` Path string `idl:"name:m_pwcsPath;string" json:"path"` }
ReconnectInfo structure represents _WBEM_RECONNECT_INFO RPC structure.
func (*ReconnectInfo) MarshalNDR ¶
func (*ReconnectInfo) UnmarshalNDR ¶
type ReconnectResults ¶
type ReconnectResults struct { ID int32 `idl:"name:m_lId" json:"id"` HResult int32 `idl:"name:m_hr" json:"hresult"` }
ReconnectResults structure represents _WBEM_RECONNECT_RESULTS RPC structure.
func (*ReconnectResults) MarshalNDR ¶
func (*ReconnectResults) UnmarshalNDR ¶
type ReconnectType ¶
type ReconnectType uint16
ReconnectType type represents WBEM_RECONNECT_TYPE RPC enumeration.
The _WBEM_RECONNECT_TYPE enumeration defines possible types of remote CIM instances. The structure MUST be used to return to information from IWbemRefreshingServices (section 3.1.4.12) interface methods.
var ( // WBEM_RECONNECT_TYPE_OBJECT: The refresher MUST connect to refresh an object. ReconnectTypeObject ReconnectType = 0 // WBEM_RECONNECT_TYPE_ENUM: The refresher MUST connect to refresh an enumeration. ReconnectTypeEnum ReconnectType = 1 // WBEM_RECONNECT_TYPE_LAST: This member is used only by the server to track the range // of values for this enumeration. It MUST NOT be used by the client. ReconnectTypeLast ReconnectType = 2 )
func (ReconnectType) String ¶
func (o ReconnectType) String() string
type RefreshInfo ¶
type RefreshInfo struct { Type int32 `idl:"name:m_lType" json:"type"` Info *RefreshInfoUnion `idl:"name:m_Info;switch_is:m_lType" json:"info"` CancelID int32 `idl:"name:m_lCancelId" json:"cancel_id"` }
RefreshInfo structure represents _WBEM_REFRESH_INFO RPC structure.
func (*RefreshInfo) MarshalNDR ¶
func (*RefreshInfo) UnmarshalNDR ¶
type RefreshInfoNonHiPerf ¶
type RefreshInfoNonHiPerf struct { Namespace string `idl:"name:m_wszNamespace;string" json:"namespace"` Template *ClassObject `idl:"name:m_pTemplate" json:"template"` }
RefreshInfoNonHiPerf structure represents _WBEM_REFRESH_INFO_NON_HIPERF RPC structure.
func (*RefreshInfoNonHiPerf) MarshalNDR ¶
func (*RefreshInfoNonHiPerf) UnmarshalNDR ¶
type RefreshInfoRemote ¶
type RefreshInfoRemote struct { Refresher *RemoteRefresher `idl:"name:m_pRefresher" json:"refresher"` Template *ClassObject `idl:"name:m_pTemplate" json:"template"` GUID *dtyp.GUID `idl:"name:m_Guid" json:"guid"` }
RefreshInfoRemote structure represents _WBEM_REFRESH_INFO_REMOTE RPC structure.
func (*RefreshInfoRemote) MarshalNDR ¶
func (*RefreshInfoRemote) UnmarshalNDR ¶
type RefreshInfoUnion ¶
type RefreshInfoUnion struct { // Types that are assignable to Value // // *RefreshInfoUnion_Remote // *RefreshInfoUnion_NonHiPerf // *RefreshInfoUnion_Hres Value is_RefreshInfoUnion `json:"value"` }
RefreshInfoUnion structure represents WBEM_REFRESH_INFO_UNION RPC union.
The _WBEM_REFRESH_INFO_UNION union defines a union of one of the following types: m_Remote, m_NonHiPerf, or m_hres.
func (*RefreshInfoUnion) GetValue ¶
func (o *RefreshInfoUnion) GetValue() any
func (*RefreshInfoUnion) MarshalUnionNDR ¶
func (*RefreshInfoUnion) NDRSwitchValue ¶
func (o *RefreshInfoUnion) NDRSwitchValue(sw int32) int32
func (*RefreshInfoUnion) UnmarshalUnionNDR ¶
type RefreshInfoUnion_Hres ¶
type RefreshInfoUnion_Hres struct { // m_hres: An m_hres HRESULT type. Hres int32 `idl:"name:m_hres" json:"hres"` }
RefreshInfoUnion_Hres structure represents WBEM_REFRESH_INFO_UNION RPC union arm.
It has following labels: 0
func (*RefreshInfoUnion_Hres) MarshalNDR ¶
func (*RefreshInfoUnion_Hres) UnmarshalNDR ¶
type RefreshInfoUnion_NonHiPerf ¶
type RefreshInfoUnion_NonHiPerf struct { // m_NonHiPerf: An m_NonHiPerf _WBEM_REFRESH_INFO_NON_HIPERF type. NonHiPerf *RefreshInfoNonHiPerf `idl:"name:m_NonHiPerf" json:"non_hi_perf"` }
RefreshInfoUnion_NonHiPerf structure represents WBEM_REFRESH_INFO_UNION RPC union arm.
It has following labels: 6
func (*RefreshInfoUnion_NonHiPerf) MarshalNDR ¶
func (*RefreshInfoUnion_NonHiPerf) UnmarshalNDR ¶
type RefreshInfoUnion_Remote ¶
type RefreshInfoUnion_Remote struct { // m_Remote: An m_Remote _WBEM_REFRESH_INFO_REMOTE type. Remote *RefreshInfoRemote `idl:"name:m_Remote" json:"remote"` }
RefreshInfoUnion_Remote structure represents WBEM_REFRESH_INFO_UNION RPC union arm.
It has following labels: 3
func (*RefreshInfoUnion_Remote) MarshalNDR ¶
func (*RefreshInfoUnion_Remote) UnmarshalNDR ¶
type RefreshType ¶
type RefreshType uint16
RefreshType type represents WBEM_REFRESH_TYPE RPC enumeration.
The WBEM_REFRESH_TYPE enumeration defines refresh types for the _WBEM_REFRESH_INFO structure.
var ( // WBEM_REFRESH_TYPE_INVALID: The server uses this value internally. The server MUST // NOT return this value. RefreshTypeInvalid RefreshType = 0 // WBEM_REFRESH_TYPE_REMOTE: The m_Info member of the _WBEM_REFRESH_INFO structure // contains the _WBEM_REFRESH_INFO_REMOTE structure. RefreshTypeRemote RefreshType = 3 // WBEM_REFRESH_TYPE_NON_HIPERF: The m_Info member of the _WBEM_REFRESH_INFO structure // contains the _WBEM_REFRESH_INFO_NON_HIPERF structure. RefreshTypeNonHiPerf RefreshType = 6 )
func (RefreshType) String ¶
func (o RefreshType) String() string
type RefreshedObject ¶
type RefreshedObject struct { // m_lRequestId: MUST contain the request ID. RequestID int32 `idl:"name:m_lRequestId" json:"request_id"` // m_lBlobType: MUST represent the type of the CIM object that is encoded in m_pbBlob // as specified in 2.2.17. BlobType InstanceBlobType `idl:"name:m_lBlobType" json:"blob_type"` // m_lBlobLength: MUST represent the length of the m_pbBlob array. BlobLength int32 `idl:"name:m_lBlobLength" json:"blob_length"` Blob []byte `idl:"name:m_pbBlob;size_is:(m_lBlobLength)" json:"blob"` }
RefreshedObject structure represents WBEM_REFRESHED_OBJECT RPC structure.
The WBEM_REFRESHED_OBJECT structure MUST be used to encode the results of the remote refreshing service that is returned by the IWbemRemoteRefresher::RemoteRefresh (section 3.1.4.13.1) interface method.
func (*RefreshedObject) MarshalNDR ¶
func (*RefreshedObject) UnmarshalNDR ¶
type RefresherID ¶
type RefresherID struct { MachineName string `idl:"name:m_szMachineName;string" json:"machine_name"` ProcessID uint32 `idl:"name:m_dwProcessId" json:"process_id"` RefresherID *dtyp.GUID `idl:"name:m_guidRefresherId" json:"refresher_id"` }
RefresherID structure represents _WBEM_REFRESHER_ID RPC structure.
func (*RefresherID) MarshalNDR ¶
func (*RefresherID) UnmarshalNDR ¶
type RefresherVersionNumber ¶
type RefresherVersionNumber uint16
RefresherVersionNumber type represents WBEM_REFR_VERSION_NUMBER RPC enumeration.
var (
RefresherVersionNumberVersion RefresherVersionNumber = 2
)
func (RefresherVersionNumber) String ¶
func (o RefresherVersionNumber) String() string
type RefreshingServices ¶
type RefreshingServices dcom.InterfacePointer
RefreshingServices structure represents IWbemRefreshingServices RPC structure.
func (*RefreshingServices) InterfacePointer ¶
func (o *RefreshingServices) InterfacePointer() *dcom.InterfacePointer
func (*RefreshingServices) MarshalNDR ¶
func (*RefreshingServices) NDRSizeInfo ¶
func (o *RefreshingServices) NDRSizeInfo() []uint64
func (*RefreshingServices) UnmarshalNDR ¶
type RemoteRefresher ¶
type RemoteRefresher dcom.InterfacePointer
RemoteRefresher structure represents IWbemRemoteRefresher RPC structure.
func (*RemoteRefresher) InterfacePointer ¶
func (o *RemoteRefresher) InterfacePointer() *dcom.InterfacePointer
func (*RemoteRefresher) MarshalNDR ¶
func (*RemoteRefresher) NDRSizeInfo ¶
func (o *RemoteRefresher) NDRSizeInfo() []uint64
func (*RemoteRefresher) UnmarshalNDR ¶
type Services ¶
type Services dcom.InterfacePointer
Services structure represents IWbemServices RPC structure.
func (*Services) InterfacePointer ¶
func (o *Services) InterfacePointer() *dcom.InterfacePointer
func (*Services) MarshalNDR ¶
func (*Services) NDRSizeInfo ¶
type Status ¶
type Status uint32
Status type represents WBEMSTATUS RPC enumeration.
The WBEMSTATUS enumeration gives information about the status of an operation. If the server encounters an error condition for which this protocol does not explicitly state an error value, the server can return any HRESULT to indicate failure by setting the Severity (S bit) of the HRESULT, as defined in [MS-ERREF] section 2.1.
The statuses of operations that are not explicitly called out in this document but are part of the associated IDL are deemed to be local-only and are implementation-specific.
var ( // WBEM_S_NO_ERROR: The operation completed successfully. StatusNoError Status = 0 // WBEM_S_FALSE: Either no more CIM objects are available, the number of returned // CIM objects is less than the number requested, or this is the end of an enumeration. // This error code is returned from the IEnumWbemClassObject and IWbemWCOSmartEnum interface // methods. StatusFalse Status = 1 // WBEM_S_TIMEDOUT: The attempt to establish the connection has expired. StatusTimedout Status = 262148 // WBEM_S_NEW_STYLE: The server supports ObjectArray encoding; see section 3.1.4.2.1 // for details. StatusNewStyle Status = 262399 // WBEM_S_PARTIAL_RESULTS: The server could not return all the objects and/or properties // requested. StatusPartialResults Status = 262160 // WBEM_E_FAILED: The server has encountered an unknown error while processing the // client's request. StatusFailed Status = 2147749889 // WBEM_E_NOT_FOUND: The object specified in the path does not exist. StatusNotFound Status = 2147749890 // WBEM_E_ACCESS_DENIED: The permission required to perform the operation is not helped // by the security principal performing the operation. StatusAccessDenied Status = 2147749891 // WBEM_E_PROVIDER_FAILURE: The server has encountered an unknown error while processing // the client's request. StatusProviderFailure Status = 2147749892 // WBEM_E_TYPE_MISMATCH: The server has found an incorrect data type associated with // property or input parameter in client's request. StatusTypeMismatch Status = 2147749893 // WBEM_E_OUT_OF_MEMORY: The server ran out of memory before completing the operation. StatusOutOfMemory Status = 2147749894 // WBEM_E_INVALID_CONTEXT: The IWbemContext object sent as part of client's request // does not contain the required properties. StatusInvalidContext Status = 2147749895 // WBEM_E_INVALID_PARAMETER: One or more of the parameters passed to the method is // not valid. Methods return this error in any of the following circumstances: (1) a // parameter is NULL where a non-NULL value is required, (2) the flags specified in // the lFlags parameter are not allowed in this method. StatusInvalidParameter Status = 2147749896 // WBEM_E_NOT_AVAILABLE: The resource is unavailable. StatusNotAvailable Status = 2147749897 // WBEM_E_CRITICAL_ERROR : The server has encountered a catastrophic failure and cannot // process any client's request. StatusCriticalError Status = 2147749898 // WBEM_E_NOT_SUPPORTED: The attempted operation is not supported. StatusNotSupported Status = 2147749900 // WBEM_E_PROVIDER_NOT_FOUND: The server has encountered an implementation-specific // error. StatusProviderNotFound Status = 2147749905 // WBEM_E_INVALID_PROVIDER_REGISTRATION: The server has encountered an implementation-specific // error. StatusInvalidProviderRegistration Status = 2147749906 // WBEM_E_PROVIDER_LOAD_FAILURE: The server has encountered an implementation-specific // error. StatusProviderLoadFailure Status = 2147749907 // WBEM_E_INITIALIZATION_FAILURE: The server has encountered failure during its initialization. StatusInitializationFailure Status = 2147749908 // WBEM_E_TRANSPORT_FAILURE: There is a network problem detected in reaching the server. StatusTransportFailure Status = 2147749909 // WBEM_E_INVALID_OPERATION: The operation performed is not valid. StatusInvalidOperation Status = 2147749910 // WBEM_E_ALREADY_EXISTS: When a Put method is called for a CIM object with the flag // WBEM_FLAG_CREATE_ONLY and the object already exists, WBEM_E_ALREADY_EXISTS is returned. StatusAlreadyExists Status = 2147749913 // WBEM_E_UNEXPECTED: An unspecified error has occurred. StatusUnexpected Status = 2147749917 // WBEM_E_INCOMPLETE_CLASS: The object passed doesn't correspond to any of classes // registered with WMI. StatusIncompleteClass Status = 2147749920 // WBEM_E_SHUTTING_DOWN: The server cannot process the requested operation as it is // shutting down. StatusShuttingDown Status = 2147749939 // E_NOTIMPL: The attempted operation is not implemented. The value of this element // is as specified in [MS-ERREF] section 2.1. StatusNotimpl Status = 2147500033 // WBEM_E_INVALID_SUPERCLASS: When putting a class, the server did not find the parent // class specified for the new class to be added. StatusInvalidSuperclass Status = 2147749901 // WBEM_E_INVALID_NAMESPACE: When connecting to WMI, the namespace specified is not // found. StatusInvalidNamespace Status = 2147749902 // WBEM_E_INVALID_OBJECT: The CIM instance passed to the server doesn't have required // information. StatusInvalidObject Status = 2147749903 // WBEM_E_INVALID_CLASS: The class name is invalid. StatusInvalidClass Status = 2147749904 // WBEM_E_INVALID_QUERY: The query sent to the server doesn't semantically conform // to the rules specified in section 2.2.1. StatusInvalidQuery Status = 2147749911 // WBEM_E_INVALID_QUERY_TYPE: The query language specified is invalid. StatusInvalidQueryType Status = 2147749912 // WBEM_E_PROVIDER_NOT_CAPABLE: The server does not support the requested operation // on the given CIM class. StatusProviderNotCapable Status = 2147749924 // WBEM_E_CLASS_HAS_CHILDREN: The class cannot be updated because it has derived classes. StatusClassHasChildren Status = 2147749925 // WBEM_E_CLASS_HAS_INSTANCES: The class cannot be updated because it has instances. StatusClassHasInstances Status = 2147749926 // WBEM_E_ILLEGAL_NULL: The server identifies that one of the non-nullable NULL properties // was set to NULL in the Put operation. StatusIllegalNull Status = 2147749928 // WBEM_E_INVALID_CIM_TYPE: The CIM type specified is not valid. StatusInvalidCimType Status = 2147749933 // WBEM_E_INVALID_METHOD: The CIM object does not implement the specified method. StatusInvalidMethod Status = 2147749934 // WBEM_E_INVALID_METHOD_PARAMETERS: One or more of the parameters passed to the CIM // method are not valid. StatusInvalidMethodParameters Status = 2147749935 // WBEM_E_INVALID_PROPERTY: The property for which the operation is made is no longer // present in the CIM database. StatusInvalidProperty Status = 2147749937 // WBEM_E_CALL_CANCELLED: The server canceled the execution of the request due to // resource constraints. The client can try the call again. StatusCallCancelled Status = 2147749938 // WBEM_E_INVALID_OBJECT_PATH: The object path is not syntactically valid. StatusInvalidObjectPath Status = 2147749946 // WBEM_E_OUT_OF_DISK_SPACE: Insufficient resources on the server to satisfy the client's // request. StatusOutOfDiskSpace Status = 2147749947 // WBEM_E_UNSUPPORTED_PUT_EXTENSION: The server has encountered an implementation-specific // error. StatusUnsupportedPutExtension Status = 2147749949 // WBEM_E_QUOTA_VIOLATION: Quota violation. StatusQuotaViolation Status = 2147749996 // WBEM_E_SERVER_TOO_BUSY: The server cannot complete the operation at this point. StatusServerTooBusy Status = 2147749957 // WBEM_E_METHOD_NOT_IMPLEMENTED: An attempt was made to execute a method not marked // with "implemented" in this class or any of its derived classes. StatusMethodNotImplemented Status = 2147749973 // WBEM_E_METHOD_DISABLED: An attempt was made to execute a method marked with "disabled" // qualifier in MOF. StatusMethodDisabled Status = 2147749974 // WBEM_E_UNPARSABLE_QUERY: The query sent to the server doesn't syntactically conform // to the rules specified in section 2.2.1. StatusUnparsableQuery Status = 2147749976 // WBEM_E_NOT_EVENT_CLASS: The FROM clause of WQL Event Query (section 2.2.1.2) represents // a class that is not derived from Event. StatusNotEventClass Status = 2147749977 // WBEM_E_MISSING_GROUP_WITHIN: The GROUP BY clause of WQL query does not have WITHIN // specified. StatusMissingGroupWithin Status = 2147749978 // WBEM_E_MISSING_AGGREGATION_LIST: The GROUP BY clause was used with aggregation, // which is not supported. StatusMissingAggregationList Status = 2147749979 // WBEM_E_PROPERTY_NOT_AN_OBJECT: The GROUP BY clause references an object that is // an embedded object without using Dot notation. StatusPropertyNotAnObject Status = 2147749980 // WBEM_E_AGGREGATING_BY_OBJECT: The GROUP BY clause references an object that is // an embedded object without using Dot notation. StatusAggregatingByObject Status = 2147749981 // WBEM_E_BACKUP_RESTORE_WINMGMT_RUNNING: A request for backing up or restoring the // CIM database was sent while the server was using it. StatusBackupRestoreWinManagementRunning Status = 2147749984 // WBEM_E_QUEUE_OVERFLOW: The EventQueue on the server has more events than can be // consumed by the client. StatusQueueOverflow Status = 2147749985 // WBEM_E_PRIVILEGE_NOT_HELD: The server could not find the required privilege for // performing operations on CIM classes or CIM instances. StatusPrivilegeNotHeld Status = 2147749986 // WBEM_E_INVALID_OPERATOR: An operator in the WQL query is invalid for this property // type. StatusInvalidOperator Status = 2147749987 // WBEM_E_CANNOT_BE_ABSTRACT: The CIM class on the server had the abstract qualifier // set to true, while its parent class does not have the abstract qualifier set to false. StatusCannotBeAbstract Status = 2147749989 // WBEM_E_AMENDED_OBJECT: A CIM instance with amended qualifier set to true is being // updated without WBEM_FLAG_USE_AMENDED_QUALIFIERS flag. StatusAmendedObject Status = 2147749990 // WBEM_E_VETO_PUT: The server cannot perform a PUT operation because it is not supported // for the given CIM class. StatusVetoPut Status = 2147750010 // WBEM_E_PROVIDER_SUSPENDED: The server has encountered an implementation-specific // error. StatusProviderSuspended Status = 2147750017 // WBEM_E_ENCRYPTED_CONNECTION_REQUIRED: The server has encountered an implementation-specific // error. StatusEncryptedConnectionRequired Status = 2147750023 // WBEM_E_PROVIDER_TIMED_OUT: StatusProviderTimedOut Status = 2147750024 // WBEM_E_NO_KEY: The IWbemServices::PuInstance or IWbemServices::PutInstanceAsync // operation was attempted with no value set for the key properties. StatusNoKey Status = 2147750025 // WBEM_E_PROVIDER_DISABLED: The server has encountered an implementation-specific // error. StatusProviderDisabled Status = 2147750026 // WBEM_E_REGISTRATION_TOO_BROAD: The server has encountered an implementation-specific // error. StatusRegistrationTooBroad Status = 2147753985 // WBEM_E_REGISTRATION_TOO_PRECISE: The WQL query for intrinsic events for a class // issued without a WITHIN clause. StatusRegistrationTooPrecise Status = 2147753986 )
type StatusType ¶
type StatusType uint16
StatusType type represents WBEM_STATUS_TYPE RPC enumeration.
The WBEM_STATUS_TYPE enumeration gives information about the status of the operation.
var ( // WBEM_STATUS_COMPLETE: When the WMI operation is completed, WMI calls IWbemObjectSink::SetStatus // with WBEM_STATUS_COMPLETE. StatusTypeComplete StatusType = 0 // WBEM_STATUS_REQUIREMENTS: This flag MUST NOT be set, and MUST be ignored on receipt. StatusTypeRequirements StatusType = 1 // WBEM_STATUS_PROGRESS: WMI reports the progress of the operation to IWbemObjectSink::SetStatus // with flag WBEM_STATUS_PROGRESS. StatusTypeProgress StatusType = 2 )
func (StatusType) String ¶
func (o StatusType) String() string
type TimeoutType ¶
type TimeoutType uint32
TimeoutType type represents WBEM_TIMEOUT_TYPE RPC enumeration.
The WBEM_TIMEOUT_TYPE enumeration gives information about the type of time-out for the process.
var ( // WBEM_NO_WAIT: If passed as a time-out parameter to the IEnumWbemClassObject::Next // method, the call returns the available objects, if any, at the time of the call; // it does not wait for any more objects. TimeoutTypeNoWait TimeoutType = 0 // WBEM_INFINITE: If passed as a time-out parameter to IEnumWbemClassObject::Next, // the call blocks until objects are available. TimeoutTypeInfinite TimeoutType = 4294967295 )
func (TimeoutType) String ¶
func (o TimeoutType) String() string
type WCOSmartEnum ¶
type WCOSmartEnum dcom.InterfacePointer
WCOSmartEnum structure represents IWbemWCOSmartEnum RPC structure.
func (*WCOSmartEnum) InterfacePointer ¶
func (o *WCOSmartEnum) InterfacePointer() *dcom.InterfacePointer
func (*WCOSmartEnum) MarshalNDR ¶
func (*WCOSmartEnum) NDRSizeInfo ¶
func (o *WCOSmartEnum) NDRSizeInfo() []uint64
func (*WCOSmartEnum) UnmarshalNDR ¶
Directories ¶
Path | Synopsis |
---|---|
ienumwbemclassobject
|
|
iwbembackuprestore
|
|
iwbembackuprestoreex
|
|
iwbemcallresult
|
|
iwbemclassobject
|
|
iwbemcontext
|
|
iwbemfetchsmartenum
|
|
iwbemlevel1login
|
|
iwbemloginclientid
|
|
iwbemloginhelper
|
|
iwbemobjectsink
|
|
iwbemqualifierset
|
|
iwbemrefreshingservices
|
|
iwbemremoterefresher
|
|
iwbemservices
|
|
iwbemwcosmartenum
|
|