The GetFieldObject method of the IRemoteContainerObject interface returns an IRemoteObject interface that represents the given field contained within this container object. The IRemoteObject interface that is returned is bound to this container object. A single IRemoteField interface can be used to extract the value of that field from many different container objects in the same Java process.
HRESULT GetFieldObject(IRemoteField *pField, IRemoteObject **ppFieldObject)
[in] *pField | The field in this container object whose runtime content is requested. |
[out] **ppFieldObject | The object representing the runtime content of the given field in this container. |
S_OK Success.
E_FIELDNOTINOBJECT The given field is not in this container object.
E_FIELDOUTOFSCOPE The given field is out of scope in this method object.
E_NOLONGERVALID The content of the given field is no longer valid.
E_NOTINITIALIZED The given field has not yet been assigned.
E_NULLOBJECTREF The content of the given field is the null object reference.
E_OUTOFMEMORY Insufficient memory.
Calling the GetType method on the returned IRemoteObject interface will return the original IRemoteField that was passed to the GetFieldObject method.
The Microsoft VM will not return E_NULLOBJECTREF from GetFieldObject if the MSJDBG_CREATE_NULL_OBJECTS (0x800) flag is set in the MSJAVA_DEBUGGING_FLAGS environment variable, or if the MSJAVA_DEBUGGING_FLAGS environment variable is not set and the MSJDBG_CREATE_NULL_OBJECTS flag is set in the DebuggingFlags DWORD value of the HKEY_LOCAL_MACHINE\Software\Microsoft\Java VM registry key. Instead, the Microsoft VM will return an IRemoteObject interface representing the null object reference. This is necessary to enable a debugger to set a data breakpoint on an object reference that is currently null.
See Enabling Debugging in the Microsoft VM for more details on controlling the Microsoft VM's debugging options.