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

    Is it Possible to pass structures in DUAL interfaces

    Hi all

    how to pass structures to server.
    how to pass array of structures.

    My COM server is a dual interface support and developed using ATL.


    Thanks

    -satya


  2. #2
    Join Date
    Apr 1999
    Posts
    23

    Re: Is it Possible to pass structures in DUAL interfaces

    It is possible to pass structures and arrays of structures, the problem is you will need to have a Proxy-stub dll that will be used for marshalling the extra data.

    If you declare the structure in the IDL and then use it has a type in the call.

    If you wish to pass arrays of structures then you will need to do the following.

    // This function will return an array of items
    MyComCall([out] int *NumberOfItems, [out, size_is(*NumberOfItems)] MYSTRUCTURE_t **pStructure)

    The above is from memory, I have written a couple of ATL apps that pass back structure information, if you have any problems I will try and look the code out.


  3. #3
    Join Date
    May 1999
    Location
    13 N 77 E
    Posts
    183

    Re: Is it Possible to pass structures in DUAL interfaces

    Will this work with out of process servers too ?

    please tell me about the IDL bit of this process,
    sample code would bew useful.



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