ScriptGetScriptStatus Method - intrepidcs API
C/C++ declare -
VB declare - VB.NET declare
- C# declare - Parameters - Return
Values - Remarks - C/C++ example
- VB example - VB.NET
example - C# example
This method returns the status of the script on a neoVI device.
C/C++ Declare
int
_stdcall
icsneoScriptGetScriptStatus(int hObject,
unsigned int iFunctionBlockIndex,
int
*piStatus);
Visual Basic Declare
Public
Declare Function icsneoScriptGetScriptStatus Lib "icsneo40.dll" (ByVal hObject As Long, ByRef piStatus As Long) As LongVisual Basic .NET Declare
Public
Declare
Function
icsneoScriptGetScriptStatus Lib
"icsneo40.dll" (ByVal
hObject As Int32,
ByRef piStatus
As Int32)
As
Int32
C# Declare
[DllImport("icsneo40.dll")]
public
static
extern Int32
icsneoScriptGetScriptStatus(Int32 hObject,
ref
Int32 piStatus);
hObject
[in] Specifies the driver object created by OpenNeoDevice.
iFunctionBlockIndex
[in] The index value of the function
block
piStatus
[out] 0 = Stopped 1 = Running
1 if the function succeeded. 0 if it failed for any reason. GetLastAPIError must be called to obtain the specific error. The errors that can be generated by this function are:
NEOVI_ERROR_DLL_SCRIPT_NO_SCRIPT_RUNNING = 226
The script must have been successfully downloaded to the neoVI using ScriptLoadScript.
Examples
Visual Basic Example
Dim
iResult As
Long
Dim iStatus As
Long
'//Get CoreMini Status
iResult = icsneoScriptGetScriptStatus(m_hObject, iStatus)
If iResult = 0
Then
lblCMStatus.Caption =
"Failed to get CoreMini Status"
Else
Select
Case iStatus
Case
SCRIPT_STATUS_RUNNING
lblCMStatus.Caption = "CoreMini Script
Running"
Case SCRIPT_STATUS_STOPPED
lblCMStatus.Caption = "CoreMini Script
Stopped"
Case
Else
lblCMStatus.Caption =
"Unhandled State"
End
Select
End
If
C/C++ Example:
int
iRetVal;| intrepidcs API Documentation - (C) Copyright 2000-2010 Intrepid Control Systems, Inc. (www.intrepidcs.com) |
Last Updated : Tuesday, December 30, 2008