Obtains a pointer to a shared memory object.
LPVOID ntxMapRtSharedMemoryEx( NTXHANDLE hSegment, DWORD dwFlags );
hSegment
dwFlags
NTX_MAP_WRITE |
The mapping is writeable. Mappings are always readable; |
NTX_MAP_UNALIGNED |
Allows the mapping of non page-aligned segments. If this is omitted and the segment boundary is not page-aligned, the status E_ALIGNMENT is returned. |
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 0x80f1
hSegment
is not page-aligned on both ends and the NTX_MAP_UNALIGNED value was not specified in dwFlags
.
E_LOCATION 0x8f02
hSegment
is located in an RT kernel that does not share memory with the host of the NTX application.
E_STATE 0x0007
dwFlags
E_NTX_INTERNAL_ERROR 0x1001
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 |