INtime SDK Help
GetRtHandleTypeEx
INtime SDK v6 > About INtime > INtime Kernel > Object Directories > GetRtHandleTypeEx

Returns a value indicating the type of an RT object. The handle must be for a valid RT object. This call also returns a subtype which differentiates certain objects of the same class. If the handle is for a reference object the call returns the type of the target object and the subtype value is OR-ed with the REFERENCE_OBJECT value.

WORD GetRtHandleTypeEx(
    RTHANDLE hObject    // handle for RT object
    LPWORD pSubType
);

Parameters

hObject
Handle for valid RT object.
pSubType
A pointer to a WORD location where the object subtype is stored.

Return Values

On success, returns a value indicating the type of object whose handle was given, otherwise returns a value of INVALID_TYPE and the value at pSubType is not set. Valid return values include:
Value Handle Type
PROCESS_TYPE Process
THREAD_TYPE Thread
MAILBOX_TYPE Mailbox
SEMAPHORE_TYPE Semaphore
REGION_TYPE Region
SEGMENT_TYPE Memory Segment
HEAP_TYPE Heap
PORT_TYPE Port
SERVICE_TYPE Service object
ALARM_TYPE Alarm object
QUEUE_TYPE Queue object
RSL_TYPE RSL object
RSL_REF_TYPE RSL reference object
FILE_TYPE File object
WIN_FILE_TYPE Windows file object

If the return value is MAILBOX_TYPE, the subtype is set to one of these values:

OBJECT_MAILBOX_SUBTYPE The mailbox handle is for an object mailbox
DATA_MAILBOX_SUBTYPE The mailbox handle is for a data mailbox type

If the return value is SEGMENT_TYPE, the subtype is set to one of these values:

SEGMENT_SUBTYPE The handle is for a memory segment
DESCRIPTOR_SUBTYPE The handle is for a memory descriptor
VIRTUAL_SEGMENT_SUBTYPE The handle is for a virtual memory segment (VSEG)

If the handle is valid and the subtype is OR-ed with the value REFERENCE_SUBTYPE then the handle is for a reference object.

INVALID_TYPE
Failure. To determine the status, call GetLastRtError.

Status

E_OK 0x0000
No exceptional conditions occurred.
E_EXIST 0x0006
You used an invalid value for hObject.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/rtbase.h rt.h rt.lib
See Also