sorry for so many questions. I hope I can ask 1 more and then I probably know most about direct translations from AFL to a DLL
With respect to COM Objects the manual says: “The VAR_DISPATCH type is provided for calling COM objects and will not be covered here”
does this mean they can be called inside a DLL, but it is just not explained how?
If it is possible could I be shown how to translate the following AFL?
AB = CreateObject( "Broker.Application" ); AW = AB.ActiveWindow; AW.ZoomToRange( bv, ev );
where bv and ev are defined as (but I can translate this myself):
bv = DateTimeToStr( LastValue( ValueWhen( xx1, DateTime() ) ) );
ev = DateTimeToStr( LastValue( ValueWhen( xx2, DateTime() ) ) );
I started off with:
AmiVar AB; arg1.type = VAR_STRING; arg1.string = (char *)gSite.Alloc(100); strcpy_s(arg1.string, 100, "Broker.Application"); AB.type = VAR_DISP; AB = gSite.CallFunction("CreateObject", 1, arg1);
not sure if it is correct and I’m stuck here …