Date: Tue, 16 Apr 1996 20:54:44 +0200 (IST) From: Eli Zaretskii To: Jih-Shin Ho Cc: djgpp AT delorie DOT com Subject: Re: Detecting drives In-Reply-To: <4ku08f$mej@ccnews.nctu.edu.tw> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 15 Apr 1996, Jih-Shin Ho wrote: > The above code can detect all drives that DOS understands. For example, > network drive. Not so fast. "Network drives" might mean Novell 3.x, and you'd be surprised to see what you can get there, since Novell 3.x hooks Int 21h before DOS and thus any info about Novell drives bypasses DOS entirely. > 0x4409 DOS function call doesn't touch disk drive. It uses (I am not sure) the > internal data structure in DOS kernel for the detection. This might be a source of another problem, this time with CD-ROMs. You could get successfull return from 4409 with stale data even if there is no disk in the drive. That's because no DOS filesystem exists on the CD, it's an illusion created entirely by MSCDEX. Try putting a disk into a CD drive, make some DOS call, then remove the disk, close the door and issue 4409. I've seen similar functions returning ``valid'' data about a disk that's long ago gone in such cases (but I didn't try this with 4409, so I can't say for sure).