Intermec 700 Laptop User Manual


 
6 Scanner SupportChapter
217700 Series Color Mobile Computer User’s Manual
S The bar code APIs, defined in the IADC interface, are available to get
barcodedatafromthebarcodescanner.Thefollowingexampleshows
how to programmatically collects bar code data:
#include “IADC.h” // Linked with ITCUUID.LIB
#include “ITCAdcMgmt.h” // Linked with ITCAdcDevMgmt.lib
IADC* pIADC;
HRESULT hrStatus = S_OK;
// Create a ADC COM interface to collect bar code data from the 1551E/1553
// when the 1551/1553 menu option is enabled.
hrStatus =
ITCDeviceOpen(TEXT(“ExtScanner”), // Name of the ADC device.
IID_IADC, // COM interface to return
ITC_DHDEVFLAG_READAHEAD, // Device’s Flags
(LPVOID *) &pIADC); // the returned interface
if( SUCCEEDED(hrStatus) )
{
BYTE byteBuffer[MAX_LABEL_SIZE];
DWORD dwLength = 0;
HRESULT hr = pIDC->Read(
byteBuffer, // Buffer to put the ADC data.
MAX_LABEL_SIZE, // Size of pDataBuffer in bytes.
&dwLength, // Number bytes returned.
NULL, // Time stamp of the received data. NULL.
INFINITE // Number of milliseconds to wait.
);
}
when done using this COM interface, delete it:
ITCDeviceClose( (IUnknown **) pIADC);