Allocate the context structure

/* allocate a context structure */
ctp = dispatch_context_alloc(dpp);

The context structure contains a buffer where messages will be received. The size of the buffer was set when we initialized the resource manager attribute structure. The context structure also contains a buffer of IOVs that the library can use for replying to messages. The number of IOVs was set when we initialized the resource manager attribute structure.

For more information, see dispatch_context_alloc() in the QNX Neutrino C Library Reference.

Note: Once you've called dispatch_context_alloc(), don't call message_attach() or resmgr_attach() specifying a different maximum message size or a different number of message parts for the same dispatch handle. (This doesn't apply to pulse_attach() or select_attach() because you can't specify the sizes with these functions.)