Software => Rightload - Official Forums => Documentation => Topic started by: nk on August 06, 2008, 04:35:42 PM

Title: How to Create Upload Plugins
Post by: nk on August 06, 2008, 04:35:42 PM
Rightload's upload plugin feature allows you to write your own upload handlers that will be integrated into Rightload. All you have to do is create a DLL that exports a few functions and put it into Rightload's plugin directory.

The C++ header file with commented functions is here:

When building the DLL, you have to make sure that the function names are actually the plain names with no @XX at the end. In GCC, this can be archived by adding "-Wl,--add-stdcall-alias" to the linker options. You can use Microsofts "Dependency Walker" (depends.exe) to check this.

To keep the DLL size down, you can link dynamically against libcurl, as this library will be included with the main Rightload download.

To provide additional details and settings for your plugin, you can provide an example plugin info XML to Rightload. This file has to have the same name as the DLL and must also be located in the plugins folder. An example can be found here:

The option fields you specify under "OptionFields" will be displayed in Rightload and passed on to your plugin using the SetOption function.

The cache variables will be requested from your plugin after the upload using the GetCacheVar function and then returned to your plugin before the next upload using the SetCacheVar function. To keep a variable in the cache indefinitely, you need to make sure that GetCacheVar always returns the value that your plugin has obtained from SetCacheVar.

If you have any questions, please post here or contact me!