T-EXEC TRANSFER EXEC DLL ======================== (For use with Serv-U32.exe v2.2a and later only!) This DLL makes Serv-U run a program of your choice at the completion of a file transfer (upload or download). This program can also be a batch file, and various transfer parameters can be passed to it. The setup info needed by this DLL should be put in a file named T-EXEC.INI. The file should have the following form (example): [EXEC] UploadSuccess=c:\program files\vscan\scan.exe %f DownloadSuccess=c:\command.com /c c:\batch\countdown.bat %f UploadFailed=c:\logs\error.exe %f %h %i %u %c %d DownloadFailed=c:\logs\error.exe %f %h %i %u %c %d The syntax should speak for itself. Supported are separate programs after a successful upload or download, as well as after an unsuccessful upload or download. If only certain events are needed, just leave out the additional lines in the .ini file. A number of meta-characters are supported which are replaced when the program is executed. The supported meta characters are: %f = full path/file name of file transferred %d = duration of transfer in ms. %c = sub-event code number %u = user name that transferred the file %i = IP address of FTP client %h = server home IP address Since the system's directory at the moment of execution is not known only full path names should be used for both programs and any arguments that are files. To invoke a batch file the "c:\command.com /c" command should work for Win95/98, as shown in the sample .ini file. In NT "c:\winnt\system32\cmd.exe /c" should work equally well, but this has not been tested. The file T-EXEC.DLL should be placed in the Serv-U directory, and the SERV-U.INI file should be updated to make it load the DLL upon startup. This is done by adding a section to the .ini file reading (if it doesn't exist already): [EXTERNAL] EventHookDLL1=T-EXEC.DLL If other event hooking DLL's are already present in this section a new line like the above one should be added with the proper sequential number. The files are: T-EXEC.DLL - 32-bit transfer program exec DLL T-EXEC.INI - sample .ini file for the T-Exec DLL README.TXT - this file SOURCE CODE =========== The full source code of the DLL is provided as an example of an event hooking DLL for Serv-U. It can be found in the file SOURCE.ZIP and was made for Borland C++ v5.02 (But no Borland specific extensions were used, so it should be easily portable to other compilers). The files are: T-EXEC.CPP - WU_FTP log file format DLL source code T-EXEC.H - header file for log DLL T-EXEC.DEF - module definition file for DLL T-EXEC.IDE - borland project file for DLL NOTE ==== As is usual with shareware: No warranty or support is provided with this DLL or the source code. Use is *completely* at your own risk. For feedback, bug reports or other comments please contact the author at Rob@cat-soft.com.