[comp.sys.mac.programmer] Help - SysEnvirons & LSP

phil@mva.cs.liv.ac.uk (08/11/89)

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         ***************************************************

siegel@endor.harvard.edu (Rich Siegel) (08/17/89)

In article <293@mva.cs.liv.ac.uk> phil@mva.cs.liv.ac.uk writes:
>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

	In version 2.0 and later, SysEnvirons is built in. And the second
argument is a VAR SysEnvRec, not a VAR SysEnvRecPtr.

R.
~~~~~~~~~~~~~~~
 Rich Siegel
 Staff Software Developer
 Symantec Corporation, Language Products Group
 Internet: siegel@endor.harvard.edu
 UUCP: ..harvard!endor!siegel

"When it comes to my health, I think of my body as a temple - or at least
a moderately well-managed Presbyterian youth center." - Emo Phillips

~~~~~~~~~~~~~~~