Re: [GEN] what drives present in system

new topic     » goto parent     » topic index » view thread      » older message » newer message

--I cant remember who originally did these I changed a few things
--around in them and stuck'em over in a file marked dead but,
--They will work. You'll need a copy of DIR95 by Francis Bussiere
--(can be found on the contrib page)

function DetCD_ROM()
sequence regs
integer fCD, nCD
    regs = repeat(0,10)
    regs[REG_AX] = 5376
    regs = dos_interrupt(47, regs)
    fCD = remainder(regs[REG_CX],256)
    nCD = remainder(regs[REG_BX],256)
    return {fCD,nCD}
end function -- DetCD_ROM()

-- This will return a list of floppies, hard drives and CD-ROM
global function GetDriveList()
  integer hdn,fdn
  sequence fl,hl,cdl, cdInfo
  object d,j

  fdn = floor(peek(#410) / 64) -- number of floppies
  if fdn = 0 then
    fl = "A"
  elsif fdn = 1 then
    fl = "AB"
  end if

--check for CD-ROM
  cdl = ""
  cdInfo = DetCD_ROM()
  if cdInfo[2] then
    for i = 0  to cdInfo[2] -1  do
    cdl = cdl & "A"+i+cdInfo[1]
    end for
  end if

  hdn = peek(#475) -- number of hard disk
  if hdn > 0 then
     hl = "C"
  end if
  for loop=4 to cdInfo[1]-1 do
   j=Dir95(64+loop&":\\")
   if not atom(j) then
    hl=hl & loop+64
   end if
  end for
  return fl & hl & cdl
end function -- GetDriveList()

sequence DriveList  -- FLOPPIES, HD, CD
DriveList = GetDriveList()

------------
--Good Luck!
--euman



----- Original Message -----
From: Dan B Moyer <DANMOYER at PRODIGY.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Sunday, December 31, 2000 1:39 AM
Subject: Re: [GEN] what drives present in system


> Graeme,
>
> It was a text message in the dos window, just after some of the other text
> that was supposed to show up about the drives, and was similar to a "drive
> not ready, abort, retry, etc" message; and it included a "yes/no" response
> query.  I didn't see anything remotely like that message in the program,
so
> my suspicion is that the program somehow wrongfully triggered a delete
> request?
>
> Dan
>
>
>
>  w
> ----- Original Message -----
> From: "Graeme" <graemeburke at CROSSWINDS.NET>
> To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
> Sent: Saturday, December 30, 2000 6:04 AM
> Subject: Re: [GEN] what drives present in system
>
>
> > At 05:49 AM 30/12/00 -0800, you wrote:
> > >Has anyone used Craig's routines for finding out what drives are
present
> in
> > >a system?  Reason I ask is that in trying his example, on a W98 system,
I
> > >once (but not every time) got a message in the middle of the report
about
> > >the drives that asked, "are you sure you want to delete all files?" !!!
> > >Obviously a tad worrisome!
> > >
> > >Dan
> >
> > Yes, that would have to be a worry.
> > I've had the library archived for a while,
> > I had a quick look at it when it first turned
> > up, but I still havn't found a need to use it.
> > The demo runs fine on my win98 box, though.
> > I just re-ran it a heap of times.
> > Was it a text message or a windows popup?
> >
> >
> > Graeme.
> >
> >
> > ----------------------------------------------------
> > http://www.geocities.com/SiliconValley/Network/6843/
> > ------------<graemeburke at crosswinds.net>------------
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu