|
The second part of the email is basically, would this work: If I have an automation object with a IPolygon interface and a method on that interface called AddPoints such as : IPolygonInterface = interface(IDispatch) AddPoints(PointsArray : OleVariant); end; where PointsArray is a variant array which contains Single values (X, Y values on a map) that should work shouldn't it (as long as client knows they are Singles? Wouldn't this be achieving the same thing as sending the points to a stream, converting that stream to a variant array of bytes, and sending the array as an OleVariant? Phil. Conor Boyd wrote: In theory it would work with a VB client etc, but on the understanding that the VB code that does the unstreaming would need to know intimately the structure of the byte arrays being passed.I suppose we're lucky in that our client and server are both Delphi, so we just compile the streaming classes into both projects and it just works. The other thing to point out about streaming using byte arrays is that it's not version-safe (e.g. you change the format of your internal byte arrays being streamed and every client will need to know about it). We're safe because our server and clients are always in sync, but it's something to be aware of. Not sure I understand the second part of your email, but that may just be me being stupid. C. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Phil Middlemiss I didn't realise variant arrays were automation compatible - the help doesn't indicate this. Would this work for a VB or C++ client app? I'm wondering if I can shortcut the whole thing though - I have an automation interface that represents, say, a polygon. Since the client code still has to formulate a variant array (to pass to the TStreamable), why not just pass the variant array to the polygon interface? eg, IMyPolygon.AddPoints(Points : OleVariant); Cheers, Phil. Conor Boyd wrote: |
begin:vcard fn:Phil Middlemiss n:Middlemiss;Phil org:Vision Software, MTS Ltd email;internet:[EMAIL PROTECTED] title:Project Leader tel;work:+64 7 3480001 tel;cell:+64 27 4592648 x-mozilla-html:TRUE url:http://www.tumonz.co.nz version:2.1 end:vcard
_______________________________________________ Delphi mailing list [email protected] http://ns3.123.co.nz/mailman/listinfo/delphi
