pipe

typedef pipe element-type pipe-declarator;

element-type

Defines the size of a single element in the transfer buffer. The element-type can be a base_type, predefined_type, struct, enum, or type identifier. Several restrictions apply to element-types, as described in Remarks, below.

pipe-declarator

Specifies one or more identifiers or pointers to identifiers. Separate multiple declarators with commas.

 

Examples

typedef pipe unsigned char UCHAR_PIPE1, UCHAR_PIPE2;

 

//SIMPLE_STRUCT defined elsewhere

typedef pipe SIMPLE_STRUCT SIMPLE_STRUCT_PIPE;

 

Remarks

The pipe type constructor makes it possible to transmit an open-ended stream of typed data across a remote procedure call. An in pipe parameter allows the server to pull the data stream from the client during a remote procedure call. An out pipe parameter allows the server to push the data stream back to the client. You supply the client-side routines to push and pull the data stream and to allocate a global buffer for the data. The client and server stub routines marshal and unmarshal data and pass a reference to the buffer back to the application.

The following restrictions apply to pipes:

    A pipe element cannot be or contain a pointer, a conformant or varying array, a handle, or a context handle. In this (MIDL 3.0) implementation of pipes, a pipe element cannot be or contain a union.

    You cannot apply the transmit_as, represent_as, wire_marshal, or user_marshal attributes to a pipe type or to the element-type.

    A pipe type cannot be a member of a structure or union, the target of a pointer, or the base type of an array.

    A data type declared to be a pipe type can only be used as a parameter of a remote call.

    You can pass a pipe parameter in either direction by value or by reference (ref pointer). However you cannot apply the ptr attribute to a pipe that is passed by reference. You cannot specify a pipe parameter with a unique or a full pointer, regardless of direction.

    You cannot use pipes in object interfaces.

    You cannot apply the idempotent attribute to a routine that has a pipe parameter.

    You cannot use the serialization attributes, encode and decode with pipes.

    You cannot use automatic handles, either by default, or with the auto_handle attribute, with pipes.

 

 

Note  The MIDL 3.0 compiler supports pipes in /Oi29BUFU6 mode only.

 

For more information on implementing routines with pipe parameters, see PipesF8_B90 in the RPC Programmer s Guide and Reference.