put_HideVirtualFileFromFileDialog

Description

Specifies whether virtual files should be hidden in standard Windows file dialogs (such as Open File or Save As).
When enabled, the packed executable will not show virtual files in these dialogs, even though they exist in the virtual file system.

This can be useful when you want to prevent users from interacting with internal or hidden files that exist only in the virtual environment.

Syntax

HRESULT put_HideVirtualFileFromFileDialog([in] VARIANT_BOOL bValue);

Parameters

bValue
Type: VARIANT_BOOL
[in] Pass VARIANT_TRUE to hide virtual files from system dialogs, or VARIANT_FALSE to show them.

Return Value

Returns an HRESULT.

  • S_OK if the option was successfully set.
  • E_FAIL or another COM error code if an error occurred.

Example

CComPtr<IBxProject> project;
if (SUCCEEDED(BxPackerApi_CreateProject(&project))) {
    // Hide virtual files from file dialogs
    project->put_HideVirtualFileFromFileDialog(VARIANT_TRUE);
 
    // Continue configuring and building the project
    // project->Build();
}

Remarks

  • This option affects how the packed executable interacts with the system's common file dialogs.
  • When enabled, virtual files remain accessible programmatically (e.g., through file I/O APIs) but are not visible to users via UI dialogs.
  • Use get_HideVirtualFileFromFileDialog to query the current setting.
  • This can be particularly useful for applications that include private resources in the virtual file system and want to prevent accidental user access.

See Also