TeleFlow Step 0523

TeleFlow Step 0523

From TeleFlow

Jump to: navigation, search

Image:iv_523.gif DLL Function Step
Calls a function from a custom dynamically linked library (DLL).

Use of this step requires a custom DLL that exports a function with the following properties (see example):

  • accepts a constant char* null terminated string as the sole parameter
  • returns type char* that points to a dynamically allocated null terminated string that can be freed by the step


Properties

DLL file containing function: The directory path to and filename of the DLL file from which the function will be called.

Function name to call: The name of the function, with underscores if necessary.

Function parameters: The string of information that will be passed to the function.

Variable to receive result: The TeleFlow variable that will receive the string returned by the function; this variable will be empty if the function returns a NULL pointer

Action Steps

Image:Iv_930.gif Failure: Here are some reasons the DLL Function step might fail:

  • TeleFlow could not find the DLL file: the path may not have been correct; the file extension may have been omitted.
  • A function matching the name with the correct return type and parameters was not available from the DLL: an underscore may have been necessary; the function may not be exported properly.
  • Sometimes this step will fail if too many application instances run it on the same DLL at one time. For this reason, it can help on a Fail to wait for a second, then try again (although, this should only be done once or twice for an individual step, to avoid infinite loops).


EXAMPLE: The following screen capture is from the properties step of the DLL Function step in the example "DLL Function" application that ships with TeleFlow.

DLL_Step
Get Environment Variable: getenv.cpp and getenv.h.

Related Steps

None.