Thanks Edward, so much!!! it's true :)<br><br>thanks bye<br><br><br><div class="gmail_quote">2010/1/22 Edward Lin <span dir="ltr"><<a href="http://edwardlin.tw">edwardlin.tw</a>@<a href="http://gmail.com">gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
You've to be aware of CORBA memory marshaling, I guess it should be<br>
<br>
CORBA::String_var p = obj->name();<br>
<br>
<br>
2010/1/21 risc risc <<a href="mailto:riscman77@gmail.com">riscman77@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Thanks Edward,<br>
><br>
> i see the problem but i have the problem also if i have this function:<br>
><br>
> void inter2::getName( prova::inter_ptr obj )<br>
> {<br>
> char *p=obj->name();<br>
><br>
> cout<<p<<endl;<br>
> }<br>
><br>
><br>
> 2010/1/21 Edward Lin <<a href="http://edwardlin.tw" target="_blank">edwardlin.tw</a>@<a href="http://gmail.com" target="_blank">gmail.com</a>><br>
>><br>
>> Hi,<br>
>><br>
>> At least I see one problem, you cannot "return p"; you must<br>
>><br>
>> char* inter2::getName( ... )<br>
>> {<br>
>> ...<br>
>> return CORBA::string_dup(p);<br>
>> }<br>
>><br>
>> You can refer to omniORB 'echo' example.<br>
>><br>
>> >> server:<br>
>> >><br>
>> >> char * inter2::getName( prova::inter_ptr obj )<br>
>> >> {<br>
>> >> char *p=obj->name();<br>
>> >><br>
>> >> cout<<p<<endl<br>
>> >><br>
>> >> return p;<br>
>> >> }<br>
><br>
><br>
</div></div></blockquote></div><br>