DEF_BOXEDAPPSDK_OPTION__EMULATE_OUT_OF_PROC_COM_SERVERS

Description

By default, this option is disabled. When it is enabled, BoxedApp emulates out-of-process COM servers that are implemented as executable files.

This allows BoxedApp to attach COM server processes (for example, those created when instantiating a COM object from an .exe server) to the shared virtual environment. As a result, these COM servers gain access to the same virtual file system and virtual registry as the parent process.

Without this option, such COM servers would be launched by the system directly and would not share the virtual environment.

Example

void main()
{
  BoxedAppSDK_Init();
 
  // Enable COM server virtualization
  BoxedAppSDK_EnableOption(DEF_BOXEDAPPSDK_OPTION__EMULATE_OUT_OF_PROC_COM_SERVERS, TRUE);
 
  // Register a COM server in the virtual registry
  BoxedAppSDK_RegisterCOMServerInVirtualRegistry(_T("VirtualServer.exe /RegServer"));
 
  // The COM server process will be attached to the same virtual environment
}
begin
BoxedAppSDK_Init();
// Enable COM server virtualization
BoxedAppSDK_EnableOption(DEF_BOXEDAPPSDK_OPTION__EMULATE_OUT_OF_PROC_COM_SERVERS, true);
// Register a COM server in the virtual registry
BoxedAppSDK_RegisterCOMServerInVirtualRegistry('VirtualServer.exe /RegServer');
end;

Remarks

When this option is enabled, any COM server process that is launched from a virtualized application will:

  • Be automatically attached to the same virtual environment as its parent.
  • Use the same virtual registry entries for COM class registration.
  • Operate within the same virtual file system context.

This is essential when working with COM servers implemented as .exe files that need to operate inside a BoxedApp-managed sandbox.

See Also