{ defines the Execute method that plugins must implement 
  It takes a string of parameters and returns an integer, 0 if successful
}
type
 TPluginExecute = function (AParameters: String): Integer; StdCall;
 
 

var
	DLLHandle : THandle;
	PluginExecute : TPluginExecute;
	Integer : Success;
	
begin

	{ load the DLL }
	DLLHandle := LoadLibrary('MyPlugin.dll');
	
	{ if it loaded, find the execute function }
	if DLLHandle <> 0 then
		@PluginExecute := GetProcAddress(DLLHandle, 'Execute');
		
	{ if we found the function, call it }
	if @PluginExecute <> nil then
		Success := PluginExecute('here are the params');
		
	{ unload the DLL }
	FreeLibrary(DLLHandle);
		
		
end;