OSF DCE Application Development Guide--Core Components
OSF DCE Application Development Guide—Core Components
17.14.7.6 Resolving a Possible Pointer Ambiguity
A declaration of the following form raises a possible ambiguity about the type of
myarray:
void op ([in, out] long s, [in, out, size_is(s)] long **myarray);
IDL defines myarray in this case to be an array of pointers to longs, not a pointer to an
array of longs. The max_is and size_is attributes always apply to the top-level, or
rightmost, * (asterisk) in the IDL signature of a parameter.
17.14.7.7 Rules for Using Pointers
Use the following rules when developing code in IDL:
• Do not use the full pointer attribute on the following:
— The parameter in the first parameter position, when that parameter is of type
handle_t or is of a type with the handle attribute.
— Context handle parameters.
— A parameter that has the output attribute (out), but not the input attribute (in).
• The element type of a pipe must not be a pointer or a structure containing a pointer.
• A member of a union or a structure contained in a union cannot contain a reference
pointer.
• A reference pointer must point to valid storage at the time the call is made.
• A parameter containing a varying array of reference pointers must have all array
elements initialized to point to valid storage even if only a portion of the array is
input, since the manager code (the application code supporting an interface on a
server) may use the remaining array elements. (Recall that a varying array is one to
which any of the array attributes first_is, last_is, length_is is applied).
• The type name in a declaration that defines a pointer type must have no more than 28
characters.
17.14.7.8 Memory Management for Pointed-to Nodes
A full pointer can change its value across a call. Therefore, stubs must be able to
manage memory for the pointed-to nodes. Managing memory involves allocating and
freeing memory for user data structures.
17 − 48 Tandem Computers Incorporated 124245