]> rtime.felk.cvut.cz Git - frescor/forb.git/blob - tests-idl/example_client.c
forb: Split forb_port_destroy() to stop and destroy phases
[frescor/forb.git] / tests-idl / example_client.c
1 #include <stdio.h>
2 #include <forb.h>
3 #include "myinterface.h"  /* IDL compiler generated prototypes etc. */
4
5 int main(int argc, char *argv[])
6 {
7         forb_orb orb;
8         myinterface example;
9         CORBA_Environment env;
10         CORBA_long sum, a, b;
11
12         orb = forb_init(&argc, &argv, NULL); /* FORB initialization */
13
14         /* Find our implementation */
15         example = forb_resolve_reference(orb, "example");
16
17         /* Call our implementation */
18         sum = myinterface_add(example, 2, 3, &env);
19         printf("2+3=%d\n", sum);
20
21         /* Call our implementation again */
22         myinterface_get_last(example, &a, &b, &env);
23         printf("last used values: %d and %d\n", a, b);
24
25         return 0;
26 }