<DIV>I thank for your help! Yes, there are some syntax errors but you understand to me. 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> </DIV>
<DIV>Thank!<BR><BR><B><I>Luke Deller <ldeller@xplantechnology.com></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">unixwrld wrote:<BR>> Hi, I have got my IDL file sample.idl:<BR>> <BR>> interface sample {<BR>> typdef struct struct_SAMPLE {<BR>> long number;<BR>> char text[32];<BR>> } SAMPLE;<BR>> <BR>> typedef sequence<SAMPLE> SAMPLES;<BR>> void ShowData(out SAMPLES s);<BR>> };<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<32>". 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>> Now, I have got the follow prototype:<BR>> <BR>> void SAMPLE::ShowData(SAMPLES_out s)<BR>> <BR>> 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->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 & 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>.