# ThreadIbcnt

int ThreadIbcnt (void);

## Purpose

Returns the value of the thread-specific ibcnt 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. ThreadIbcnt returns the value of the thread-specific ibcnt variable.

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

## Parameters

None.

## Return Value

Name | Type | Description
--- | --- | ---
threadSpecificCount | 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, ThreadIbcnt returns a Windows error code.

## See Also

ThreadIbsta, ThreadIberr, ThreadIbcntl