Creates a handle for an area of memory in the process' virtual address space. You can use the handle in conjunction with MapRtSharedMemory to share memory among RT processes and between RT and Windows processes.
RTHANDLE CreateRtMemoryHandle(
    PVOID pOffset,   // location of memory to be shared within calling thread's virtual address space
    DWORD cbSize     // size in bytes of contiguous memory to be shared
);
pOffset 
cbSize 
Before the microprocessor can access an area of memory in Protected Mode, an RT handle for the memory area must exist in one of the descriptor tables: the GDT or LDT. CreateRtMemoryHandle lets you add an RT handle to the GDT which allows global access to physical memory within the thread's virtual address space.
A segment created with this system call can be deleted by calling DeleteRtMemoryHandle. The memory associated with these handles does not return to the memory pool of the calling thread's process for reallocation when the RT handles are deleted. When the segment is deleted, the GDT slot is returned to the memory manager for reassignment.
An RTHANDLE for the shared memory area 
BAD_RTHANDLE 
E_OK 0x0000 
E_MEM 0x0002 
E_LIMIT 0x0004 
E_SLOT 0x000C 
| Versions | Defined in | Include | Link to | 
|---|---|---|---|
| INtime 3.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |