[comp.sys.amiga.tech] Calling DOS from AmigaBasic - what'm'i doing wrong?

barrett@ektools.UUCP (Chris Barrett) (05/24/88)

In article <24844@bbn.COM>, cosell@bbn.com (Bernie Cosell) writes:
> GetIfile:
>   INPUT "File: ", ifile$
>   ILock& = Lock&(SADD(ifile$), -2&)  ' ACCESS_READ
>   IF ILock& = 0 THEN
>     PRINT "Can't find " ifile$ ", try again"
>     GOTO GetIfile
>   END IF
>   FileInfoBlock& = ArpAlloc&(260&)
>   Examine& (ILock&, FileInfoBlock&)
>   UnLock& (ILock&)
> 
> What happens is that the @#$%@ thing stops at the "Examine" call with Illegal
> system call or some error like that.  I've looked and ILock& and FileInfoBlock&

I think you have the same problem here also.  Try this:
 
	filename$ = ifile$ + CHR$(0)
	ILock& = Lock&(SADD(filename$), -2&)
	.
	.
	.

Let me know if this works.

Chris.

...rochester!kodak!ektools!barrett