Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Application Server

PutElement method

  • Last UpdatedJul 23, 2024
  • 1 minute read

Puts an element into an array held by an MxValue. Call this method consecutively to populate an MxValue with an array of one dimension. The first call on this method will establish the MxDataType for the array. Subsequent calls to this method must supply MxValues of the same MxDataType.

Note: An array’s dimension cannot be reduced. Therefore it is not a good idea to cache an MxValue. The array should be destroyed and recreated if its dimension needs to be reduced. Array elements must be written sequentially when initializing array values.

Syntax

[C#]

void PutElement(

int index,

MxValue pMxValue

);

[Visual C++]

HRESULT PutElement(

[in] long index,

[in] IMxValue *pMxValue

);

Parameters

index

Index into the array. Must be between 1 and 2147483647 inclusive.

pMxValue

The value to be put as an array element.

Returns

MX_E_InvalidIndex - Index is out of range.

MX_E_IndexOutOfOrder - Index is not sequential.

MX_E_WrongDataType - A prior call to PutElement supplied an MxValue of a different data type.

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in