home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / usbd0906.zip / usb_20020906.zip / usbcalls / samples / rexx / testrexx.cmd
OS/2 REXX Batch file  |  2001-11-24  |  917b  |  40 lines

  1. /*******************************************/
  2. /* Test the REXX interface in USBCALLS.DLL */
  3. /*******************************************/
  4. call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
  5. call SysLoadFuncs
  6. Say 'SysLoadFuncs is complete.'
  7.  
  8. call RxFuncAdd 'UsbLoadFuncs' , 'USBCALLS', 'USBLOADFUNCS'
  9. call UsbLoadFuncs;
  10. Say 'SysLoadFuncs is complete.'
  11.  
  12. Say 'Getting Number of USB devices in the System'
  13.  
  14.  if(RxUsbQueryNumberDevices(NumDevices)=0)Then
  15.    Say NumDevices' USB devices attached to the system'
  16.  else
  17.    Say 'Error ' result ' while quering number of devices'
  18.  
  19.  
  20. say 'TESTREXX demonstration program is complete.'
  21. call SysPause 'Press Enter key to exit'
  22. exit
  23.  
  24.  
  25. SysPause:
  26. parse arg prompt
  27.   if prompt='' then
  28.     prompt='Press Enter key when ready . . .'
  29.   call SysSay prompt
  30.   Pull .
  31.   say
  32. return
  33.  
  34.  
  35.  
  36. SysSay:
  37. parse arg string
  38.   call charout 'STDOUT', string
  39. return
  40.