The PSION Organiser II Homepage
Forum Home Forum Home Help Help Search Search Members Members Login Login Register Register

Welcome, Guest. Please Login or Register.
Why register?
   The Psion Organiser II Forum
   User Forum
   Help
   Post reply ( Re: Source Code Request )
Post reply
Subject:
Full name:
Email:
Message icon:
Add Smileys:
Message:
Disable Smilies:

Check this if you'll be adding code (or don't like smileys).


Before submitting, please enter the verification code in the box below.
   


Topic Summary - Displaying 1 posts. Click here to show all
Posted by: POISN Posted on: Oct 8th, 2019, 3:02am
I just saw this. I haven't been here in a long time. I couldn't attach the file.
 

#define E_FILE_PENDING -46
 
#define C_SCANDYL 0
/* Method numbers in this category */
#define O_DESTROY 0
#define O_SC_ATTEND 13
#define O_SC_CANCELSCANNERREAD 11
#define O_SC_CHANGEPORT 19
#define O_SC_CLOSESCANNER 9
#define O_SC_DECODE 16
#define O_SC_GETLIBVERSION 2
#define O_SC_GETPARAMS 14
#define O_SC_GETSCANNERPARAMS 15
#define O_SC_GETSCANNERTYPE 3
#define O_SC_INITIALISESCANNER 5
#define O_SC_INITLIB 1
#define O_SC_OPENSCANNER 8
#define O_SC_QUEUESCANNERREAD 10
#define O_SC_RESETPARAMS 6
#define O_SC_SCANA 17
#define O_SC_SCANBEEP 18
#define O_SC_SENDSCANNER 12
#define O_SC_SETSCANNERTYPE 4
#define O_SC_UPDATEPARAMS 7
 
/* Class constants */
#define WA_LASER_SCANNER 1
#define WA_CCD_SCANNER 2
#define WA_BARCODE_WAND 3
#define WA_1223_SCANNER 4
#define GOODBEEP 0
#define BADBEEP 1
#define TIMEOUTBEEP 2
 
#define STORECAP 227
#define PARAMSEND 198
 
 
PROC ScLoad%:
  LOCAL link%,rval%,ScanH%
  link% = 1
  rval% = LOADLIB(ScanH%, "\scanner", link%)
  IF rval% :RETURN rval% :ENDIF
  ScanObj% = NEWOBJH(ScanH%, C_SCANDYL)
  IF ScanObj%=0 :RETURN -1 :ENDIF
  SEND(ScanObj%, O_SC_INITLIB)
  rval% = SEND(ScanObj%, O_SC_GETLIBVERSION)
  SEND(ScanObj%, O_SC_GETSCANNERTYPE)
  RETURN rval%
ENDP
 
 
 
PROC ScInit%:
  LOCAL rval%, pptr%, i%
  rval% = SEND(ScanObj%, O_SC_INITIALISESCANNER)
  PAUSE 4
  IF rval% :RETURN rval% :ENDIF
  pptr% = SEND(ScanObj%, O_SC_GETPARAMS)
  i% = 1
  DO
  Params%(i%) = PEEKB (pptr%)
  i% = i% + 1
  pptr% = pptr% + 1
  UNTIL i% > 11
  RETURN 0
ENDP
 
 
PROC ScScanA%:(pstat%)
  LOCAL rval%,cptr%
  cptr% = UADD(ADDR(ScanBuf$),1)
  rval% = SEND(ScanObj%, O_SC_SCANA, #cptr%, ScanLen%, #pstat%)
  RETURN rval%
ENDP
 
 
 
 
 
PROC ScScanF%:
  LOCAL rval%, cptr%
  cptr% = UADD(ADDR(ScanBuf$),1)
  rval% = SEND(ScanObj%, O_SC_DECODE, #cptr%, ScanLen%)
  IF rval%
  ScanLen% = 0
  ENDIF
  POKEB ADDR(ScanBuf$),ScanLen%
  RETURN rval%
ENDP
 
 
PROC ScSaveP%:
  LOCAL rval%,pptr%,i%
  pptr% = SEND(ScanObj%, O_SC_GETPARAMS)
  i% = 1
  DO
  POKEB pptr%, Params%(i%)
  i% = i% + 1
  pptr% = pptr% + 1
  UNTIL i% > 11
  rval% = SEND(ScanObj%, O_SC_UPDATEPARAMS)
  RETURN rval%
ENDP
 
 
 
PROC ScCancel:
  SEND(ScanObj%, O_SC_CANCELSCANNERREAD)
  SEND(ScanObj%, O_SC_CLOSESCANNER)
ENDP
 
PROC ScScanS%:
  LOCAL rval%,cptr%,stat%
  cptr% = UADD(ADDR(ScanBuf$),1)
  stat% = 1
  rval% = SEND(ScanObj%, O_SC_SCANA, #cptr%, ScanLen%, stat%)
  IF rval%
  ScanBuf$ = ""
  ScanLen% = 0
  RETURN rval%
  ENDIF
  IOWAITSTAT stat%
  IF stat%
  ScanLen% = 0
  ENDIF
  POKEB ADDR(ScanBuf$),ScanLen%
  RETURN stat%
ENDP
 
PROC ScBeep:(Code%)
  SEND(ScanObj%, O_SC_SCANBEEP, #Code%)
ENDP
 
PROC ScUnLd%:
  LOCAL rval%
  rval% = 0
  IF ScanObj%
  SEND(ScanObj%, O_DESTROY)
  ENDIF
  IF ScanH%
  rval% = UNLOADLIB(ScanH%)
  ENDIF
  ScanObj% = 0
  ScanH% = 0
  RETURN rval%
ENDP
 
PROC ScConf%:(comd$)
  LOCAL t%, rval%, op%, l%, ptr$(100)
  ptr$ = comd$
  t% = SEND(ScanObj%, O_SC_GETSCANNERTYPE)
  IF t% = WA_LASER_SCANNER
  op% = STORECAP
  ELSE
  op% = PARAMSEND
  ENDIF
  rval% = SEND(ScanObj%, O_SC_ATTEND)
  IF rval% = 0
  l% = LEN(ptr$)
  rval% = SEND(ScanObj%, O_SC_SENDSCANNER, #op%, ptr$, #l%)
  IF (t% <> WA_BARCODE_WAND) AND (t% <> WA_CCD_SCANNER)
  SEND(ScanObj%, O_SC_CLOSESCANNER)
  ENDIF
  ENDIF
  RETURN rval%
ENDP
 

The Psion Organiser II Forum » Powered by YaBB 1 Gold - SP 1.1!
YaBB 2000-2002,
Xnull. All Rights Reserved.
top