'12:55 18/03/2017
'23:23 29/07/2022


extern 
   !* o2_abst      (string s) as string
   !* o2_basic     (string s) as sys
   !* o2_exec      (sys p=0)  as sys
   !* o2_buf       (sys n)    as sys
   !* o2_errno     ()         as sys
   !* o2_error     ()         as string
   !* o2_len       ()         as sys
   !* o2_lib       ()         as sys
   !* o2_link      (string s) as sys
   !* o2_mode      (sys m)
   !* o2_pathcall  (sys m)
   !* o2_prep      (string s) as string
   !* o2_varcall   (sys m)
   !* o2_version   () as string
   !* o2_view      (string s) as string
   !* o2_stats     () as string
  end extern

  sys oxl=loadlibrary "oxygen.dll"
  if oxl then
    string errs
    def link
      @%1=getprocaddress oxl, "%1"
      if not @%1 then errs+="%1 is missing"+chr(13,10)
    end def
    '@o2_abst=getprocaddress oxl,"o2_abst"
    link o2_abst
    link o2_basic
    link o2_exec
    link o2_buf
    link o2_errno
    link o2_error
    link o2_len
    link o2_lib
    link o2_link
    link o2_mode
    link o2_pathcall
    link o2_prep
    link o2_varcall
    link o2_version
    link o2_view
  end if

  if not oxl then
    print "Cannot locate oxygen.dll"
    end
  end if

  if errs then
    print errs
    end
  end if

 o2_mode 9 'for oxygenBasic ascii strings

