I need your knowledge CORBA
- From: unixwrld <unixwrld yahoo com ar>
- To: orbit-list gnome org
- Subject: I need your knowledge CORBA
- Date: Thu, 28 Oct 2004 11:52:46 -0300 (ART)
Hi, I have got a sample that I need to develop in CORBA form. How I can do the same in CORBA? I do not know how to write IDL file and to adapt my sources.
Thanks!
typedef struct {
long lId;
char aName[32];
} PERSON;
/* Server Part */
long SearchPerson(long *lPerson,PERSON *aPerson[]) {
*aPerson=(PERSON*)malloc(sizeof(PERSON)*2);
/* If error return */
*lPerson=2;
(*aPerson)[0].lId=1L;
strcpy((*aPerson)[0].aName,"John");
(*aPerson)[1].lId=2L;
strcpy((*aPerson)[1].aName,"Peter");
return(0L);
}
long PrintInServer(long lPerson,PERSON aPerson[]) {
long i=0L;
for(i=0L;i<lPerson;i++)
printf("%ld: %s\n",aPerson[i].lId,aPerson[i].aName);
return(0L);
}
/* Client Part */
int main(void) {
PERSON *aPerson=NULL;
long lPerson=0L;
long i=0L;
SearchPerson(&lPerson,&aPerson);
for(i=0L;i<lPerson;i++)
printf("%ld: %s\n",aPerson[i].lId,aPerson[i].aName);
PrintInServer(lPerson,aPerson);
free(aPerson);
return(0);
}
Ahora podés usar Yahoo! Messenger en tu
Unifón,
en cualquier momento y lugar.
Encontrá más información
aquí.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]