var
handle1:THandle;
decoderparams:DECODER_PARAMS;
decoderList:DECODER_LIST;
res:integer;
begin
// this returns the correct result
SCAN_Open('SCN1:',@handle1);
SCAN_Enable(handle1);
// this returns the ERROR result
res:=SCAN_GetDecoderParams(handle1,DECODER_I2OF5,@DecoderParams);
ShowMessage(inttostr(res));
decoderparams.dwMinLength:=1;
decoderparams.dwMaxLength:=40;
res:=SCAN_SetDecoderParams(handle1,DECODER_I2OF5,@DecoderParams);
ShowMessage(inttostr(res));
// this returns the correct result but but does not change the settings
SCAN_GetEnabledDecoders(handle1,@decoderList);
decoderList.Decoders.dwDecoderCount:=1;
decoderList.Decoders.byList[0]:=57;
SCAN_SetEnabledDecoders(handle1,@decoderList);
// this returns the correct result
SCAN_Disable(handle1);
SCAN_Close(handle1);
end;