Loads an RT executable and runs it in a new process on another node on the same host.
RTHANDLE CreateRemoteRtProcess(
LOCATION hLoc,
LPSTR szFileName,
LPSTR szArguments,
LPPROCESSATTRIBUTES lpAttributes,
DWORD dwFlags,
LPRTHANDLE phWait
);
Parameters
hLoc
- A LOCATION handle for the node where the process is to be created.
szFileName
- The path name to the RTA file which will be loaded and started as a new process.
szArguments
- A pointer to a string that contains the process' command-line arguments, or NULL if there are none.
lpAttributes
- A pointer to a PROCESSATTRIBUTES structure, or NULL if the Application Loader defaults are to be used.
dwFlags
- Controls certain attributes of the new process. Undefined flag bits must be zero. Currently defined flag bits include:
PROC_DEBUG |
Causes the process to start in a halted state for debugging. (Identical to the RT Application Loader's -debug switch.) |
PROC_EXECUTABLE_DS |
Marks the process' data segment executable. (Identical to the RT Application Loader's -odseg switch.) |
PROC_WAIT_FOR_INIT |
Causes the RT Application Loader to wait for the loaded process to complete its initialization phase. The loader waits until an object (it can be any object) is cataloged as "R?END_INIT" in the loaded process's object directory, or the internal timeout period elapses. |
PROC_STRICTRSL |
Causes an additional check to be made when loading RSLs in this process using LoadRtLibrary. This allows a library to be loaded which has the same filename but a different path to a library which is already loaded. This property applies only to this process when this flag is set. |
PROC_XM |
Causes the loader to load the target process in XM mode, with an extended VSEG. This flag overrides the default value in the RTA file PEX header as set by the linker. |
PROC_NOTXM |
Causes the loader to load the target process in standard mode, with a standard VSEG. This flag overrides the default value in the RTA file PEX header as set by the linker. |
PROC_SUSPEND |
Causes the loader to load the target process and then to suspend it, pending a call to StartRtProcess. |
phWait
- If the PROC_SUSPEND flag is specified, a wait handle is returned through this pointer for later use with WaitForRtProcess.
Return Values
- The handle to the new process.
- Success.
- BAD_RTHANDLE if the process was not created.
- Failure. To determine the status, call GetLastRtError.
Status
E_INVALID_ADDR
- The
hLoc
parameter does not refer to a valid node.
E_BAD_ADDR
- The
szFileName
parameter was NULL, or
the szArguments
parmeter was an invalid address, or
the lpAttributes
or lpAttributsEx
parmaeter was an invalid address.
E_FTYPE
- The
szFileName
parameter does not not refer to a file.
E_FNEXIST
- The
szFileName
parmaeter does not refer to an existing file.
E_MEM
- There was not enough memory available to load the process.
E_PARAM
- The flags parmaeter contained both the PROC_XM and PROC_NOTXM values.
E_IO
- An I/O error occurred while reading the file or one of its dependent RSLs.
E_CONTEXT
- The file was not of a valid format, or
PROC_XM was explicitly specified in the flags parameter, but is not available on the node.
E_FTYPE
- The PEX file being loaded does not have a valid header.
E_TIME
- It was not possible to contact the load server.
Requirements
Versions |
Defined in |
Include |
Link to |
INtime 6.0 |
intime/rt/include/rtbase.h |
rt.h |
rt.lib |
See Also