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.
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;
pLink
hPort
wLocalTransID
pData
cbDataLength
wFlags
wMsgStatus
SourceAddress
byControlMsg
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.
SendRtMessage, SendRtMessageRSVP, SendRtReply, SendMessage, ReleaseControlBuffer