From: | David McMinn |
Date: | 5 Aug 2000 at 15:13:38 |
Subject: | Re: Opening libs and devices |
Hi Daniel
Hmm, I replied to this last night and it hasn't come through. Oh well, I won't
bother going over the library stuff again.
> In which way I can open and close .devices ie. ahi.device? (I want
> just check if it is installed in system)
I think something like this would work. However, I've never had any success in
actually using devices.
devname$="ahi.device"
*mp.MsgPort = CreateMsgPort_
if *mp
; The docs should tell you what type of structure to allocate
; and then you use sizeof to get the size. I think its usually
; something like an IOStdRequest structure.
*ior.IORequest = CreateIORequest_(*mp, sizeof.IORequest)
if *ior
if OpenDevice_(&devname$, unit, *ior, flags)=0
NPrint "device open"
CloseDevice_ *ior
end if
DeleteIORequest_ *ior
end if
DeleteMsgPort_ *mp
end if
---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie