unsigned long GetDevices(void)
Returns a 32-bit bit-mask. Each bit set to "1" indicates an ACCES USB device was detected at the device index corresponding to the set bit number. For example, if the return is 0x00000104 then the USB DeviceIndex #2 and #8 are ACCES built USB devices that use this driver.
Returns 0 if no devices found or if the driver is not installed properly.
Note, this does not return one DeviceIndex... it returns a pattern of bits indicating all valid device indices. Also note, a limitation in the current .SYS file prevents detection of more than 8 ACCES USB Digital I/O Devices connected to one computer simultaneously.

unsigned long QueryDeviceInfo(
unsigned long DeviceIndex - number from 0-31 of the device from which you want to query info.
unsigned long *pPID - DWORD gets set to the ProductID of the device at DeviceIndex. USB-CTR-15 = 8020 Hexadecimal
unsigned long *pNameSize - DWORD specifies size of the pName buffer. It gets set to how many bytes are needed. If your buffer is too small, the data will be truncated.
char *pName - pointer to char[] buffer. This is an array of char, not a null-terminated string. Length of string is passed back in pNameSize
unsigned long *pDIOBytes - DWORD gets set to how many bytes of DIO the board supports. The USB-CTR-15 will report "0"
unsigned long *pCounters - DWORD gets set to how many 8254-compatible counters are available. The USB-CTR-15 will report "5"
)

unsigned long CTR_8254Mode(
unsigned long DeviceIndex - number from 0-31 of the device on which you wish to configure an 8254 mode
unsigned long BlockIndex - number indicating which 8254 you wish to configure.
unsigned long CounterIndex - number from 0-2 indicating which counter on the specified 8254 you wish to configure
unsigned long Mode - a number from 0-5 specifying which 8254 mode you want the specified counter to be.
)
Note: issuing a mode to an 8254 counter without also issuing a load causes the counter to cease counting. Also note, mode 0 causes the counter output to immediately clear to zero, and mode 1 causes the counter output to immediately set to one.

unsigned long CTR_8254ModeLoad(
unsigned long DeviceIndex - number from 0-31 indicating on which device you wish to mode and load an 8254 counter
unsigned long BlockIndex - number indicating which 8254 you wish to mode and load
unsigned long CounterIndex - number from 0-2 indicating which counter on the specified 8254 you wish to mode and load
unsigned long Mode - a number from 0-5 specifying which 8254 mode you want the specified counter to be
unsigned short LoadValue - a number from 0 to 65535 which you wish loaded into the specified counter
)

unsigned long CTR_8254ReadModeLoad(
unsigned long DeviceIndex - number from 0-31 indicating on which device you wish to read, mode, and load an 8254 counter
unsigned long BlockIndex - number indicating which 8254 you wish to read, mode, and load
unsigned long CounterIndex - number from 0-2 indicating which counter on the specified 8254 you wish to read, mode, and load
unsigned long Mode - a number from 0-5 specifying which 8254 mode you want the specified counter to be
unsigned short LoadValue - a number from 0 to 65535 which you wish loaded into the specified counter
unsigned short *pReadValue - a pointer to a WORD in which will be stored the value latched and read from the specified counter. The reading is taken *before* the mode and load occur
)

unsigned long CTR_8254Read(
unsigned long DeviceIndex - number from 0-31 indicating on which device you wish to mode and load an 8254 counter
unsigned long BlockIndex - number indicating which 8254 you wish to mode and load
unsigned long CounterIndex - number from 0-2 indicating which counter on the specified 8254 you wish to mode and load
unsigned short *pReadValue - a pointer to a WORD in which will be stored the value latched and read from the specified counter
)

unsigned long CTR_StartOutputFreq(
unsigned long DeviceIndex - number from 0-31 indicating on which device you wish to output a frequency
unsigned long BlockIndex - number indicating which 8254 you wish to output a frequency
double *pHz - pointer to a double precision IEEE floating point number containing a desired output frequency. This value is set by the driver to the *actual* frequency that will be output, as limited by the device capabilities.
)

unsigned long CustomEEPROMWrite( - This function writes to the custom EEPROM area, so you can store data there for your own use.
unsigned long DeviceIndex - number from 0-31 of the device to which you wish to write custom EEPROM data.
unsigned long StartAddress - number from 0x000 to 0x1FF of the first custom EEPROM byte you wish to write to.
unsigned long DataSize - number of custom EEPROM bytes to write. The last custom EEPROM byte is 0x1FF, so StartAddress plus DataSize can't be greater than 0x200.
void *Data - pointer to the start of a block of bytes to write to the custom EEPROM area.
)

unsigned long CustomEEPROMRead( - This function reads data written by CustomEEPROMWrite.
unsigned long DeviceIndex - number from 0-31 of the device from which you wish to read custom EEPROM data.
unsigned long StartAddress - number from 0x000 to 0x1FF of the first custom EEPROM byte you wish to read from.
unsigned long *DataSize - pointer to a variable holding the number of custom EEPROM bytes to read. The last custom EEPROM byte is 0x1FF, so StartAddress plus *DataSize can't be greater than 0x200.
void *Data - pointer to the start of a block of bytes to fill with data read from the custom EEPROM area.
)

All DWORD return values other than GetDevices() are Windows Error Codes and return "ERROR_SUCCESS" (equal to 0) if no error occurred. If the USB device has been removed during use, the error returned is "ERROR_DEVICE_REMOVED" (equal to 1617 decimal) and will persist until a call to "GetDevices" or "QueryDeviceInfo" has been made for that device. If this state is cleared and the board was not reconnected, the error returned is "ERROR_FILE_NOT_FOUND" (equal to 2). Versions of AIOUSB.dll prior to 2.1 return "ERROR_DEV_NOT_EXIST" (equal to 55 decimal) under both conditions.

The constants diFirst (equal to FFFFFFFE hex) and diOnly (equal to FFFFFFFD hex) can be passed for DeviceIndex in place of an actual device index. diFirst causes the function to operate on the first device, whatever its device index. diOnly causes the function to operate on the only device if there is only one, or to return "ERROR_DUP_NAME" (equal to 52 decimal) if there's more than one device.