BoxedAppSDK_AttachToProcess

Description

The function attaches an external process to the shared virtual environment created by BoxedApp SDK.
Once attached, the process gains access to the same virtual file system and virtual registry as the calling process.

Note: The argument of this function is a process handle, not its process ID.

This allows multiple processes to interact within the same virtualized context, share virtual files, and use virtual COM registrations.

Syntax

BOOL __stdcall BoxedAppSDK_AttachToProcess(HANDLE hProcess);
function BoxedAppSDK_AttachToProcess(hProcess: THandle): BOOL; stdcall;

Parameters

hProcess
Handle of the process to be attached to the current virtual environment.
The handle must have sufficient access rights to allow thread creation (typically PROCESS_ALL_ACCESS or similar).

Remarks

Attaching a process to the same virtual environment enables resource sharing across processes, which is essential for scenarios involving inter-process communication, virtual COM usage, or sandboxed multi-process applications.

To detach a process, use BoxedAppSDK_DetachFromProcess.

See Also