CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 1999
    Posts
    9

    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


  2. #2
    Join Date
    Apr 1999
    Posts
    4

    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.


  3. #3
    Join Date
    Apr 1999
    Posts
    30

    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.


  4. #4
    Join Date
    Apr 1999
    Location
    Toronto, ON
    Posts
    713

    Re: HOW TO PASS STRUCTURES/LINKED LISTS/ ARRAY OF STRUCTURS TO A COM SERVER

    This site has good samples what are You looking for


  5. #5
    Guest

    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.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured