USB-I/O Interface Adapter GPIO-24. Programmer's Reference Manual.


2.1.4. GPIO_OpenDevice()

GPIO_RESULT GPIO_OpenDevice(
      int  nDevice,
      HGPIO*  phDevice
);

The GPIO_OpenDevice() function opens the GPIO-24 adapter, specified by its number, and returns its handle.

Parameters:

nDevice

The number of the device to be opened.

phDevice

Pointer to a variable to be filled with the device handle.

Return values:

GPIO_S_SUCCESS

The device was successfully opened and *phDevice contains correct handle.

GPIO_S_ALREADY_OPENED

The device has been already opened; *phDevice contains the same handle as was returned previously.

GPIO_E_INVALIDARG

Invalid argument has been provided (nDevice must be in the range from 0 to number of devices - 1).

GPIO_E_FAIL

Failed to open device.

GPIO_E_NOT_INITIALIZED

Library has not been initialized.