ClassesClasses | | Operators

clear_messageT_clear_messageClearMessageClearMessage (Operator)

Name

clear_messageT_clear_messageClearMessageClearMessage — Close a message handle and release all associated resources.

Signature

clear_message( : : MessageHandle : )

Herror T_clear_message(const Htuple MessageHandle)

void ClearMessage(const HTuple& MessageHandle)

static void HMessage::ClearMessage(const HMessageArray& MessageHandle)

void HMessage::ClearMessage() const

static void HOperatorSet.ClearMessage(HTuple messageHandle)

static void HMessage.ClearMessage(HMessage[] messageHandle)

void HMessage.ClearMessage()

Description

clear_messageclear_messageClearMessageClearMessageClearMessage closes a message handle MessageHandleMessageHandleMessageHandleMessageHandlemessageHandle that was previously opened with create_messagecreate_messageCreateMessageCreateMessageCreateMessage or dequeue_messagedequeue_messageDequeueMessageDequeueMessageDequeueMessage. Any resources owned by the message, in particular the tuple or object data stored in the message, will be released.

Multiple message handles can be closed in a single clear_messageclear_messageClearMessageClearMessageClearMessage call, passing them as a tuple to the MessageHandleMessageHandleMessageHandleMessageHandlemessageHandle parameter.

Attention

The handle(s) must not be used again after being invalidated using clear_messageclear_messageClearMessageClearMessageClearMessage. Using an invalid handle results in undefined behavior.

Execution Information

Parameters

MessageHandleMessageHandleMessageHandleMessageHandlemessageHandle (input_control)  message(-array) HMessage, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Message handle(s) to be closed.

Number of elements: MessageHandle >= 1

Restriction: MessageHandle != 0

Example (HDevelop)

MessageHandles := []
for idx := 0 to 4 by 1
  create_message (MessageHandle)
  MessageHandles[idx]:= MessageHandle
endfor
* ...

Result

If the message handle(s) passed to the operator are valid, clear_messageclear_messageClearMessageClearMessageClearMessage returns 2 (H_MSG_TRUE). Otherwise an exception is raised. If a tuple of handles is passed and some of them are invalid, clear_messageclear_messageClearMessageClearMessageClearMessage attempts to clear as many handles from the tuple as possible before reporting the error.

Possible Predecessors

create_messagecreate_messageCreateMessageCreateMessageCreateMessage, dequeue_messagedequeue_messageDequeueMessageDequeueMessageDequeueMessage

See also

create_messagecreate_messageCreateMessageCreateMessageCreateMessage, set_message_tupleset_message_tupleSetMessageTupleSetMessageTupleSetMessageTuple, get_message_tupleget_message_tupleGetMessageTupleGetMessageTupleGetMessageTuple, set_message_objset_message_objSetMessageObjSetMessageObjSetMessageObj, get_message_objget_message_objGetMessageObjGetMessageObjGetMessageObj, set_message_paramset_message_paramSetMessageParamSetMessageParamSetMessageParam, get_message_paramget_message_paramGetMessageParamGetMessageParamGetMessageParam, enqueue_messageenqueue_messageEnqueueMessageEnqueueMessageEnqueueMessage, dequeue_messagedequeue_messageDequeueMessageDequeueMessageDequeueMessage

Module

Foundation


ClassesClasses | | Operators