Obtains a pointer to a shared memory object.
LPVOID ntxMapRtSharedMemory( NTXHANDLE hSegment, );
hSegment
This call is identical to ntxMapRtSharedMemoryEx with the NTX_MAP_WRITE flag set.
Mapping consumes resources in the Windows process. You can use ntxUnmapRtSharedMemory to return resources.
You can map an address space multiple times. Each operation returns the same pointer value. The first unmap invalidates this pointer.
If the NTX application must operate on data that contains RTHANDLEs, you must convert the handles using ntxImportRtHandle.
Due to Windows limitations, the maximum size you can map in a single call is as follows:
- Windows - 0xfffff000 bytes
The actual size that you can map depends on the free virtual address space available in your Windows process.
hSegment.
NULL
E_TYPE 0x8002
hSegment
is not an address space.
E_ALIGNMENT
hSegment
is not page-aligned on both ends. Use ntxMapRtSharedMemoryEx to map a non-page-aligned shared memory object.
E_LOCATION
hSegment
is located in an RT kernel that does not share memory with the host of the NTX application.
E_STATE 0x0007
E_NTX_INTERNAL_ERROR
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/nt/include/ntx.h | ntx.h | ntx.lib |
INtime 4.01 (for 64-bit Windows) | intime/nt/include/ntx.h | ntx.h | ntx64.lib |