Intermec 700 User Manual
Page 241

6
Scanner Support
—
Chapter
217
700 Series Color Mobile Computer User’s Manual
S The bar code APIs, defined in the IADC interface, are available to get
bar code data from the bar code scanner. The following example shows
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);