Here are some issues that could come up if you are calling DLL functions in a script.
Only specific data types are compatible with 4Test. These data types are listed in C data types for DLL functions.
If your DLL calls have data types not supported by 4Test, then the functions must be wrapped such that only compatible data types are used for the return type and arguments of the function. Any data types can be used inside the DLL function.
In the DLL declaration, use the fully qualified path of the DLL, not just the file name.
When the communication timeout between the Open Agent and the application under test is too small, the CallDllFunction might generate the error message Error executing 'CallDllFunction'. Communication timeout between agent and application.
-DDefaultCommTimeout=300000This code sets the timeout to 300000 milliseconds, which means 5 minutes. To specify no timeout, set the value to -1.
Make sure the directory containing the DLL is on the path.
This usually means that your path does not include the directory containing the DLL. If you are running remotely, make sure that the path on the machine running the agent includes the DLL directory.
The most likely scenario is that the DLL is a C++ library and the function name has been mangled. To use functions in a C++ library, you need to wrap the functions with the C wrapper and recompile. Then Silk Test Classic can access the function in the library.
If this is not the problem, there might be a typo in the function name in the DLL.
If the user calls a DLL function with an output string buffer that is less then the minimum size of 256 characters, the original string buffer is resized to 256 characters and a warning is printed. This warning, String buffer size was increased from x to 256 characters (where x is the length of the given string plus one) alerts the user to a potential problem where the buffer used might be shorter than necessary.