---
name: "NJB_Release"
section: "3"
platform: "linux"
package: "libnjb1-doc"
version: "1.1-2"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/NJB_Release"
---

# NJB\_Release(3)

Capture or release an NJB

## NAME

NJB\_Capture, NJB\_Release - Capture or release an NJB

## LIBRARY

libnjb

## SYNOPSIS

\#include \<libnjb.h\>

extern int njb\_error

NJB\_Capture (njb\_t **\*njb**)

NJB\_Release (njb\_t **\*njb**)

## DESCRIPTION

The NJB\_Capture function "captures" the NJB device, which locks out the control buttons on the device itself.  Any attempt to use the NJB controls directly will result in a "HOST IS IN CONTROL" message on the LCD screen.

Capturing the NJB is an essential part of the session, since you want to ensure that only the controlling software can modify the contents of the device.

**\*njb** must be an njb object that was previously opened via  [**NJB\_Open**(3)](/NJB_Open/3.md).

To release the NJB, use the NJB\_Release command.

## RETURN VALUES

Both functions return 0 upon success, and return -1 and set  **njb\_error** on failure:

- EO\_USBCTL

  An I/O error occured when speaking on the control pipe

- EO\_BADSTATUS

  The NJB returned a "failure" status in response to the capture or release command.

## SEE ALSO

[NJB\_Open(3)](/NJB_Open/3.md)
