CallConversionFunction Function

Action

Converts the value sValueToConvert by using the conversion function sConversionFunction in the DLL sConversionDll. Usually this function is used by recording rules.

Include file

Kernel.bdh

Syntax

function CallConversionFunction(
  sConversionDll : in string,
  sConversionFunction : in string,
  sValueToConvert : inout dstring explicit) : string;

Return value

The converted value. If conversion failed, then the original value is returned.

Parameter Description
sConversionDll The name of the conversion DLL. This is the filename without the full path. The DLL is searched for in the recording rules directory and the current project directory.
sConversionFunction The function is called to convert the value and is exported by the conversion DLL.
sValueToConvert A variable which contains the value is converted. The conversion is done in place so the value of the variable passed is changed.

Example

dclfunc
 function ConvertToUpperCase(sValueToConvert : string) : string <API_FUNCTION>
 var
 begin
  ConvertToUpperCase := CallConversionFunction("SampleConversion.dll", "ConvertToUpperCase", sValueToConvert);
 end ConvertToUpperCase;

dcltrans
 transaction TMain
 begin
  WebSetBrowser(WEB_BROWSER_MSIE8);
  WebSetUserBehavior(WEB_USERBEHAVIOR_FIRST_TIME); 
 end TMain:

  

Sample script

CConversionRecRule.bdf

SilkEssential sample

CConversionRecRule.sep