Microsoft SDK for Java

IJavaEventMonitorIDInfo2::
GetArrayElement

The GetArrayElement method of the IJavaEventMonitorIDInfo2 interface is called by a profiler to obtain the value of an array element in a class instance. The profiler must pass the ObjectID representing the array and an index to the array element it is interested in.

The GetArrayElement method is implemented only by the IJavaEventMonitorIDInfo2 and IJavaEventMonitorIDInfo3 interfaces.

Syntax

HRESULT GetArrayElement(ObjectID object_id, unsigned index, __int64 *pvalue);

Return Value

If the array element is an object, the ObjectID is returned. If the array element is a primitive Java type, the value of the array element is returned.

Parameters

[in] object_id The ObjectID of the class instance that the profiler is interested in.
[in] index The index (zero-based) of the array element that the profiler is interested in.
[out] *pvalue The value of the array element or an ObjectID if the array element is an object.

Remarks

For arrays of objects, pvalue will be NULL or an ObjectID.

To properly interpret the value returned (its type and value), a profiler program will need to parse the array signature.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.