Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!mcvax!ukc!mucs!liv-cs!phil
From: phil@mva.cs.liv.ac.uk
Newsgroups: comp.sys.mac.programmer
Subject: Help - SysEnvirons & LSP
Message-ID: <293@mva.cs.liv.ac.uk>
Date: 10 Aug 89 17:16:42 GMT
Organization: Computer Science CSMVAX, Liverpool University
Lines: 30

I'm trying to write a program which makes use of the sound manager in system
6.0 (gosh a message about system 6 and not 7 for a change... :-)  ), but LSP
doesn't seem to define SysEnvirons, and when I try to define it myself (using
the usual inline call - gleaned from Vol 5 of IM) I get back an errcode of 9!
(not any of the defined ones that I'm supposed to get).

Function SysEnvirons(versRequested:integer;Var theWorld:sysEnvPtr):OSerr;
inline $A090;
.
.
errcode:=SysEnvirons(1,theWorld);
if (errCode=noErr) or (errCode=envVersTooBig) then
begin
  if theWorld^.systemVersion<$0600 then writeln('no go folks!!');
end
else
writeln(errCode,' returned from function call!!');

the above code gives back an errCode value of 9!
What am I doing wrong?
How do I define a call to SysEnvirons to tell me that I'm running system
version greater than 6 using LS Pascal?  Is the definition hidden somewhere in
the depths of those LSP libraries?  Can some kind soul offer some (useful)
help?
Phil Jimmieson,           ***************************************************
Computer Science Dept.,   *                                                 *
Liverpool University,     * JANET : PHIL@UK.AC.LIV.CS.MVA                   *
PO Box 147                * ARPA  : PHIL%mva.cs.liv.ac.uk@cunyvm.cuny.edu   *
Liverpool  L69  3BX       *                                                 *
(UK) 051-794-3689         ***************************************************