LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Transferring structure through activeX server to client

Need to transfer a custom object from server to client. Both server &
client developed in CVI. Any examples on how to do it.




vishi
0 Kudos
Message 1 of 6
(3,515 Views)
An interesting discussion about trasferring structures can be found here

It relates to communication via TCP/IP, but it can be useful as a framework for you to develop your application.

Roberto Bozzolo


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 6
(3,515 Views)
What I've done before (but not in CVI) is to transfer the structure as a SAFEARRAY of unsigned char, packaged into a VARIANT. CVI has some nice functions in the ActiveX library to achieve this.

--
Martin
--
Martin
Certified CVI Developer
0 Kudos
Message 3 of 6
(3,515 Views)
Transferring through TCP/IP is much easier than doing through ActiveX .
Just send the structure as bunch of bytes, nothing more. Thanks for the
link anyways.


vishi

Roberto Bozzolo wrote:
> An interesting discussion about trasferring structures can be found
> href="http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000...

>
> It relates to communication via TCP/IP, but it can be useful as a
> framework for you to develop your application.
>
> Roberto Bozzolo
0 Kudos
Message 4 of 6
(3,515 Views)
Vishi,

I know it is possible to pass user defined data types through a VARIANT, however my ActiveX knowledge is not profound enough to know how to do it.

There are 2 things that I sugest you look at: first here is a link to a msdn document that talks about passing structures by packaging then in a SAFEARRAY; they don't flatten the data to chars, but they pass a pointer within the SAFEARRAY.

http://www.microsoft.com/msj/0696/activex0696.aspx

The second thing to look at is at VARIANTARG, I'm not very familiar with this but I believe this structure allows you to pass a pointer to any user defined data as a VARIANT.

I hope this advice can help you.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 5 of 6
(3,515 Views)
Thanks,

vishi

JuanCarlos wrote:
> Vishi,
>
> I know it is possible to pass user defined data types through a
> VARIANT, however my ActiveX knowledge is not profound enough to know
> how to do it.
>
> There are 2 things that I sugest you look at: first here is a link to
> a msdn document that talks about passing structures by packaging then
> in a SAFEARRAY; they don't flatten the data to chars, but they pass a
> pointer within the SAFEARRAY.
>
> http://www.microsoft.com/msj/0696/activex0696.aspx
>
> The second thing to look at is at VARIANTARG, I'm not very familiar
> with this but I believe this structure allows you to pass a pointer to
> any user defined data as a VARIANT.
>
> I hope this advice can help you.
>
> Regards,
>
> Juan Carlos
> N.I.
0 Kudos
Message 6 of 6
(3,515 Views)