HOW TO PASS STRUCTURES/LINKED LISTS/ ARRAY OF STRUCTURS TO A COM SERVER
Hi,
I created a component server using ATL
My client is using MFC .
How to pass structures/linked lists as parameters to the component.
I am using CList .
How can pass the data to component.
Thanks
-Satya
Re: HOW TO PASS STRUCTURES/LINKED LISTS/ ARRAY OF STRUCTURS TO A COM SERVER
You can use olevariant data type. convert ur structure into olevariant type and pass the pointer and convert it back.
Re: HOW TO PASS STRUCTURES/LINKED LISTS/ ARRAY OF STRUCTURS TO A COM SERVER
Hello,
There is a problem with the process boundary. So you will have to convert the stuff into simple data format like byte pointer etc and pass it. For this u can use COleStreamfile. serialize the object pointer u want to pass into a CArchive object. Using this CArchive object u can create an olestreamfile which is an Iunknown pointer by type.
Re: HOW TO PASS STRUCTURES/LINKED LISTS/ ARRAY OF STRUCTURS TO A COM SERVER
This site has good samples what are You looking for
Re: HOW TO PASS STRUCTURES/LINKED LISTS/ ARRAY OF STRUCTURS TO A COM SERVER
I would use OLESafeArrays. I think they can be marshalled by the default OLE automation marshaller too. Specifically, I would use OLESafeArrays of VARIANTs.