> home > Custom Layer Boundary API

child_process_set_target_buffer

January 19th 2020
Create a link between a child process and a buffer, so that output from the child process is written to the buffer

Signature

C++
b32
child_process_set_target_buffer(Application_Links* app,
                                Child_Process_ID child_process_id,
                                Buffer_ID buffer_id,
                                Child_Process_Set_Target_Flags flags);

Parameters

app

the standard custom layer context pointer

child_process_id

the id of the child process who's output will be linked

buffer_id

the id of the buffer that will receive the output

flags

flags setting the behavior when the child process or buffer already have a link

Return

on success when the two entities exist and the link is created non-zero, otherwise zero

Details

Each child process and each buffer may only be a part of one link at a time. So when either is already linked a decision needs to be made to either destroy that link or not create the new link. This decision is controlled by the flags.

Related

Child_Process_Set_Target_Flags