SetStartupInfo
The SetStartupInfo function is called once, after the DLL module is loaded to memory.
This function gives the plugin information necessary for further operation.
void WINAPI SetStartupInfo( const struct PluginStartupInfo *Info );
Parameters
Info
Points to a PluginStartupInfo
structure.
Return value
None.
Remarks
- In FAR Manager 1.65 or older this function is called first just after the DLL module is loaded.
- In FAR Manager 1.70 or later this function is called after GetMinFarVersion.
- The Info pointer is valid only until return, so the structure must be copied to an internal variable for further usage:
static struct PluginStartupInfo Info; ... void WINAPI _export SetStartupInfo(const struct PluginStartupInfo *Info) { ::Info=*Info; ... }
- 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 ... }