The CILLMbx class encapsulates the low level RT mailbox object; it allows sending and receiving messages. The CILLMbx class is typically used as it is.
Constructor
Destructor
Create
Send
SendPriority
Receive
The following member variables are only available to the members of the class and its derived classes:
KNHANDLE m_hLLObject; PVOID m_pArea; DWORD m_dwMsgSize;
The class member m_hRTObject is either NULL_RTHANDLE (not attached) or BAD_RTHANDLE (attached).
The Lookup and Attach functions are useless as they operate on RTHANDLEs.
The constructor has no arguments. It creates an unattached object.
If the object is attached, the destructor detaches it; then it destroys the object.
If the object is already attached, it is first detached. Then this call creates a low level RT mailbox object and attaches it to the object.
DWORD CILLMbx::Create( DWORD dwMsgSize, DWORD dwQueueLength, BOOLEAN bPrioQ, BOOLEAN bPrioSlot );
dwMsgSize
dwQueueLength
bPrioQ
bPrioSlot
E_OK
E_MEM
With this call a message is sent to the low level mailbox.
DWORD CILLMbx::Send( PVOID pv, DWORD dwLen );
pv
dwLen
dwLen
should not exceed the maximum message size at creation time. The result is a status indicating success or failure.E_OK
E_PARAM
E_KN_LIMIT_EXCEEDED
E_EXIST
With this call a message is sent to the low level mailbox and placed in the reserved priority slot.
DWORD CILLMbx::SendPriority( PVOID pv, DWORD dwLen );
pv
dwLen
dwLen
should not exceed the maximum message size at creation time. The result is a status indicating success or failure.pv ,
E_OK
E_PARAM
E_KN_LIMIT_EXCEEDED
E_EXIST
This call puts the thread in a sleep state until a message arrives, or until a timeout occurs.
DWORD CILLMbx::Receive( PVOID pv, DWORD dwMax, DWORD dwUsecs );
pv
dwMax
dwUsecs
E_OK
E_PARAM
E_KN_TIME_OUT
E_KN_NONEXIST
E_EXIST
The CILLSemaphore class encapsulates the low level RT semaphore object; it allows sending and receiving units, which may represent any application dependent resource. The CILLSemaphore class is typically used as it is.
Constructor
Destructor
Create
Release
Wait
The following member variables are only available to the members of the class and its derived classes:
KNHANDLE m_hLLObject; PVOID m_pArea;
The class member m_hRTObject is either NULL_RTHANDLE (not attached) or BAD_RTHANDLE (attached).
The Lookup and Attach functions are useless as they operate on RTHANDLEs.