You are on page 1of 1

Notes on User-written DLL Routines:

----------------------------------SUPPORTED COMPILERS:
We support Microsoft C/C++ 5.0 or later for user code.
Other compilers may work to the extent that they are
compatible with Microsoft compilers, but Rockwell Software
does not directly support or encourage any such use.
If you want to use a compiler other than those listed above, your
compiler must be able to do the following:
1) Generate a Win32 DLL
2) Generate function calls that use the cdecl calling convention used
by the Microsoft Visual C++ compiler.
The calling convention is as follows:
a) function arguments are pushed from right to left onto the
stack. The calling routine will remove the arguments from
the stack.
b) No arguments are passed in registers.
3) Generate function names that are not decorated/mangled. The
extern "C" is used by some compilers to perform this function.
DISTRIBUTED FILES:
The files provided for use with Microsoft C++ are:
msuserc.dsw
userc.cpp
smsim.lib
simlib.h
msuserc.def
stdafx.h
INSTRUCTIONS FOR USE:
To create your own user-code, edit the userc.cpp file (for C++) and
replace the dummy code with your own code for any or all routines.
Next build the project to create a Win32 Dynamic Linked Library (DLL).
By default, the DLL will be named msuserc.dll. (This name may be
changed by editing the project file).
To use the DLL created, open a model in Arena and click the Run/Setup
menu option. Select the Run Control page and type the name of the DLL
at the 'Load User-coded .DLL' prompt. This information will be saved
with the model file. Alternatively, you may choose to specify a DLL
to be used by all new models by selecting the Tools/Options menu
item, selecting the Run Control tab, and typing the name of the DLL at
the 'Load User-coded .DLL' prompt there.

You might also like