DEF_BOXEDAPPSDK_OPTION__ENABLE_VIRTUAL_FILE_SYSTEM

Description

By default, this option is enabled. When it is active, BoxedApp intercepts all calls to the file system, redirecting them through its virtual file system layer.

This allows BoxedApp to provide seamless virtualization of files and directories — applications can open, read, or write files as usual, but the operations occur entirely in a virtual environment instead of the physical disk.

If you disable this option, BoxedApp stops intercepting file system calls. All file operations will then be handled directly by the operating system, effectively disabling the virtual file system feature.

Example

void main()
{
  BoxedAppSDK_Init();
 
  // Disable the virtual file system
  BoxedAppSDK_EnableOption(DEF_BOXEDAPPSDK_OPTION__ENABLE_VIRTUAL_FILE_SYSTEM, FALSE);
 
  // File operations will now access the real file system
  HANDLE hFile = CreateFile(
      _T("real.txt"),
      GENERIC_WRITE,
      FILE_SHARE_READ,
      NULL,
      CREATE_NEW,
      0,
      NULL);
 
  CloseHandle(hFile);
 
  // Re-enable the virtual file system
  BoxedAppSDK_EnableOption(DEF_BOXEDAPPSDK_OPTION__ENABLE_VIRTUAL_FILE_SYSTEM, TRUE);
}
begin
BoxedAppSDK_Init();
 
// Disable the virtual file system
BoxedAppSDK_EnableOption(DEF_BOXEDAPPSDK_OPTION__ENABLE_VIRTUAL_FILE_SYSTEM, false);
 
// File operations will now affect the real system
with TFileStream.Create('real.txt', fmCreate or fmOpenWrite) do
  Free();
 
// Re-enable the virtual file system
BoxedAppSDK_EnableOption(DEF_BOXEDAPPSDK_OPTION__ENABLE_VIRTUAL_FILE_SYSTEM, true);
end;

Remarks

When this option is enabled, BoxedApp:

  • Intercepts system calls such as CreateFile, ReadFile, and WriteFile.
  • Provides applications with transparent access to virtual files.
  • Ensures that virtual and real files coexist seamlessly.

Disabling this option can be useful for diagnostic or debugging purposes if you want to temporarily bypass virtualization.

See Also