Start of trail hil_task_start navigation bar

hil_task_is_valid

Determines whether an HIL task handle is valid.

Description

The hil_task_is_valid function returns a non-zero value if the given task handle is valid. A task handle is valid if it was returned by successful call to one of the task creation functions and has not been deleted. If the task handle is invalid, this function returns zero.

Prototype

t_boolean 
hil_task_is_valid(t_task task);
    

Parameters

t_task task

A handle to the task, as returned by one of the task creation functions.

Return value

The return value is non-zero if the task handle is valid. Otherwise it is zero.

Error codes

This function does not return any error code.

Requirements

Include Files

Libraries

hil.h

hil.lib;quanser_runtime.lib;quanser_common.lib

Examples

if (!hil_task_is_valid(task))
{
    _tprintf(_T("Task handle is invalid.\n"));
    return;
}
    

 

navigation bar