About DLL versions of plugins

Since ADR version 1.5 the new plugin’s format is available, the special Dynamic Link Libraries (.DLL). They don’t differ from usual EXE-plugins from the user’s point of view. And if you have two plugin versions (.EXE and .DLL) you can use any from them. However, the new .DLL versions are more preferred, because they work 2..4 times faster. Now there are .DLL versions for all old .EXE-plugins from ADR distributive.

.EXE plugin version is run again for each message copy. And if you process the mailing with the thousand of addresses by plugin, the program will start thousand times. The new plugins in .DLL format are loaded once before tossing (mailing by list) and the special function will be called to process each message. The .DLL will be unloaded after end of tossing. The .DLL version usage save your time in 2..4 times and decrease the CPU and hard disk loading.

The description below is for the programmers. After .DLL plugin loading, ADR tries to import AdrPlugin function from the library. In case of failure ADR tries to import _AdrPlugin function and in case of repeated failure – the function with the 10 number. This function must have the next prototype:

DWORD WINAPI AdrPlugin(char* MessageFileName); /* C/C++ notation */

function AdrPlugin(MessageFileName : PChar) : Integer; stdcall; /* Delphi notation */

ADR don’t use the value returned by function. But it’s recommended to return 0 or 1 value to avoid possible conflicts with the future versions. ADR call the function from the plugin to process the message and specify the whole path and name of file with message. The most of ADR .DLL plugins are distributed with C or Delphi source codes, and you can learn them if you have any question.

The TestDLL utility was created to test DLL-plugins without ADR. The utility is distributed with its source code. You can apply to its code to know about plugin’s loading mechanism and how to work with them.

Internal SMTP server and mailboxes, Information for programmers