PEXGetOCAddr - Get Address For Encoded Output Commands


Synopsis

   char *PEXGetOCAddr(
            Display *display,
            int length
      )

Arguments

display
A pointer to a display structure returned by a successful XOpenDisplay call.

length
The number of bytes of data to be written by the application.

Returns

A pointer to memory where the application can write output command data; a null pointer if unsuccessful.

Description

Invoke PEXGetOCAddr to get a memory address to the specified number of bytes in the transport buffer where the application can write data. This function flushes data currently in the transport buffer, if needed to satisfy the requested length.

This function returns a pointer that is valid only until you invoke the next PEXGetOCAddr or PEXCopyBytesToOC.

An attempt to request more bytes than returned by PEXGetOCAddrMaxSize, results in an unsuccessful return value (NULL pointer).

You must first invoke PEXStartOCs.

Do not attempt to deallocate or free memory at the address returned by this function.

Errors

None.

See Also

For a list of related topics and functions, see Sending Encoded Output Commands.