<DIV>I thank for your help!&nbsp;&nbsp;&nbsp; Yes, there are some syntax errors but you understand to me.&nbsp; Now, I read the fooSK.cc and foo.h, but the declared classes in these files, they don't contain the length() method. Is those correct?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank!<BR><BR><B><I>Luke Deller &lt;ldeller@xplantechnology.com&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">unixwrld wrote:<BR>&gt; Hi, I have got my IDL file sample.idl:<BR>&gt; <BR>&gt; interface sample {<BR>&gt; typdef struct struct_SAMPLE {<BR>&gt; long number;<BR>&gt; char text[32];<BR>&gt; } SAMPLE;<BR>&gt; <BR>&gt; typedef sequence<SAMPLE> SAMPLES;<BR>&gt; void ShowData(out SAMPLES s);<BR>&gt; };<BR><BR>I suppose you haven't tried compiling this yet...<BR>(1) You can't have two types which differ only in case (ie "sample" and "SAMPLE"). This is so that CORBA can support case-insensitive languages.<BR>(2) "typdef" should be typedef.<BR><BR>Some stylistic points:<BR>(3) There's no need for a typedef for the struct in this example<BR>(4) CORBA has a type for text strings called "string". If you want to limit the length of the string you can use for example "string&lt;32&gt;". If you want to send binary data, use "octet"/"sequence<OCTET>" rather than "char"/"string".<BR><BR>I'll answer
 your next question assuming the following IDL:<BR><BR>interface foo {<BR>struct SAMPLE {<BR>long number;<BR>string text;<BR>};<BR>typedef sequence<SAMPLE> SAMPLES;<BR>void ShowData(out SAMPLES s);<BR>};<BR><BR>&gt; Now, I have got the follow prototype:<BR>&gt; <BR>&gt; void SAMPLE::ShowData(SAMPLES_out s)<BR>&gt; <BR>&gt; But I don't know how to alloc memory and data to "s".<BR><BR>Try something like this:<BR>s = new foo::SAMPLES();<BR>s-&gt;length(1)<BR>s[0].number = 42;<BR>s[0].text = CORBA::string_dup("foo");<BR><BR>Information like this can be found in the C++ language mapping specification found here:<BR>http://www.omg.org/technology/documents/formal/c++.htm<BR>Language-neutral information about CORBA and IDL can be found in the CORBA spec here:<BR>http://www.omg.org/technology/documents/formal/corba_iiop.htm<BR>Also, if you're learning CORBA, there's a book by Henning &amp; Vinoski called "Advanced CORBA Programming with C++" which is pretty much the standard textbook in this
 area:<BR>http://www.awprofessional.com/title/0201379279<BR><BR>Regards,<BR>Luke.<BR></BLOCKQUOTE><p>
                <hr size=1> 
Ahora podés usar Yahoo! Messenger en tu <b>Unifón</b>, 
en cualquier momento y lugar.<br> 
Encontrá más información <a href="http://ar.mobile.yahoo.com/sms.html">aquí</a>.