PreviousNext

Overview - RPC Parameters

The RPC mechanism attempts to provide a data model as close as possible to the familiar local call model. For example, you can pass data by reference - by passing a pointer to a data item - despite the fact that client and server do not share an address space. Nevertheless, there are significant differences in both the syntax and semantics of RPC parameter data compared with C language local call data. For example, RPC provides directional attributes, conformant arrays, discriminated unions, and pipes, constructs which have no equivalents in C. Each requires an IDL specific syntax and has new semantics. Also, familiar constructs, such as pointers, closely mimic their local C language counterparts, but nevertheless must behave differently in some circumstances.

The DCE RPC programmer is thus confronted with a number of unfamiliar style and policy issues. The policy issues have mainly to do with which data types to use in given circumstances: for example, would you be better off using an array or a pipe to transfer a large block of data? This topic contains recommendations that should help you make such choices. The style issues arise from the rich and unfamiliar syntax for RPC parameters which can make the mechanics of using many of the RPC data types seem rather daunting. This topic contains numerous examples of basic data passing styles.