PMDF Programmer's Reference Manual


Previous Next Contents Index


PMDFcopyMessage

Make a verbatim copy of a message header and content.

PASCAL

status = PMDF_copy_message

(dq_context, nq_context)

argument information
Argument Data type Access Mechanism
dq_context context pointer read/write reference
nq_context context pointer read/write reference

C

status = PMDFcopyMessage

(dq_context, nq_context)

argument information


int PMDFcopyMessage(PMDF_dq **dq_context, 
                    PMDF_nq **nq_context) 


Arguments

dq_context

A message dequeue context created with PMDFdequeueInitialize.

nq_context

A message enqueue context created with PMDFstartMessageEnvelope.

Description

Use PMDFcopyMessage to efficiently copy to a new message being enqueued a verbatim copy of a message being dequeued. Only the portion of the dequeued message following the read point for that message will be copied. Thus, if the entire dequeued message --- header and content --- is to be copied, then it can be necessary to first call PMDFrewindMessage. PMDFcopyMessage is especially useful in cases where a message needs to have it's envelope changed but be left enqueued. For example, when a message was successfully delivered to some but not all recipients. In that case, if some of the recipients could not be delivered to owing to temporary problems, the message should be re-enqueued verbatim to just those recipients who could not be handled because of temporary problems. In such a case, be sure to also call PMDFaliasNoExpansion while enqueuing the new message.

Return Values

PMDF__OK Normal, successful completion.
PMDF__BADCONTEXT Bad value passed for dq_context or nq_context.


Previous Next Contents Index