Is it really necessary to copy FSF structure? Isn't this table static with it's address fixed in address space of Far, is it? Or this table is created temporary like PluginStartupInfo structure, which is passed to SetStartupInfo?If the plugin uses "standard functions" from the FarStandardFunctions structure then the PluginStartupInfo.FSF member must be copied to an internal variable for further usage:
static struct PluginStartupInfo Info;
static struct FarStandardFunctions FSF;
void _export SetStartupInfo(struct PluginStartupInfo *psInfo)
{
Info=*psInfo;
FSF=*psInfo->FSF;
Info.FSF=&FSF; // adjust the address in the local variable
...
}
FarStandartFunctions persistance
FarStandartFunctions persistance
From API reference in SetStartupInfo page