TBApiRawDataMode API Call



Set raw data mode for a specified device. This may be desirable in a situation where data of an undefined format (not defined as a data packet to the driver) is to be received from a controller and is required by an application.


The device handle and Boolean toggle between normal and raw data mode.


0 = fail, 1 = OK


In raw data mode, the pointer interface is suspended. If the caller has registered a _ReadDataTypeData callback via the TBApiRegisterDataCallBack, the data will be delivered to the callback function. Data packets are only delivered to the caller when a number of bytes are received, - this is determined by calling TBApiRawDataModeBlockSize.

At driver startup time, raw mode is set to ‘false’.

Starting with version 5.1.0 it is recommend that client programs should use the "packet disposition" setting, this offers a more flexible and in some cases more efficient method to deal with raw data.


Visual C++ Declaration/example


BOOL TBAPI TBApiRawDataMode(HTBDEVICE aDeviceHandle, BOOL aRawMode);


// Request the driver to return non-pointer data until directed otherwise

if ( TBApiRawDataMode (DeviceHandle, TRUE))


TBApiRawDataMode (DeviceHandle, FALSE);



Visual Basic Declaration/example


Public Declare Function TBApiRawDataMode Lib "TBapi" Alias "_DLL_TBApiRawDataMode@8" (ByVal aDeviceHandle As Long, ByVal aRawMode As Long) As Long


‘ Request the driver to return non-pointer data until directed otherwise…

if TBApiRawDataMode (DeviceHandle, TRUE) = TRUE then

TBApiRawDataMode (DeviceHandle, FALSE)

End if