The CIRegion class encapsulates the RT region object; it allows waiting for and releasing control (exclusive access). The CIRegion class is typically used as it is. Regions are available in the RT environment only, because they may affect the priority of a using thread, which would be undesired for the Windows thread.
Constructor
Destructor
Create
Release
Wait
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 an RT region object and attaches it to the object.
DWORD CIRegion::Create( char * pszName, BOOLEAN bPrioQ );
pszName
bPrioQ
E_OK
E_MEM
E_LIMIT
E_SLOT
E_CONTEXT
E_PARAM
With this call control of the region is released.
DWORD CIRegion::Release(void);
Regardless of the object to which you apply this call, it always releases control of the last region that the current thread still holds control of. The result is a status indicating success or failure.
E_OK
E_CONTEXT
E_EXIST
This call puts the thread in a sleep state until the region is available, or until a timeout occurs.
DWORD CIRegion::Wait( DWORD dwTimeout );
dwTimeout
E_OK
E_EXIST
E_PARAM
dwTimeout
is wrong.
E_BUSY
E_CONTEXT