Getting OleVariant (TClientDataset.Data) from Evaluator

202 views Asked by At

Is it possible to evaluate an OleVariant of type varArray (Data of TClientDataset) using Delphi evaluator? I'm trying to build a Debugger Visualizer, using ToolsApi, for this kind of type. I work in an application that uses this extensively to transport data from client to server, and this would be really nice! I tried to work with pointers, evaluating TVarData(variable).VType and TVarData(variable).VArray, and then casting then to pointers, but the pointer is not valid in the api.

When I have a TClientDataset variable in the debugging code, this is not necessary, because we already have an extention using ToolApi to visualize the dataset (calling SaveToFile in evaluator). But we have too many code that have only the data variable.

So my question is: is there a way to do this with multiple evaluations, like converting the varArray to string and then unserialize the result in the api (visualizer)? I saw this answer that could convert the OleVariant to string, but does not say anything about converting back to OleVariant.

I'm using this post as an example of a visualizer.

0

There are 0 answers