ScriptStop 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 stops the execution of a script that is running on a neoVI device.

C/C++ Declare

int _stdcall icsneoScriptStop(int hObject);

Visual Basic Declare

Public Declare Function icsneoScriptStop Lib "icsneo40.dll" (ByVal hObject As Long) As Long

Visual Basic .NET Declare

Public Declare Function icsneoScriptStop Lib "icsneo40.dll" (ByVal hObject As Int32) As Int32

C# Declare

[DllImport("icsneo40.dll")]
public static extern Int32 icsneoScriptStop(Int32 hObject);

Parameters

hObject
   
[in] Specifies the driver object created by OpenNeoDevice.

Return Values

1 if the function succeeded. 0 if it failed for any reason. GetLastAPIError must be called to obtain the specific error. 

Remarks

If a script is executing on the neoVI calling this method will stop it. The script will still be present on the device and can be started again by ScriptStart. The errors that can be generated by this function are:

NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE = 75
NEOVI_ERROR_DLL_SCRIPT_NO_SCRIPT_RUNNING = 226


Examples

Visual Basic Example

Dim iResult As Long

'//Stop CoreMini
iResult = icsneoScriptStop(m_hObject)

If iResult = 0 Then
    lblCMStatus.Caption = "CoreMini Failed to Stop"
Else
    lblCMStatus.Caption = "CoreMini Stopped"
End
If

C/C++ Example:

int iRetVal;
unsigned long lLastErrNum;

iRetVal = icsneoScriptStop(m_hObject);
if(iRetVal == 0)
{
    printf(
"Failed to Stop the script API Error\n");
}
else
{
   
printf("Successfully stopped the script\n");
}


C# Example:

Int32 iResult;

//Stop CoreMini
iResult = icsNeoDll.icsneoScriptStop(m_hObject);

if(iResult == 0)
{
    lblCMStatus.Text = "CoreMini Failed to Stop";
}
else
{
    lblCMStatus.Text = "CoreMini Stopped";
}


Visual Basic .NET Example:


Dim
iResult As Int32

'//Stop CoreMini
iResult = icsneoScriptStop(m_hObject)

If iResult = 0 Then
    lblCMStatus.Text = "CoreMini Failed to Stop"
Else
    lblCMStatus.Text = "CoreMini Stopped"
End
If

intrepidcs API Documentation - (C) Copyright 2000-2012 Intrepid Control Systems, Inc.  (www.intrepidcs.com)

Last Updated : Tuesday, December 30, 2008