The GetType method of the IRemoteField interface returns an IRemoteField interface that represents the type of this field.
HRESULT GetType(IRemoteField **ppType)
[out] **ppType | Returns an IRemoteField representing the type of this field. |
S_OK Success.
E_OUTOFMEMORY Insufficient memory.
The relationship between a field and its type depends on FIELDKIND. The type will be an array type, a class type, or a Java primitive data type. When this method is called on the global container field, the method returns S_OK and the IRemoteField returned representing the type is NULL.
If the GetType method is called on an IRemoteField representing a primitive data field, the IRemoteField returned will be that of the primitive class corresponding to the type of the data field. For example, for a boolean variable, GetType will return the IRemoteField for the boolean primitive class. Calling GetName on the Boolean primitive class’s IRemoteField will return the Unicode string "boolean", and calling GetKind will return FIELD_KIND_CLASS.
If the GetType method is called on an IRemoteField representing an array data field, the IRemoteField returned will be that of the element type of the array. The element type can be another array, a class, or a primitive class. Calling GetKind on the returned IRemoteField will return either the FIELD_KIND_CLASS bit flag set (for an array of object references or an array of a primitive data type) or the FIELD_KIND_ARRAY bit set for an array of arrays.
The element type of an array of a primitive data type can be determined by calling QueryInterface for IID_IRemotePrimitiveClassField on the IRemoteField representing the element type of the array to obtain the IRemotePrimitiveClassField interface, if any, for the array elements. Then, the debugger can call IRemotePrimitiveClassField::GetPrimitiveType to obtain a PRIMITIVE_TYPE enumeration value representing the primitive type of the array elements.
The debugger can call IRemoteField::GetName on the IRemoteField representing the element type of the array to obtain the name of the primitive class of the array elements. The array element class name can be compared with the known primitive class names.