Canceling running script through DLL interface

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Posts: 8
Joined: Tue Jan 13, 2015 11:59 am

Canceling running script through DLL interface

Post by geoffwoz » Wed Jan 21, 2015 3:38 am

We are currently calling to scripts via the RunCode DLL interface.

The problem we are having is we want the ability to cancel these scripts from the external source.

The problem we've found is the DLL interface doesn't have a Stop function (as is the case in the OCX interface). To stop execution of the script.

We tried calling to cleanup, but that resulted in an exception (attached).

How can we (through the DLL interface) stop a currently running script, so we can cleanup and run another script ?
exception.png (33.83 KiB) Viewed 1623 times

User avatar
Marcus Tettmar
Site Admin
Posts: 7281
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK

Re: Canceling running script through DLL interface

Post by Marcus Tettmar » Wed Jan 21, 2015 9:25 am


There is a Stop function (the OCX is a wrapper for the DLL, so what the OCX can do the DLL must do). Maybe it is missing from the DLL section of the reference. The function definition is:

function Stop: integer; stdcall;

The parameter is reserved, and you can pass anything.

e.g. Stop(0);
Marcus Tettmar |

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts