MI_InstanceFT structure

A support structure used in the MI_Instance structure. Use the functions with the name prefix MI_Instance_ to manipulate these structures.

Syntax


typedef struct _MI_InstanceFT {
  MI_Result (MI_CALL *Clone)(
      _In_ const MI_Instance *self, 
      _Outptr_ MI_Instance **newInstance);
  MI_Result (MI_CALL *Destruct)(_Inout_ MI_Instance *self);
  MI_Result (MI_CALL *Delete)(_Inout_ MI_Instance *self);
  MI_Result (MI_CALL *IsA)(
      _In_ const MI_Instance *self, 
      _In_ const MI_ClassDecl *classDecl, 
      _Out_ MI_Boolean *flag);
  MI_Result (MI_CALL *GetClassName)(
      _In_ const MI_Instance *self, 
      _Out_ const MI_Char **className);
  MI_Result (MI_CALL *SetNameSpace)(
      _Inout_ MI_Instance *self, 
      _In_ const MI_Char *nameSpace);
  MI_Result (MI_CALL *GetNameSpace)(
      _In_ const MI_Instance *self, 
      _Out_ const MI_Char **nameSpace);
  MI_Result (MI_CALL *GetElementCount)(
      _In_ const MI_Instance *self, 
      _Out_ MI_Uint32 *count);
  MI_Result (MI_CALL *AddElement)(
      _Inout_ MI_Instance *self, 
      _In_ const MI_Char *name, 
      _In_opt_ const MI_Value *value, 
      MI_Type type, 
      MI_Uint32 flags);
  MI_Result (MI_CALL *SetElement)(
      _Inout_ MI_Instance *self, 
      _In_ const MI_Char *name, 
      _In_ const MI_Value *value, 
      MI_Type type, 
      MI_Uint32 flags);
  MI_Result (MI_CALL *SetElementAt)(
      _Inout_ MI_Instance *self, 
      MI_Uint32 index, 
      _In_ const MI_Value *value, 
      MI_Type type, 
      MI_Uint32 flags);
  MI_Result (MI_CALL *GetElement)(
      _In_ const MI_Instance *self, 
      _In_ const MI_Char *name, 
      _Out_opt_ MI_Value *value, 
      _Out_opt_ MI_Type *type, 
      _Out_opt_ MI_Uint32 *flags, 
      _Out_opt_ MI_Uint32 *index);
  MI_Result (MI_CALL *GetElementAt)(
      _In_ const MI_Instance *self, 
      MI_Uint32 index, 
      _Out_ const MI_Char **name, 
      _Out_opt_ MI_Value *value, 
      _Out_opt_ MI_Type *type, 
      _Out_opt_ MI_Uint32 *flags);
  MI_Result (MI_CALL *ClearElement)(
      _Inout_ MI_Instance *self, 
      _In_ const MI_Char *name);
  MI_Result (MI_CALL *ClearElementAt)(
      _Inout_ MI_Instance *self, 
      MI_Uint32 index);
  MI_Result (MI_CALL *GetServerName)(
      _In_ const MI_Instance *self, 
      _Out_ const MI_Char **name);
  MI_Result (MI_CALL *SetServerName)(
      _Inout_ MI_Instance *self, 
      _In_ const MI_Char *name);
  MI_Result (MI_CALL *GetClass)(
      const MI_Instance *self, 
      _Out_ MI_Class **instanceClass);
} MI_InstanceFT;

Members

Clone

Creates a copy of the specified instance on the heap. See MI_Instance_Clone.

Destruct

Deletes an instance that was created on the stack. See MI_Instance_Destruct.

Delete

Deletes an instance that was created on the heap. See MI_Instance_Delete.

IsA

Determines if the instance self is an instance of the class given by classDecl. See MI_Instance_IsA.

GetClassName

Gets the class name of the specified instance. See MI_Instance_GetClassName.

SetNameSpace

Sets the namespace name of the specified instance. See MI_Instance_SetNameSpace.

GetNameSpace

Gets the namespace name of the specified instance. See MI_Instance_GetNameSpace.

GetElementCount

Gets the number of elements in an instance. See MI_Instance_GetElementCount.

AddElement

Adds a new property to a dynamic instance. See MI_Instance_AddElement.

SetElement

Set the value of the property with the given name in the given instance. See MI_Instance_SetElement.

SetElementAt

Set the value of the property at the given index of an instance. See MI_Instance_SetElementAt.

GetElement

Gets the value of the named element (CIM property). See MI_Instance_GetElement.

GetElementAt

Gets the value of the element (CIM property) at the specified index. See MI_Instance_GetElementAt.

ClearElement

Clears the value of the named element (CIM property) and sets it to Null. See MI_Instance_ClearElement.

ClearElementAt

Clears the value of the element (CIM property) at the specified index and sets it to Null. See MI_Instance_ClearElementAt.

GetServerName

Gets the server name from the specified instance. See MI_Instance_GetServerName.

SetServerName

Sets the server name of the specified instance. See MI_Instance_SetServerName.

GetClass

Gets the MI_Classassociated with an instance. See MI_Instance_GetClass.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Redistributable

Windows Management Framework 3.0 on Windows Server 2008 R2 with SP1, Windows 7 with SP1, and Windows Server 2008 with SP2

Header

Mi.h

 

 

Show: