<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=673423820-31052006><FONT face=Arial 
color=#0000ff size=2>Yes, I&nbsp;can't immediately think&nbsp;why&nbsp;that 
wouldn't work.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=673423820-31052006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=673423820-31052006><FONT face=Arial 
color=#0000ff size=2>The idea of&nbsp;a streaming framework is to allow 
streaming of more complex types, but for your requirements, your suggestion may 
well be perfectly adequate.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=673423820-31052006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=673423820-31052006><FONT face=Arial 
color=#0000ff size=2>Obviously will require some more robust structure checking 
on the server to check that the OleVariant you're getting is formatted as you 
need.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=673423820-31052006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=673423820-31052006><FONT face=Arial 
color=#0000ff size=2>Cheers,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=673423820-31052006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=673423820-31052006><FONT face=Arial 
color=#0000ff size=2>C.</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT 
face=Tahoma><FONT size=2><B>From:</B> delphi-bounces@ns3.123.co.nz 
[mailto:delphi-bounces@ns3.123.co.nz] <B>On Behalf Of </B>Phil 
Middlemiss<BR><SPAN class=673423820-31052006><FONT face=Arial 
color=#0000ff>&nbsp;</FONT></SPAN></FONT></FONT></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>The second part of 
the email is basically, would this work:<BR><BR>If I have an automation object 
with a IPolygon interface and a method on that interface called AddPoints such 
as :<BR><BR>IPolygonInterface = interface(IDispatch)<BR>&nbsp;&nbsp;&nbsp; 
AddPoints(PointsArray : OleVariant);<BR>end;<BR><BR>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?<BR><BR>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?<BR><BR>Phil.<BR><BR>Conor Boyd wrote: </DIV>
<BLOCKQUOTE 
cite=mid8285CB7241FCFC4BB721A6F953F9B35E04968763@nzc-ap-xch-01.ap.trimblecorp.net 
type="cite"><PRE wrap="">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: <A class=moz-txt-link-abbreviated href="mailto:delphi-bounces@ns3.123.co.nz">delphi-bounces@ns3.123.co.nz</A> [<A class=moz-txt-link-freetext href="mailto:delphi-bounces@ns3.123.co.nz">mailto:delphi-bounces@ns3.123.co.nz</A>]
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);</PRE></BLOCKQUOTE></BODY></HTML>