OSF DCE Application Development Guide--Core Components

Interface Definition Language
void op ([in] long *int_value);
To pass a NULL value, use a full pointer. The following two methods make int_value
into a full pointer:
Applying the ptr attribute to the declaration of the parameter, int_value:
void op ([in, ptr] long *int_value);
Using the pointer_default (ptr) attribute in an interface header :
[uuid(135e7f00-1682-11ca-bf61-08002b111685,
pointer_default(ptr),
version(1.0)] interface full_pointer
{
typedef long *long_ptr;
void op ([in] long_ptr int_value);
}
A NULL pointer can also be passed via a unique pointer.
17.14.7.3 Array Attributes on Pointers
To apply array attributes to pointers, use the max_is or size_is attributes. When applied
to a pointer, the max_is and size_is attributes convert the pointer from a single element
of a certain type to a pointer to an array of elements of that type. The number of
elements in the array is determined by the variable in the max_is and size_is attributes.
17.14.7.4 Pointer Attributes in Function Results
Function results that are pointers are always treated as full pointers. The ptr attribute is
allowed on function results but it is not mandatory. The ref pointer attribute is never
allowed on function results.
A function result that is a pointer always indicates new storage. A pointer parameter can
reference storage that was allocated before the function was called, but a function result
cannot.
17.14.7.5 Pointers in Structure Fields and Union Case
If a pointer is declared in a member of a structure or union, its default is determined by
the pointer_default attribute you specify for the interface. To override this, specify a
pointer attribute for the member.
124245 Tandem Computers Incorporated 17 47