Mail Archives: djgpp/2000/10/26/18:50:25
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
At 00.56 10/25/2000, Eli Zaretskii wrote:
>On Tue, 24 Oct 2000, Salvador I. Ducros wrote:
><SNIPPED>
> > If not, anybody out there have any ideas of how to detect if
> > the ramdrive.sys driver has been previously loaded and if so, what
> > drive letter it is using?
>
>It is not clear whether you want to detect any RAM disk, or
>ramdrive.sys specifically.
>
>If the former, you can use library function `getmntent': it returns,
>for each drive, a structure where one member gives the type of the
>filesystem mounted on that drive. That function is quite slow, but if
>you need only to call it once, you might not bother.
In the latter, you can check the volume label of the drive. If it's
MS_RAMDRIVE, then it's MS-DOS's RAM DISK or equivelent. However, if the RAM
DISK has been relabeled with the 'label' command, there may be no way...
>(Btw, I'd suggest to describe the reasons why you need to know this;
>perhaps there's a different solution to your original problem, which
>doesn't involve probing drives for being RAM disks.)
Yes, it sounds like there must be a much more elegant solution, but it is
impossible to find without acutally knowing all the circumstances.
Just my $0.02,
- --Matt
- --
Matt Lewandowsky matt DOT l AT techie DOT com 877-225-7490
PGP Key ID: 0x1D3A6BA7 URL: http://www.greenviolet.net
(Web page only up when I'm online)
"... one of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination of
their C programs."
-- Robert Firth
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBOfi0wOoMko8dOmunEQK+uwCgze5Pgude3iefyj8o+XpENT6AjWYAoJEk
mM3PNTjcynvSE3IPYbe3fN76
=0XEQ
-----END PGP SIGNATURE-----
- Raw text -