RPC function declarations should be enclosed in the body of the interface declaration. A function can use any of the types declared previously in the IDL file. An array argument can use an argument of the same function in its size expressions. Thus, we can have the following,
interface hello { void printmsg(char [size=strlen(msg)+1, 1024] msg); } 0x12345;
A function argument can be of one of the three directions,
The return type of an RPC function can also be of any type. However, you must note that for a functions that return a pointer, powerRPC allocates the memory to which the pointer points, and it is the programmer responsibility to free that memory using the library function pw_free_reference().