# ThreadIbcntl

long ThreadIbcntl (void);

## Purpose

Returns the value of the thread-specific ibcntl variable for the current thread.

The global variables ibsta, iberr, ibcnt, and ibcntl are maintained on a process-specific rather than a thread-specific basis. If you call GPIB functions in more than one thread, the values in these global variables are not always reliable.

Status variables analogous to ibsta, iberr, ibcnt, and ibcntl are maintained for each thread. ThreadIbcntl returns the value of the thread-specific ibcntl variable.

If you do not use multiple threads, ThreadIbcntl returns a value identical to the value of the ibcntl global variable.

## Parameters

None.

## Return Value

Name | Type | Description
--- | --- | ---
threadSpecificCount | long integer | Number of bytes actually transferred by the most recent GPIB read, write, or command operation for the current thread of execution. If an error occurred loading the GPIB DLL, ThreadIbcntl returns a Windows error code.

## See Also

ThreadIbsta, ThreadIberr, ThreadIbcnt