The big picture

Embed provides an Application Programming Interface (API) that lets you extend the standard block set by creating Dynamic Link Library (DLL) files and binding them to userFunction blocks. A DLL file is like a regular executable file with the exception that it cannot start execution on its own. A DLL function can be called just like functions that are part of a normal executable file.

The following illustration shows the process of creating a DLL from a C source file; however, you can also create DLLs in Fortran, Pascal, and C++.

The main steps in creating DLLs are:

1.    Create or edit an existing C, Fortran, or Pascal source file.

2.    Create a project DLL for your compiler.

3.    Execute a build operation, which compiles your source code into an object file.

4.    Link the object file with VISSIM32.LIB to produce a DLL.

Embed also provides a DLL Wizard that automatically performs steps 1, 2, and 4.