Status PEXStartOCs( Display *display, XID resource_id, PEXOCRequestType req_type, int float_format, int oc_count, int word_count )
Zero is unsuccessful; non-zero otherwise.
Invoke PEXStartOCs to lock the display.
You can invoke only PEXCopyBytesToOC or PEXGetOCAddr between pairs of PEXStartOCs and PEXFinishOCs functions. Do not invoke anything else that may lock the display; this results in a deadlock.
The first output command is guaranteed to start on a four-byte boundary. You can copy output command data into the transport buffer by calling PEXCopyBytesToOC. Output command data can be written directly by the application by calling PEXGetOCAddr to get a pointer to memory in the transport buffer.
You must invoke PEXFinishOCs after all the data has been specified.
The application is responsible for writing valid protocol and the correct number of words requested.
If the requested number of words is too large for the display connection (each server has a maximum request size), then this function returns unsuccessfully. If this occurs, and the number of output commands was greater than one, try specifying the data for a single output command at a time. If the size of a single output command is too large for the display connection, then this function returns unsuccessfully.
For a list of related topics and functions, see Sending Encoded Output Commands.