RtkOpenSharedMemory

RtkOpenSharedMemory opens an existing named physical-mapping object.

Syntax

NTSTATUS RtkOpenSharedMemory(
    RTSSINST RtssInst,
    PHANDLE SharedMemoryHandle,
    ULONG DesiredAccess,
    BOOLEAN InheritHandle,
    PUNICODE_STRING Name,
    VOID ** location
);

Parameters

RtssInst

An RTSSINST value returned from a call to RtkRtssAttach or RtkRtssAttachEx. Must pass in a valid RTSSINST value or the call will fail with STATUS_INVALID_PARAMETER.

SharedMemoryHandle

A pointer to a handle that will receive a handle to the existing shared memory object. Must pass in a valid pointer to a handle or the call will fail with STATUS_INVALID_PARAMETER.

DesiredAccess

The access mode. The RTSS environment always grants read and write access. This parameter can be one of the following values:

InheritHandle (ignored)

If this value is TRUE, processes created by this process will inherit the handle. Otherwise, the process do not inherit this handle.

Name

A pointer to a PUNICODE_STRING specifying the name of the shared memory object. The name is limited to 260 characters and can contain any character except the backslash path-separator character (\). Name comparison is case-sensitive.

location

A pointer to a location where the virtual address of the shared memory will be stored.

Return Value

RtkOpenSharedMemory returns STATUS_SUCCESS on success or on failure one of the following NTSTATUS error codes is possible:

Remarks

Use RtkUnMapSharedMemory then RtkCloseHandle to close the handle, and decrement the reference count to the shared memory object. The system closes the handle automatically when the process terminates. The shared memory object is destroyed when its last handle has been closed.

Requirements

Minimum Supported Version RTX64 2013 with Service Pack 1
Header RtkApi.h
Library RtkApi.lib
IRQL PASSIVE_LEVEL

See Also:

RtkCreateSharedMemory

RtkCloseHandle