reference:plugins:vfs_plugins:vfs_usbsafe

VFS_USBSafe(
     LPOPUSUSBSAFEDATA:lpUSBSafeData
)
→ BOOL

Arguments

lpUSBSafeData

[in,out] A pointer to an OPUSUSBSAFEDATA structure

Return value

The function must return TRUE if the plugin is to be allowed to be exported to a USB device. If you return FALSE, or do not export this function at all, the user will be unable to export your plugin to USB drives.

Description

The VFS_USBSafe function is called when the user is performing an export of their Opus installation to a USB drive. It lets you indicate that your plugin is safe to run off USB and also lets you specify other files that must be exported alongside your plugin.

You should not indicate that you are USB safe unless that really is the case. Generally, this simply means storing all configuration data in XML files using the functions provided by the Plugin Support API, rather than writing to the registry. Opus plugins should not make any changes to the host system when running in USB mode.

You can use the provided OPUSUSBSAFEDATA structure to indicate other files that must be exported alongside your plugin. If your plugin requires additional support files (eg, the unrar plugin requires the unrar.dll library), copy them into the provided pszOtherExports field. They must be provided as a double-null terminated list of filenames, relative to the Opus VFS Plugins folder. The cchOtherExports field specifies the size of the provided buffer.

Note that there is no ANSI version of this function.