DEF_BOXEDAPPSDK_OPTION__INHERIT_OPTIONS

Description

By default, this option is disabled. When it is enabled, all newly created child processes automatically inherit the same option values that are active in the parent process at the moment of creation.

This ensures consistent virtualization behavior across processes that share a virtual environment. Without this option, each new process starts with the default SDK configuration, ignoring the parent process’s modified option states.

Example

void main()
{
  BoxedAppSDK_Init();
 
  // Enable inheritance of SDK options
  BoxedAppSDK_EnableOption(DEF_BOXEDAPPSDK_OPTION__INHERIT_OPTIONS, TRUE);
 
  // Enable full virtualization for this process
  BoxedAppSDK_EnableOption(DEF_BOXEDAPPSDK_OPTION__ALL_CHANGES_ARE_VIRTUAL, TRUE);
 
  // Create a child process (it will inherit both options)
  STARTUPINFO si = { sizeof(si) };
  PROCESS_INFORMATION pi = { 0 };
  CreateProcess(
      _T("ChildApp.exe"),
      NULL,
      NULL,
      NULL,
      FALSE,
      0,
      NULL,
      NULL,
      &si,
      &pi);
 
  CloseHandle(pi.hProcess);
  CloseHandle(pi.hThread);
}
begin
BoxedAppSDK_Init();
 
// Enable inheritance of SDK options
BoxedAppSDK_EnableOption(DEF_BOXEDAPPSDK_OPTION__INHERIT_OPTIONS, true);
 
// Enable full virtualization for this process
BoxedAppSDK_EnableOption(DEF_BOXEDAPPSDK_OPTION__ALL_CHANGES_ARE_VIRTUAL, true);
 
// Create a child process; it will inherit both options
WinExec('ChildApp.exe', SW_SHOW);
end;

Remarks

When this option is enabled, any process created from a BoxedApp-managed process:

  • Automatically inherits all SDK option flags.
  • Behaves identically in terms of file and registry virtualization.
  • Simplifies management of complex applications that spawn multiple subprocesses.

This is particularly useful for applications that use helper executables, COM out-of-process servers, or custom child components that must operate within the same virtualized environment.

See Also