Allocate the context structure

QNX SDP8.0Writing a Resource ManagerDeveloper
/* 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 OS C Library Reference.

Note:
Once you've called dispatch_context_alloc(), don't call message_attach() or resmgr_attach() specifying a larger maximum message size or a larger number of message parts for the same dispatch handle. These functions indicate an error of EINVAL if this happens. (This doesn't apply to pulse_attach() or select_attach() because you can't specify the sizes with these functions.)
Page updated: