VarAccGetAddress does not return the correct address for TYPE_ARRAY or TYPE_USERDEF. When you use VarAccGetNode, it returns a proper IBaseTreeNode if you provide the full path of an array element or structure element, and it even provides the correct data type.
The problem is that with TYPE_ARRAY, it returns the start address of the array rather than the indexed element. With TYPE_USERDEF, it only returns the offset of the element instead of the actual address.
This causes many issues with nested structures or arrays of structures, since it requires manually calculating the address based on the parent IBaseTreeNode.
VarAccGetAddress does not return the correct address for TYPE_ARRAY or TYPE_USERDEF. When you use VarAccGetNode, it returns a proper IBaseTreeNode if you provide the full path of an array element or structure element, and it even provides the correct data type.
The problem is that with TYPE_ARRAY, it returns the start address of the array rather than the indexed element. With TYPE_USERDEF, it only returns the offset of the element instead of the actual address.
This causes many issues with nested structures or arrays of structures, since it requires manually calculating the address based on the parent IBaseTreeNode.
See attached image and example.