Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
jfredrickson1 Absent Member.
Absent Member.

Extend AppScript with .NET library

The SBM AppScript guide explains how to load a custom DLL and provides example C code for the custom library.

Is it possible to load and use a .NET class library? Are there any examples out there?
Tags (4)
2 Replies
pmthompson1954 Absent Member.
Absent Member.

Re: Extend AppScript with .NET library

You probably read the following in the AppScript manual. I think you may have to write a "wrapper" dll that makes the .NET callable using the documented interface. You could also try to shell out to a .VBS or .ASP script with Ext.CmdLineWait().

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


robert_hoffman Absent Member.
Absent Member.

Re: Extend AppScript with .NET library

Anyone know if you can run .NET dll from appscript?
I read through the documentation, but didn't see any clear way to accomplish. Any progress on mapping the old typedef maybe? Or is the only clear path to loading a dll written in C?
This reply was created from a merged topic originally titled
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.