Understanding the C interface

Available on Windows and UNIX, Synergy DBL’s C interface enables you to add user‑designed C and Assembly routines to your Synergy application by building a Windows DLL or UNIX shared object that contains your C routines. (The Synergy DBL C interface is not needed on OpenVMS, because on OpenVMS, you can simply write a routine in C, compile it, link it into your program, and call it directly from your Synergy code without doing anything special.)


All data and routine access is accomplished with the Synergy DBL C interface routines. Any other routine or data access is not supported.

The runtime object code is distributed and can be linked at your site. Parts of the runtime are distributed as object modules; other parts are distributed as object libraries.

Synergy DBL distributions have a default runtime that contains all Synergy DBL system‑supplied external subroutines. Any C routines that you include in your DLL or shared object can also access interface functions in the runtime. See Runtime interface functions for a list of the runtime interface functions you can access.

You must include the file xcall.h at the beginning of your C routine. For example:

#include "xcall.h"

The xcall.h file defines the following typedefs:


Synergy DBL data descriptor


Synergy DBL routine access structure


C routine access structure


Global data access structure


Synergy DBL channel status structure

Because xcall.h may change between releases, we recommend that you recompile and relink your C routines.

The following routines can be called from a C language routine on OpenVMS. They are described further in the xcallv.h file that came with your Synergy DBL distribution:


Issue a Synergy DBL error.


Load a string into a field.


Get a subroutine argument as a null‑terminated string.


Get a subroutine argument as a value.


Do a Synergy DBL store operation.


Load an integer value into a field.