RtfwCreateScheduledProcess

RtfwCreateScheduledProcess creates a new scheduled process to start with the Real-time Subsystem.

Syntax

bool RtfwCreateScheduledProcess(
    PRTFW_SCHEDULED_PROCESS ScheduledProc,
    int order
);

Parameters

ScheduledProc

Pointer to the RTFW_SCHEDULED_PROCESS structure created by this function.

order

The order in which this scheduled process will be executed. Using a value that is greater than the sum total of scheduled processes currently in existence, or using RTFW_SCHEDULED_PROCESS_LAST_ORDER, will place this new scheduled process at the end of the list.

Return Value

The function returns true if it succeeds. Otherwise, it returns false. Call GetLastError for additional error information.

Possible error codes:

Error Code Meaning
RT_ERROR_INVALID_AFFINITY_MASK An invalid affinity mask was specified.
RT_ERROR_INVALID_IDEAL_PROCESSOR An invalid ideal processor was specified.
ERROR_INVALID_PARAMETER One of the parameters of this function is NULL, or a field within the structure is invalid.
RT_ERROR_STRUCTURE_TOO_SMALL The Size member of a structure is too small.
RT_ERROR_SCHEDULED_PROCESS_LOCK_FAILURE Failed to obtain the lock to serialize starting/stopping the RTX64 Subsystem.

Remarks

This function has locking to allow for thread safety. It shares a lock with all other scheduled process functions.

The ScheduledID field within the structure will be changed to the identifier it was given upon success of this function.

Requirements

Minimum Required Version RTX64 3.5
Header RtfwAPI.h
Library RtfwAPI.lib

See Also:

RtfwDeleteAllScheduledProcesses

RtfwDeleteScheduledProcessByID

RtfwGetCurrentScheduledProcessCount

RtfwGetPIDByScheduledID

RtfwGetScheduledProcess

RtfwModifyScheduledProcess

PRTFW_SCHEDULED_PROCESS