Confirmed

The Confirmed call (function name cmcfmd) replies to a confirmation request from the partner program. It informs the partner program that the local program has not detected an error in the received data. Because the program issuing the confirmation request waits for a confirmation, Confirmed synchronizes the processing of the two programs.

CM_ENTRY Confirmed(
  unsigned char FAR *conversation_ID,  
  CM_INT32 FAR *return_code            
);
 

Parameters

conversation_ID
Supplied parameter. Specifies the identifier for the conversation. The value of this parameter was returned by Initialize_Conversation or Accept_Conversation.
return_code
The code returned from this call. The valid return codes are listed below.

Return Codes

cm_ok
Primary return code; the call executed successfully.
cm_operation_not_accepted
Primary return code; a previous operation on this conversation is incomplete.
cm_operation_incomplete
Primary return code; the operation has not completed (processing mode is nonblocking only) and is still in progress. The program can issue Wait_For_Conversation to await the completion of the operation, or Cancel_Conversation to cancel the operation and conversation. If Specify_Windows_Handle has been called, the application should wait for notification by a Windows message and not call Wait_For_Conversation.
cm_program_parameter_check
Primary return code; the value specified by conversation_ID is invalid.
cm_program_state_check
Primary return code; the conversation was not in CONFIRM, CONFIRM_SEND, or CONFIRM_DEALLOCATE state when the program issued this call.
cm_product_specific_error
Primary return code; a product-specific error occurred and has been logged in the product's error log.

State Changes

The conversation must be in one of the following states when the program issues Confirmed:

CONFIRM

CONFIRM_SEND

CONFIRM_DEALLOCATE

The new state is determined by the old state—the state of the conversation when the local program issued Confirmed. The old state is indicated by the status_received value of the preceding Receive call. The following table summarizes the possible state changes when return_code is set to cm_ok.

Old state New state
CONFIRM RECEIVE
CONFIRM_SEND SEND
CONFIRM_DEALLOCATE RESET

Other return codes result in no state change.

Remarks

A confirmation request is issued by one of the following calls in the partner program:

A confirmation request is received by the local program through the status_received parameter of Receive. The local program can issue Confirmed only if the status_received parameter is set to one of the following values:

CM_CONFIRM_RECEIVED

CM_CONFIRM_SEND_RECEIVED

CM_CONFIRM_DEALLOC_RECEIVED