flooder
asked on
Saving a variant type with a stream
var
VarArr: Variant;
gh:^widestring;
begin
VarArr:=VarArrayCreate([0, 1],varVari ant);
VarArr:=Table2['Alpha;Grap hic'];
label1.caption:=inttostr(v artype(Var Arr[1]));
My question is I need to save the image data through a variant array i cant use anything else. The problem is the variant array returns a reference to a widestring(that is what the label1 is telling us)how do i manage to assign the reference to a pointer or something so i can get the data to save to a stream. What i want to achieve is something like this but it does not work gh:=pointer(vararr[1]);
VarArr: Variant;
gh:^widestring;
begin
VarArr:=VarArrayCreate([0,
VarArr:=Table2['Alpha;Grap
label1.caption:=inttostr(v
My question is I need to save the image data through a variant array i cant use anything else. The problem is the variant array returns a reference to a widestring(that is what the label1 is telling us)how do i manage to assign the reference to a pointer or something so i can get the data to save to a stream. What i want to achieve is something like this but it does not work gh:=pointer(vararr[1]);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the help.
The other question still runs.
The other question still runs.
as I have seen in your other posting, you are looking for something like this:
procedure SaveVariant(AnyVar: Variant; Filename : String);
function LoadVariant(Filename : String): Variant;
And, of course, it should save everything in the variant, including any arrays in it. Well, sounds like an intresting pet project :-] Well, I might have some time this weekend and see if I can do something like that (should be possible :-])...
Cya, Jonny...