INtime SDK Help
CONTROLBUFFER structure

Message control buffers are used to track the progress of each message during its life in the service. A control buffer is allocated automatically by the INtime kernel when a user calls SendRtMessage, SendRtMessageRSVP or SendRtReply and is passed to the SendMessage handler. The service implementer must allocate a control buffer for each message received at the service interface. There is a static pool of control buffers allocated to the service interface when it is installed.

Syntax

typedef struct tagControlBuf {

LPVOID pLink; WORD _reserved_1;
RTHANDLE hPort;
WORD wLocalTransID;
PVOID pData; WORD _reserved_1;
DWORD cbDataLength;
WORD wFlags;
WORD wMsgStatus;
GENADDR SourceAddress;
BYTE byControlMsg[1];
} CONTROLBUFFER, *LPCONTROLBUFFER;

Fields

pLink
Used ONLY by the INtime kernel. Do not modify this field.
hPort
Contains the handle for the port associated with this message.
wLocalTransID
Contains the transaction ID for this message, if any.
pData
Refers to the buffer containing the data part of the message, if any.
cbDataLength
Contains the total number of bytes in the data part of the message.
wFlags
Contains the buffer flags for the data part of the message.
wMsgStatus
Contains the transmit status of an outgoing message.
SourceAddress
Contains the address of the source of the message.
byControlMsg
Contains the control part of the message.

Remarks

In normal operation, control buffers are automatically deallocated when a message or status is delivered to a port. In certain circumstances (particularly during error processing) it may be necessary to deallocate a previously-allocated buffer. The call ReleaseControlBuffer has been provided for this purpose.

See Also

SendRtMessage, SendRtMessageRSVP, SendRtReply, SendMessage, ReleaseControlBuffer