Export (0) Print
Expand All
Expand Minimize

MI_Instance_SetElementAt function

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

Syntax


MI_Result MI_Instance_SetElementAt(
  _Inout_   MI_Instance *self,
  MI_Uint32 index,
  _In_opt_  const MI_Value *value,
  MI_Type type,
  MI_Uint32 flags
);

Parameters

self [in, out]

A pointer to an instance.

index

The position of the element.

value [in, optional]

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.

flagsMeaning
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

Return codeDescription
MI_RESULT_OK

The operation succeeded.

MI_RESULT_SERVER_LIMITS_EXCEEDED

There is not enough memory to complete the request.

MI_RESULT_INVALID_PARAMETER

One or more parameters passed to the function were not valid.

MI_RESULT_TYPE_MISSMATCH

The specified type does not match the type of the existing element.

MI_RESULT_NOT_FOUND

The specified element does not exist.

MI_RESULT_FAILED

A failure not covered by other MI_Result error codes.

 

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:
© 2014 Microsoft