ProcessHostFile

Far Manager

ProcessHostFile

The ProcessHostFile function is called to perform FAR archive commands. It is recommended to use this function to perform additional operations on the file that is handled by a file processing plugin.
int WINAPI ProcessHostFile(
  HANDLE hPlugin,
  struct PluginPanelItem *PanelItem,
  int ItemsNumber,
  int OpMode
);

Parameters

hPlugin
Plugin handle returned by OpenPlugin or OpenFilePlugin.
PanelItem
Points to an array of PluginPanelItem structures. Each structure corresponds to a selected file in the plugin panel.
ItemsNumber
Number of elements in the PanelItem array.
OpMode
Combination of the operation mode flags. For this function it is either 0 or OPM_TOPLEVEL.

Return value

If the function succeeds, the return value must be TRUE. If the function fails, FALSE should be returned.

Remarks

If the operation failed, but part of files was successfully processed, plugin can remove selection only from the processed files. To perform it, the plugin should clear PPIF_SELECTED flag in processed items in the PluginPanelItem list passed to the function.