
DLL
function AttemptConnection(): LongInt; stdcall; external 'OBMSLABHIDDevice.dll';
function ItemUploadCMD(): LongInt; stdcall; external 'OBMSLABHIDDevice.dll';
function Listener2(ReportBuffer:PChar): LongInt; stdcall; external 'OBMSLABHIDDevice.dll';
function AnalyseData2(Data:PChar;nBytesCount,isUSBUPLoad:integer;SendData:PChar;OutData:PChar): LongInt; stdcall; external 'OBMSLABHIDDevice.dll';
function ImportText2(filename:PChar;isUSBUPLoad:integer;strSeparator:PChar): LongInt; stdcall; external 'OBMSLABHIDDevice.dll';


USBϴ
  intResult:=AttemptConnection();
  if intResult<>0 then
  begin
    ShowMessage('USBʧܣ');
    exit;
  end;

  intResult:=ItemUploadCMD();
  if intResult<>0 then
  begin
    ShowMessage('ϴʧܣ');
    exit;
  end;

  Memo1.Clear;
  while True do
  begin
    intResult:=Listener2(Buffer);
    if intResult=-1 then Break;

    Sleep(1000);

    intResult:=AnalyseData2(Buffer,intResult,1,SendBuffer,OutBuffer);
    if intResult<>0 then break;

    strBarcode:=GetBarCode(OutBuffer);
    Memo1.Lines.Add(strBarcode);

  end;

USB
  intResult:= ImportText2(@"E:\˾ļ\OBM767\8588_2.csv", 0, ",");


ظݴ

AnalyseData2һֵ cSerial:÷ݣظʱ˵յظݣϵͳ
Ҫ¼һյcSerialֵյ ͬcSerialֵݣ˵ظ䣬趪
