The Service Object - Script2Service Programming Interface

Document Path: Home Page / Programming / Script2Service / Interfaces / Service Object  
Introduction

This is only object exposed to applications outside of the service. The following line shows how a outside application get a service object:

var svc=new ActiveXObject("{D5572CF6-36E2-4312-A662-72D79B81B6DC}");

Where '{D5572CF6-36E2-4312-A662-72D79B81B6DC}' is the AppID of the service.

Properties IsService S2SLicense ServiceDisplayName ServiceName
Methods CallFunction CreateFunctionArguments GetStop StartThread
Properties

IsService

Value BOOL
Access Get
Notes
true: the program is running as service
false: the program is running in interactive mode

ServiceDisplayName

Value BSTR
Access Get
Notes

ServiceName

Value BSTR
Access Get
Notes
Methods

CallFunction

Return Value VARIANT
Arguments:
  • BSTR scriptName
  • BSTR functionName
  • Arguments (Optional, default(0))
Notes

CreateFunctionArguments

Return Value Function Arguments Object
Notes

GetStop

Return Value BOOL
Notes

StartThread

Return Value Thread Object
Arguments:
  • BSTR scriptName
  • BSTR functionName
  • Arguments (Optional, default(0))
  • int priority (Optional, default(0))
Notes