MI_Instance_SetElementAt function (mi.h)

Set the value of the element at the given index of an instance.

Syntax

MI_INLINE MI_Result MI_INLINE_CALL MI_Instance_SetElementAt(
  [in, out]      MI_Instance    *self,
                 MI_Uint32      index,
  [in, optional] const MI_Value *value,
                 MI_Type        type,
                 MI_Uint32      flags
);

Parameters

[in, out] self

A pointer to an instance.

index

The position of the element.

[in, optional] value

The new value of the element.

type

The CIM type of the element that will be set.

flags

The bit flags indicates memory management policy and can be any of the following values.

MI_FLAG_BORROW

Used while adding and setting properties on an MI_Instance to indicate that the instance will not copy the value. The value must stay valid until the instance is deleted.

MI_FLAG_ADOPT

Used while adding and setting properties on an MI_Instance to indicate that the instance will adopt the pointer and will be responsible for deleting it.

MI_FLAG_NULL

Element value is Null.

Return value

This function returns MI_INLINE MI_Result MI_INLINE_CALL.

Requirements

Requirement Value
Minimum supported client Windows 8
Minimum supported server Windows Server 2012
Target Platform Windows
Header mi.h
Redistributable Windows Management Framework 3.0 on Windows Server 2008 R2 with SP1, Windows 7 with SP1, and Windows Server 2008 with SP2