RequestProc
RequestProc is a callback function, which the plugin can call to request input from the user. When using one of the standard parameters, the request will be in the selected language. The address of this callback function is received through the
FsInit() function when the plugin is loaded.
Declaration:
BOOL __stdcall RequestProc(int PluginNr, int RequestType, char* CustomTitle, char* CustomText, char* ReturnedText, int maxlen);
Description of parameters:
PluginNr Here the plugin needs to pass the plugin number received through the
FsInit() function.
RequestType Can be one of the RT_XXX flags:
RT_Other The requested string is none of the default types
RT_UserName Ask for the user name, e.g. for a connection
RT_Password Ask for a password, e.g. for a connection (shows ***)
RT_Account Ask for an account (needed for some FTP servers)
RT_UserNameFirewall User name for a firewall
RT_PasswordFirewall Password for a firewall
RT_TargetDir Asks for a local directory (with browse button)
RT_URL Asks for an URL
RT_MsgOK Shows MessageBox with OK button
RT_MsgYesNo Shows MessageBox with Yes/No buttons
RT_MsgOKCancel Shows MessageBox with OK/Cancel buttons
CustomTitle Custom title for the dialog box. If NULL or empty, it will be "Total Commander"
CustomText Override the text defined with RequestType. Set this to NULL or an empty string to use the default text. The default text will be translated to the language set in the calling program.
ReturnedText This string contains the default text presented to the user, and will receive the (modified) text which the user enters. set ReturnedText[0]=0 to have no default text.
maxlen Maximum length allowed for ReturnedText. The pointer ReturnedText must point to a buffer which can hold at least maxlen characters.
Return value:
Returns TRUE if the user clicked OK or Yes, FALSE otherwise.
Important note:
Leave CustomText empty if you want to use the (translated) default strings!