[Ace-users] [ace-users] Problems with _out paramter

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Tue Nov 13 13:22:56 CST 2007


To ensure that we have proper version/platform/compiler information,
please make sure you fill out the appropriate problem report form
(PRF), which is in


or in


in older versions of ACE+TAO.  Make sure to include this information
when asking any questions about ACE+TAO since otherwise we have to
"guess" what version/platform/compiler/options you've using, which is
very error-prone and slows down our responsiveness.  If you don't use
the PRF, therefore, it is less likely that someone from the core
ACE+TAO developer team will be able to answer your question.
Naturally, we encourage and appreciate other members of the ACE+TAO
user community who can respond to questions that they have the answers

>i have following problem:
>Transmitting a struct:
>struct MyStruct
>CORBA::UShortSeq val1;
>CORBA::UShortSeq val2;
>This is defined in my IDL-file
>To transmitt i have a method

What do you mean by MyStruct_out?  Don't you mean

getData (out MyStruct mS);

>getData(MyStruct_out mS)
>On client side i create a new one

Don't allocate mSC in the client application - this is done for you by
the stub.

>MyStruct_var mSC = new MyStruct();
>and call:
>On Sever side:
>getData(MyStruct_out mS){
>         MyStruct_var mSS = new MyStruct();
>          //..set the length, fill the sequences
>         mS = mSS.out();
>So this dont work, (and i have probelms understanding the memoy
>management too)
>So how can i transmitt and copy the structure from server side to
>client side?

Please take a look at how to do this in the book "CORBA Explained
Simply," which you can download from



Dr. Douglas C. Schmidt                       Professor and Associate Chair
Electrical Engineering and Computer Science  TEL: (615) 343-8197
Vanderbilt University                        WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203                          NET: d.schmidt at vanderbilt.edu

More information about the Ace-users mailing list