ScriptGetScriptStatus Method - neoVI API
This method returns the status of the script on a neoVI device.
int _stdcall icsneoScriptGetScriptStatus(void * hObject, unsigned int iFunctionBlockIndex, int *piStatus);
Parameters
hObject
[in] Specifies the driver object created by OpenNeoDevice.
iFunctionBlockIndex
[in] The index value of the function block
piStatus
[out] 0 = Stopped 1 = Running
Return Values
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
Remarks
The script must have been successfully downloaded to the neoVI using ScriptLoadScript.
Examples
int iRetVal;
int iStatus;
unsigned long lLastErrNum;
iRetVal = icsneoScriptGetScriptStatus(hObject, &iStatus);
if(iRetVal == 0)
{
printf("\nFailed to get the script status. API Error = %d\r\n", lLastErrNum);
}
else
{
printf("\nScript status = %s\r\n", iStatus == 0 ? "Stopped" : "Running");
}
Last updated