Creating the SBM Library Object

SBM AppScript can load a DLL and call any function within the DLL as long as the function has the following interface:

int function_name( TTScriptArg*, int, ReallocArg_t );

where the first argument is an array of TTScriptArg objects, the second parameter is the number of objects in the array, and the third is a callback function pointer back into SBM to resize any of single TTScriptArg in the array.

When building your libraries, you must include a header file with the following definition:

struct TTScriptArg
  {
    char* pData;
    int   size;
  };
typedef int (*ReallocArg_t)( TTScriptArg* pArg, int newSize );
It does not matter what you name the function as long as it has the correct interface.
Tip: When creating your DLL, remember to export the functions by listing them in your .def file as well as declaring them for export with __declspec(dllexport).