[omniORB] problem when passing an interface in a function

risc risc riscman77 at gmail.com
Thu Jan 21 15:56:39 GMT 2010


Thanks Edward,

i see the problem but i have the problem also if i have this function:

  void inter2::getName( prova::inter_ptr obj )
  {
  char *p=obj->name();

  cout<<p<<endl;
  }


2010/1/21 Edward Lin <edwardlin.tw at gmail.com>

> Hi,
>
> At least I see one problem, you cannot "return p"; you must
>
> char* inter2::getName( ... )
> {
>    ...
>    return CORBA::string_dup(p);
> }
>
> You can refer to omniORB 'echo' example.
>
> >> server:
> >>
> >> char * inter2::getName( prova::inter_ptr obj )
> >> {
> >>  char *p=obj->name();
> >>
> >>  cout<<p<<endl
> >>
> >> return p;
> >> }
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20100121/4afc0304/attachment.htm


More information about the omniORB-list mailing list