RtGetProcessMSpace

RtGetProcessMSpace retrieves a descriptor of the external and internal memory allocation space (MSpace) for the specified RTSS process or the system process.

Syntax

Copy
BOOL RtGetProcessMSpace(
    [in]    HANDLE hProcess,
    [out]   mspace *ExtMSpace,
    [out]   mspace *IntMSpace
);

Parameters

[in] hProcess

A handle to an RTSS process, as returned by RtCreateProcess, RtOpenProcess, or GetCurrentProcess. If NULL, the MSpaces requested are those of the Subsystem.

[out] ExtMSpace

A pointer to an mspace to return the descriptor of the external MSpace for the specified process.

[out] IntMSpace

A pointer to an mspace to return the descriptor of the internal MSpace for the specified process.

Return Value

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE.

Remarks

wRTOS uses the descriptor to define a local memory allocation space MSpace. The MSpace descriptor is opaque to users.

Call RtGetProcessMSpace first whenever you need an MSpace descriptor for calling other RTAPIs. When you call RtGetProcessMSpace in a Windows process with the HANDLE returned from GetCurrentProcess, the function returns the MSpace descriptors of the corresponding RTSS proxy process.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtApi.h

RtApi.lib (Windows), Startup.lib (RTSS)

See Also: