The Thread Object - Script2Service Programming Interface

Document Path: Home Page / Programming / Script2Service / Interfaces / Thread Object  
Properties ErrorMessage ExitCode Name Property ReturnValue Service
Methods GetMessage IsRunning PostMessage Resume Suspend Wait
Properties

ErrorMessage

Value BSTR
Access Get
Notes

ExitCode

Value ULONG
Access Get
Notes The exit code of the thread is the HRESULT value returned by COM

Name

Value BSTR
Access Get, Put
Notes

Property

Value VARIANT
Arguments:
  • BSTR name
Access Get, Put
Notes

ReturnValue

Value VARIANT
Access Get
Notes This the return value of the script function.

Service

Value Service Object
Access Get
Notes
Methods

GetMessage

Return Value ULONG
Notes
For functions inside the thread to retreive a message.
returns 0 if no message.

IsRunning

Return Value BOOL
Notes
true: the thread is still active
false: the thread has exited

PostMessage

Return Value BOOL
Arguments:
  • ULONG msg
Notes
Functions or applications outside of the thread use this method to inform the thread.

Resume

Return Value
Notes
Continue to execute this thread. 
 This method is for functions or applications outside of the thread.

Suspend

Return Value
Notes
Suspend the thread.
This method is for functions or applications outside of the thread.

Wait

Return Value
Arguments:
  • long milliseconds
Notes
This method is for functions or applications outside of the thread. If milliseconds is
less than 0, this method wait untill the thread exits.