INtime SDK Help
RtCreateProcess (iwin32)
INtime SDK v7.1 > About INtime > Alternate APIs > iwin32 API > iwin32 API > RtCreateProcess (iwin32)

Creates and starts a new INtime iwin32 process. It is supported both in the INtime environment and in Windows. In addition to creating a process, it also creates a thread object.

BOOLEAN RtCreateProcess(
    LPCTSTR lpApplicationName,
    LPTSTR lpCommandLine,
    LPSECURITY_ATTRIBUTES lpProcessAttributes,
    LPSECURITY_ATTRIBUTES lpThreadAttributes,
    BOOLEAN bInheritHandles,
    DWORD dwCreationFlags,
    LPVOID lpEnvironment,
    LPCTSTR lpCurrentDirectory,
    LPSTARTUPINFO lpStartupInfo,
    LPPROCESS_INFORMATION lpProcessInformation


Pointer to a null-terminated string that specifies the program to execute.

The string can specify the full path and filename of the module to execute or it can specify a partial path and filename.

Pointer to a null-terminated string that specifies the command line to execute.
Ignored. Must be set to NULL.
Ignored. Must be set to NULL.
Set to 0 (zero) or:
Causes the process to be created in XM mode.
Cause the process to be created in non-XM mode.
When neither NTX_PROC_XM nor NTX_PROC_NOTXM is specified, the mode defaults to that set in the executable file.
Ignored. Must be set to NULL
Ignored. Must be set to NULL
Ignored. Must be set to NULL
Pointer to a _PROCESS_INFORMATION structure that receives identification information about the new process.

Return value

Returns a non-zero value on success, or FALSE on failure. The status code may be obtained by calling GetLastError().


If lpProcessInformation is not NULL, the HANDLE of the new process returns; it should be closed when no longer required.

Note: if the process being loaded in not an iwin32 process (that is, it was not built with the iwin32 library), then the PROCESS_INFORMATION structure is not relevant. You shoudl specifiy NULL for this parameter, or else the call will fail with a status of ERROR_INVALID_HANDLE.

The thread's initial stack size is described in the image header of the specified program's executable file.

The thread begins execution at the image's entry point.

The process is assigned a 32-bit process identifier. The identifier is valid until the process terminates. It can be used to identify the process, or specified in OpenProcess to open a handle to the process.

The initial thread in the process is also assigned a 32-bit thread identifier. The identifier is valid until the thread terminates and can be used to uniquely identify the thread within the system. These identifiers are returned in the _PROCESS_INFORMATION structure.

The created process remains in the system until all threads within the process terminate and all handles to the process and its threads close through calls to CloseHandle.

The handles for the process and the main thread must be closed through calls to CloseHandle. If these handles are not needed, close them immediately after the process is created.


Versions Defined in Include Link to
INtime 3.0 intime/rt/include/iwin32.h iwin32.h iwin32.lib


See Also