Home Page
        Orders     Downloads     Support     Contact     Deutsch
ZOC Terminal is a professional SSH Client and Terminal Emulator for Windows and macOS.
PyroBatchFTP Online Help Topic:

Scripting Methods → Executing Commands via PyroBatchControl

If you want feed commands into PyroBatch from another application and immediately get the results (rather than running a complete script file and checking the result log later), you can do this by means of the PYROBATCHCONTROL.DLL. The DLL operates as an interface between your program and PyroBatchFTP. You will find this DLL in the PyroBatchFTP directory.

This DLL contains one function which can be called from C/C++, the various Visual Basic flavours or from other development tools like Delphi etc.

Sample Applications

Please check the C:\Program Files\PyroBatchFTP\PyroBatchControl. directory for sample code and projects for Visual C/C++, Visual Basic and MS-Access. Technical Details

The name of the DLL is PYROBATCHCONTROL.DLL. The function is exported under the name _PyroBatch@16 It takes four parameters and returns a 32 bit value.

 

C/C++ Style Prototype:

int __stdcall _PyroBatch(const char *app, const char *cmd, char *result, int resultsize);.

 

Visual Basic Declaration:

Declare Function PyroBatch Lib "pyrobatchcontrol.dll" Alias "_PyroBatch@16" (ByVal lpApp As String, ByVal lpCmd As String, ByVal lpResult As String, ByVal nResultSize As Long) As Long.

 

Power Builder Declaration:

Function Long PyroBatch(String lpApp, String lpCmd, REF String lpResult, Long nResultSize) Library "pyrobatchcontrol.dll" Alias for "_PyroBatch@16".

 

Parameter Description:

       
app
 

The name of the accessed application, i.e. either "PyroBatch" or "PyroBatchFTP"

cmd
 

One of the following commands to attact/detach from PyroBatchFTP or any of the PyroBatchFTP Commands to execute.

START
 

Start a new instance of PyroBatchFTP or attach to a currently running instance. If PyroBatchFTP was not installed using the install wizard, you need to specify the directory where the executeable resides in the form appdir="<directory>", e.g. START appdir="c:\apps\pyrobatch"

HELLO
 

Attach to a currently running instance (fails if none is started).

BYE
 

Detach from a session, but keep PyroBatchFTP running (unless a TerminateAfterScript command was issued).

TERM
 

Detach from seesion and close PyroBatchFTP.

<other>
 

Any of the :PyroBatchFTP Commands.


result
 

A buffer which will be filled with the result string. The result will always be prefixed by "#nnn " where nnn is a standard PyroBatch result code (200-299 OK, see Result Codes)

resultsize
 

The maximum size of the supplied result buffer.

return value
 

The function returns 0 if there is a general problem or non-zero if the command could be delivered to PyroBatchFTP.
A command was correctly executed if returns non zero and if the result string starts with "#200" - "#299".

 

 
← Back to Scripting Methods

 

Downloads
Orders
Contact
Support
Terms of Use
Privacy Policy
pixel